gpt4 book ai didi

ios - Paypal ios PaymentViewController 不工作?

转载 作者:太空宇宙 更新时间:2023-11-03 16:24:40 25 4
gpt4 key购买 nike

我正在将 PayPal 添加到我的应用程序,但 PaymentViewController 无法正常工作。我在桥接 header 中导入以下内容:

      #import "PayPalMobile.h"
#import "PayPalConfiguration.h"
#import "PayPalPaymentViewController.h"
@interface ViewController : UIViewController<PayPalPaymentDelegate>
@end
#endif /* Header_h */

我的 paymentviewcontroller 是:

   let paymentViewController = PayPalPaymentViewController(payment: payment, configuration: payPalConfig, delegate: self)

我的错误是“MyClass 不符合协议(protocol) PayPalPaymentDelegate”

最佳答案

在您的 View Controller 中实现以下方法:

// Paypal 支付委托(delegate)

func payPalPaymentDidCancel(paymentViewController: PayPalPaymentViewController) {

}

func payPalPaymentViewController(paymentViewController: PayPalPaymentViewController, didCompletePayment completedPayment: PayPalPayment) {



}

关于ios - Paypal ios PaymentViewController 不工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37748469/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com