问题描述
我正在将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 (将#修改为@)