PayPalPaymentViewController

PayPalPaymentViewController

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

      #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不符合协议PayPalPaymentDelegate”

最佳答案

在视图控制器中实现以下方法:

// PayPalPaymentDelegate

func payPalPaymentDidCancel(paymentViewController: PayPalPaymentViewController) {

  }

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



  }

10-06 02:00