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

Posted

技术标签:

【中文标题】通过 PayPal iOS SDK 进行的 PayPal 实时交易中的问题【英文标题】:Issues in PayPal live transaction via PayPal iOS SDK 【发布时间】:2014-11-04 03:35:40 【问题描述】:

我正在为 iPad 7.x 版开发一个 ios 应用程序。我们需要通过应用程序执行 PayPal 交易。我们包含了 PayPal iOS SDK 并参考了他们的示例代码来执行交易。

示例代码放在here

    客户账户中有足够的资金 此外,我们有适当的客户 ID 和密钥,用于转移资金。 收款人和付款人都有真实账户。 通过他们的 Sandbox 帐户进行的交易成功

在调试代码后,我们发现我们能够创建付款。但是,当付款即将被批准时,我们会收到错误消息。

这里是错误详情

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]

我们的代码中是否需要包含任何特定配置以进行实时交易? 或者在其中一个帐户中是否需要进行特定配置? 还是缺少 PayPal iOS SDK 提供的示例代码?请指教。

【问题讨论】:

【参考方案1】:

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

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.

这解决了我们的问题。

【讨论】:

【参考方案2】:

问题是您没有使用正确的 ClientID。您使用的客户端 ID 未与您的开发人员门户中的活动应用关联。要更正此问题,请进入 developer portal,并使用来自不同“活动”应用的不同客户端 ID 或创建新应用。

【讨论】:

以上是关于通过 PayPal iOS SDK 进行的 PayPal 实时交易中的问题的主要内容,如果未能解决你的问题,请参考以下文章

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

我们可以使用带有最新 xcode 和 swift 版本的较低版本的 pay pal sdk

使用 nodejs、angularjs 和 paypal sdk 付款结果 cors 错误

用于 Paypal 令牌的 Paypal iOS SDK

IOS中的paypal sdk Touch id身份验证

PayPal iOS SDK授权支付