通过PayPal iOS SDK进行PayPal实时交易的问题

我正在开发iOS版本的iPad 7.x版本。 我们需要通过应用程序执行PayPal交易。 我们包含PayPal iOS SDK,并引用他们的示例代码来执行交易。

示例代码放在这里

  1. 客户帐户中有足够的资金
  2. 此外,我们有适当的客户ID和秘密密钥需要转移资金。
  3. 收款人和付款人都有真实账户。
  4. 通过他们的沙箱帐户交易已经成功

在debugging代码时,我们发现我们能够创build付款。 但是,付款即将被批准时,我们会收到错误。

这里是错误的细节

PayPal SDK: Request has failed with error: UNKNOWN_ERROR - System error (UNKNOWN_ERROR). Please try again later. (400) | PayPal Debug-ID: 3e8087cbf6bd1 [live, PayPal iOS SDK 2.1.2] 

是否有任何特定的configuration,我们需要包括在我们的代码进行实时交易? 还是有其中一个帐户需要完成的具体configuration? 还是有什么缺less贝宝iOS SDK提供的示例代码? 请指教。

问题是您没有使用正确的ClientID。 您使用的客户端ID与yoiur开发人员门户的活动应用程序没有关联。 要更正此问题,请进入开发者门户网站,并使用不同的“活动”应用程序中的其他客户端ID或创build新的应用程序。

我们与PayPal技术支持团队讨论了这个问题,这里是FIX:

 We've found the issue is actually not with buyer account, some flag was not updated for merchant account "XXX@YYY.com” due to a bug which had in our system at the time it was created. The fastest workaround to resolve this would be if you could please add another email to same account "XXX@YYY.com”. Steps to add another email address to "XXX@YYY.com” : Please login to the PayPal account. Click on Profile—> Email address. Add another email address. 

这解决了我们的问题。