【问题标题】:Braintree one time payment request taking too much time to loadBraintree 一次性付款请求加载时间过长
【发布时间】:2020-03-08 23:50:02
【问题描述】:

我正在使用 BTPayPalDriver 调用一次性付款请求。但登录提醒在显示屏上加载的时间过长。

let payPalDriver = BTPayPalDriver(apiClient: 
FunctionManager.APPDELEGATE().braintreeClient)
payPalDriver.viewControllerPresentingDelegate = self
payPalDriver.appSwitchDelegate = self // Optional        

    let request = BTPayPalRequest(amount: "0.99")
    request.currencyCode = "USD" // Optional; see BTPayPalRequest.h for more options

    payPalDriver.requestOneTimePayment(request) { (tokenizedPayPalAccount, error) in
    if let tokenizedPayPalAccount = tokenizedPayPalAccount {
            print("Got a nonce: \(tokenizedPayPalAccount.nonce)")
}

【问题讨论】:

  • 您对 StackOverflow 有什么疑问?
  • @JeremyP,Braintree 付款请求警报在请求时加载时间过长。
  • 非常好,但您的问题是什么?您认为这是您的代码中的问题吗?如果您认为这是其他地方的问题,Stackoverflow 不是这个问题的正确站点。

标签: ios swift paypal braintree


【解决方案1】:

您应该使用- (void)appContextWillSwitch:(nonnull id)appSwitcher; 委托回调,以便在显示 PayPal UI 的过程开始时收到通知。在调用此方法之前,您可以显示加载程序。

此处参考 Braintree iOS SDK Github 中的一个相关问题。 https://github.com/braintree/braintree_ios/issues/404

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-05-22
    • 2013-05-06
    • 2014-05-08
    • 2017-11-18
    • 2015-02-06
    • 2015-04-24
    • 2011-02-28
    • 2015-01-10
    相关资源
    最近更新 更多