贝宝 SERVER_COMMUNICATION_ERROR

Paypal SERVER_COMMUNICATION_ERROR

我正在努力将 Paypal 支付与我的 android 应用集成。

这是我的 Paypal 配置代码:

private static PayPalConfiguration config = new PayPalConfiguration()
        .environment(CONFIG_ENVIRONMENT)
        .clientId(CONFIG_CLIENT_ID)
                // The following are only used in PayPalFuturePaymentActivity.
        .merchantName("Integration Demo")
        .merchantPrivacyPolicyUri(Uri.parse(""))
        .merchantUserAgreementUri(Uri.parse("https://www.paypal.com/webapps/mpp/ua/useragreement-full"))
        .rememberUser(true);

我打电话给 PayPalService :

Intent intent = new Intent(this, PayPalService.class);
intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);
startService(intent);

但我收到以下错误:

01-11 11:49:19.788 31868-8284/com.packagename E/paypal.sdk: request failed with server response:shutdown
01-11 11:49:19.803 31868-31868/com.packagename E/paypal.sdk: SERVER_COMMUNICATION_ERROR

我已经完成了this,但到现在还没有帮助。

现在看来新版本 2.12.5 已解决

从官方 android SDK github 代码中得知此消息,Paypal 人员确认现在已解决。来自 this

I have updated the okhttp version to latest stable release in v2.12.5. Can you please update to latest version and confirm if you are now not getting this exception.

I was hardly able to reproduce this issue on any device, and so, would need your help fixing this issue. I will keep an eye on this issue promptly, and get it sorted out soon :+1:

Thanks for helping all !

我用新版本 2.12.5 测试过,问题不存在了。

compile('com.paypal.sdk:paypal-android-sdk:2.12.5')