【发布时间】:2016-01-11 06:35:04
【问题描述】:
我正在努力将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,但到目前为止没有任何帮助。
【问题讨论】:
-
嗨。您必须在贝宝网站上创建一个应用程序。然后选择环境(sandox 或生产)并添加您的应用程序客户端 ID。
-
我可以给你工作代码
-
@V.Kalyuzhnyu 是的,我已经完成了一切,创建应用程序,复制 CONFIG_CLIENT_ID 并使用沙盒环境。
-
最近我很高兴在我的应用程序中集成了贝宝
-
请稍等。我很快就到家了,记得给代码和其他一些建议
标签: android paypal-android-sdk