Ios 未处理Swift 3贝宝付款
Swift 2贝宝演示 迅速的变化Ios 未处理Swift 3贝宝付款,ios,swift,paypal,Ios,Swift,Paypal,Swift 2贝宝演示 迅速的变化 if (payment?.processable)! { let paymentViewController = PayPalPaymentViewController(payment: payment, configuration: payPalConfig, delegate: self) present(paymentViewController!, animated: true, completion:
if (payment?.processable)!
{
let paymentViewController = PayPalPaymentViewController(payment: payment, configuration: payPalConfig, delegate: self)
present(paymentViewController!, animated: true, completion: nil)
}
else
{
print("Payment not processalbe: \(payment)")
}
swift 3的反应是
PayPal SDK: PayPalPayment not processable: if paymentDetails are provided, then subtotal must be positive.
Payment not processalbe: Optional(
CurrencyCode: USD
Amount: 8.49
Short Description: Hipster Clothing
Intent: sale
Processable: No
Display: $8.49
Confirmation: (null)
Details: Subtotal: 0, Shipping: 5.99, Tax: 2.5
Shipping Address: (null)
Invoice Number: (null)
Custom: (null)
Soft Descriptor: (null)
BN code: (null)
Item: 'Optional({2|Old jeans with holes|84.99|USD|Hip-0037})'
Item: 'Optional({1|Free rainbow patch|0.00|USD|Hip-00066})'
Item: 'Optional({1|Long-sleeve plaid shirt (mustache not included)|37.99|USD|Hip-00291})')
if (payment.processable)
它在swift 2中运行良好,但我根据swift 3更改为代码
if (payment?.processable)!
如果我按照swift 3使用此选项,则响应高于swift 3所做的更多更改 即使我有同样的问题,你找到解决办法了吗即使我有同样的问题,你找到解决办法了吗
if (payment?.processable)!