Aja*_*kur 5 paypal braintree paypal-sandbox ios swift
我正在使用Xcode 8,swift 3.通过carthage和braintree版本4.7.2安装.
点击继续沙盒购买按钮它没有回到应用程序并且没有收到响应并且没有收到错误.
我正在按时结账使用PayPal.
@IBAction func customPayPalButtonPressed(_ sender: AnyObject) {
let payPalDriver : BTPayPalDriver = BTPayPalDriver.init(apiClient: self.apiClient!)
payPalDriver.viewControllerPresentingDelegate = self
payPalDriver.appSwitchDelegate = self
let payPalRequest = BTPayPalRequest(amount: "100.00")
payPalRequest.currencyCode = "USD"
payPalDriver.requestOneTimePayment(payPalRequest) { (tokenizedPayPalAccount, error) -> Void in
if (tokenizedPayPalAccount != nil) {
print(tokenizedPayPalAccount.debugDescription)
}else if (error != nil) {
print(error?.localizedDescription)
print(error.debugDescription)
}else {
print("Cancled")
}
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
430 次 |
| 最近记录: |