[英]Ionic Native paypal, System Error, please try again later when logging in
I have tried implementing the Ionic paypal native plugin.我已经尝试实现 Ionic paypal 本机插件。 I installed the plugin using:我使用以下方法安装了插件:
ionic cordova plugin add com.paypal.cordova.mobilesdk
npm install @ionic-native/paypal
The first day that I tried to use it, it worked perfectly fine.我尝试使用它的第一天,它工作得非常好。 However after a day or two when I gave it to one of my teammates for testing, while trying to log into paypal (sandbox account), it keeps saying "Login Failed, System error. Please try again later".但是一两天后,当我将它交给我的一个队友进行测试时,在尝试登录 paypal(沙盒帐户)时,它一直说“登录失败,系统错误。请稍后再试”。 I have even tried the code snippet that is presented on the ionic documentation page, it gives me the same error.我什至尝试了离子文档页面上显示的代码片段,它给了我同样的错误。
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
});
I tried different configurations, I also tried different developer account but it still gives me the same error.我尝试了不同的配置,我也尝试了不同的开发者帐户,但它仍然给我同样的错误。 I apologize if this explanation is not so good since this is my first post, but please can you aid me in solving this issue?如果这个解释不是很好,我很抱歉,因为这是我的第一篇文章,但请你能帮我解决这个问题吗?
@ionic-native/paypal @ionic-native/贝宝
The old mobile SDK plugin used by this has been deprecated for years and is end of life as of precisely today (Dec 7th).其使用的旧移动 SDK 插件已被弃用多年,并且截至今天(12 月 7 日)已终止使用。 This integration cannot be used, it is completely sunset.这个集成不能用了,完全日落了。
In switching over to a current supported web-based PayPal Checkout integration, ensure you open it in a Safari View Controller or Chrome Custom Tab.在切换到当前支持的基于 Web 的 PayPal Checkout集成时,请确保在 Safari 查看 Controller 或 Chrome 自定义选项卡中打开它。 (WKWebView or similar cannot be used) (不能使用 WKWebView 或类似的)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.