[英]Credit Card is not shown in PayPal Sandbox Payment Option After Login
I am currently trying to add PayPal
into my Ionic 2 application referring by referring to this link 我目前正在尝试通过参考此链接将PayPal
添加到我的Ionic 2应用程序中
In PayPal Sandbox environment, I don't get why Credit Card is not shown in my PayPal payment options after I login with the sandbox buyer account. 在PayPal沙盒环境中,我不知道为什么使用沙盒买家帐户登录后在PayPal付款选项中不显示信用卡的原因。
Here is my code to connect to PayPal: 这是我连接到PayPal的代码:
payViaPaypal() {
let env = this;
this.payPal.init({
PayPalEnvironmentProduction: paypal.PayPalEnvironmentProduction,
PayPalEnvironmentSandbox: paypal.PayPalEnvironmentSandbox
}).then(() => {
env.payPal.prepareToRender(paypal.CurrentEnvironment, new PayPalConfiguration({})).then(() => {
let payment = new PayPalPayment('3.33', 'MYR', 'Description', 'sale');
env.payPal.renderSinglePaymentUI(payment).then((result) => {
if (result.response.state == "approved") {
console.log("Success!")
}
}, () => {
console.error('Error or render dialog closed without being successful');
});
}, () => {
console.error('Error in configuration');
});
}, () => {
console.error('Error in initialization, maybe PayPal isn\'t supported or something else');
});
}
The reason the credit cards in this account are not showing is that I am using MYR as currency in my PayPal Sandbox environment . 此帐户中未显示信用卡的原因是,我在PayPal沙盒环境中使用MYR作为货币 。 In PayPal Sandbox environment, only USD is allowed for any credit card transaction , otherwise, you will receive an error when you made credit card transaction using other currencies. 在PayPal Sandbox环境中,任何信用卡交易都只允许使用USD ,否则,当您使用其他货币进行信用卡交易时,您将收到错误消息。 Therefore, after I changed the currency to USD, everything works fine for me. 因此,在我将货币更改为USD之后,一切对我来说都很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.