我正在尝试在app中使用paypal iOS SDK。我完成了注册并创建了应用程序,然后我获得了两个客户端ID,沙盒和实时。
当我使用沙箱客户端ID,实时客户端ID时,我收到了错误。
iOS提示提示:
We're Sorry. There was a problem communicating with the PayPal servers. Please tey again.
(我尝试了很多次,但仍然失败了。)
错误日志:
PAYMENT_CREATION_ERROR - System error (PAYMENT_CREATION_ERROR). Please try again later. (422) | PayPal Debug-ID: fd805f5f6239a [live, PayPal iOS SDK 2.5.0]
请帮帮我。
谢谢〜
答案 0 :(得分:1)
仅使用沙盒客户端ID来测试您的应用程序
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions
{
// Override point for customization after application launch.
[PayPalMobile initializeWithClientIdsForEnvironments:@{PayPalEnvironmentProduction : @"YOUR_CLIENT_ID_FOR_PRODUCTION",
PayPalEnvironmentSandbox : @"AYRzOxBmlQ6vUoUn2O8UHjdYvq9hDdTQ8fE9lfA-glkMJAMYCAaZ"}];
}
我使用它,它对我来说很好..