如何解决无法在ionic 3项目中登录贝宝
我正在将PayPal集成到ionic3应用程序中,每当我单击“付款”将其重定向到Paypal网站时,我都会在其中输入用户名和密码,并且每次输入“用户名和/或密码无效”,但我都为登录。
请帮助
代码在这里:
import { PayPal,PayPalPayment,PayPalConfiguration } from '@ionic-native/paypal';
payWithPaypal(){
//let amount = parseFloat(HomePage.orderinfo.total);
this.payPal.init({
PayPalEnvironmentProduction: 'AdXXXXXXXXXXXXXXXX',PayPalEnvironmentSandbox: 'YOUR KEY'
}).then(() => {
this.payPal.prepareToRender('PayPalEnvironmentProduction',new PayPalConfiguration({
})).then(() => {
let payment = new PayPalPayment(this.paymentAmount,this.currency,'description','sale');
this.payPal.renderSinglePaymentUI(payment).then((res) => {
this.online('PAYPAL',res.response.id);
this.responseData = JSON.stringify(res,null,1);
let alert = this.alertCtrl.create({
title: 'La orden ha sido agregada',subTitle: "El id de su gestion es: " + res.order_number,buttons: [{
text: "OK",handler: () => {
this.navCtrl.setRoot(HomePage);
this.navCtrl.push(OrderConfirmPage,{ OrderId: this.responseData.success });
}
}]
});
alert.present();
},(err) => {
let alert = this.alertCtrl.create({
title: 'Error intentando conectar',subTitle: err,buttons: ['Dismiss']
});
alert.present();
});
},(err) => {
let alert = this.alertCtrl.create({
title: 'Error con la configuracion',buttons: ['Dismiss']
});
alert.present();
});
},(err) => {
let alert = this.alertCtrl.create({
title: 'Error con el plugin de PayPal',buttons: ['Dismiss']
});
alert.present();
});
}
这是屏幕截图
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。