Ionic Native paypal,系统错误,请稍后登录时重试



我尝试过实现Ionic paypal原生插件。我安装插件使用:

ionic cordova plugin add com.paypal.cordova.mobilesdk
npm install @ionic-native/paypal

我试着使用它的第一天,它运行得非常好。然而,一两天后,当我把它交给我的一个队友进行测试时,当我试图登录贝宝(沙盒账户(时,它一直在说"登录失败,系统错误。请稍后再试";。我甚至尝试过ionic文档页面上的代码片段,它也给了我同样的错误。

import { PayPal, PayPalPayment, PayPalConfiguration } from '@ionic-native/paypal/ngx';
constructor(private payPal: PayPal) { }
...

this.payPal.init({
PayPalEnvironmentProduction: 'YOUR_PRODUCTION_CLIENT_ID',
PayPalEnvironmentSandbox: 'YOUR_SANDBOX_CLIENT_ID'
}).then(() => {
// Environments: PayPalEnvironmentNoNetwork, PayPalEnvironmentSandbox, PayPalEnvironmentProduction
this.payPal.prepareToRender('PayPalEnvironmentSandbox', new PayPalConfiguration({
// Only needed if you get an "Internal Service Error" after PayPal login!
//payPalShippingAddressOption: 2 // PayPalShippingAddressOptionPayPal
})).then(() => {
let payment = new PayPalPayment('3.33', 'USD', 'Description', 'sale');
this.payPal.renderSinglePaymentUI(payment).then(() => {
// Successfully paid
// Example sandbox response
//
// {
//   "client": {
//     "environment": "sandbox",
//     "product_name": "PayPal iOS SDK",
//     "paypal_sdk_version": "2.16.0",
//     "platform": "iOS"
//   },
//   "response_type": "payment",
//   "response": {
//     "id": "PAY-1AB23456CD789012EF34GHIJ",
//     "state": "approved",
//     "create_time": "2016-10-03T13:33:33Z",
//     "intent": "sale"
//   }
// }
}, () => {
// Error or render dialog closed without being successful
});
}, () => {
// Error in configuration
});
}, () => {
// Error in initialization, maybe PayPal isn't supported or something else
});

我尝试了不同的配置,我也尝试了不同开发人员帐户,但它仍然给我相同的错误。如果这个解释不太好,我很抱歉,因为这是我的第一篇帖子,但你能帮助我解决这个问题吗?

@离子原生/贝宝

该公司使用的旧移动SDK插件已被弃用多年,并于今天(12月7日(停止使用。这种集成不能使用,它完全是日落。


在切换到当前支持的基于web的PayPal Checkout集成时,请确保您在Safari View控制器或Chrome自定义选项卡中打开它。(不能使用WKWebView或类似功能(

最新更新