我有一个使用PayPal-iOS-SDK Cocoapod和桥接头的PayPalPaymentViewController。这是我生成付款VC的代码。它正在被实例化和呈现,但没有一个按钮工作(除了取消)。我无法使用CC登录或结账。
Xcode 8.3.3
iOS 10.3.2
func showPayPalViewController() {
// PayPal Payment Configurations
let ppConfig = PayPalConfiguration()
ppConfig.acceptCreditCards = true
ppConfig.merchantName = "Temp Merch Name"
ppConfig.payPalShippingAddressOption = .none
ppConfig.sandboxUserPassword = "Boatboat1"
// Item To Be Paid For
let ppPayment = PayPalPayment(amount: 2000.00, currencyCode: "USD", shortDescription: "Temp Service Name", intent: .sale)
ppPayment.paymentDetails = PayPalPaymentDetails(subtotal: 2000.00, withShipping: 0.0, withTax: 0.0)
// Instanciate Payment VC
let ppViewController = PayPalPaymentViewController(payment: ppPayment, configuration: ppConfig, delegate: self)
present(ppViewController!, animated: true, completion: nil)
}
所以我的问题是为什么我不能点击“登录”或“用卡支付”
答案 0 :(得分:0)
您必须为每个正常工作的按钮声明按钮操作。可以尝试使用IBAction并声明按钮的值。那将是一个最好的方法。!