Braintree一次付款请求需要太多时间来加载

问题描述 投票:0回答:1

我正在使用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)")
}

enter image description here

ios swift paypal braintree
1个回答
1
投票

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

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

© www.soinside.com 2019 - 2024. All rights reserved.