[英]PayPal Checkout Button
I am trying to set up a working paypal button for a personal e-commerce web app.我正在尝试为个人电子商务 web 应用程序设置一个有效的 paypal 按钮。
My sandbox text app works perfect in taking payments/non-payments and returns but when i change my client-id to the live version it gives me an error.我的沙盒文本应用程序在接受付款/非付款和退货方面表现完美,但是当我将客户 ID 更改为实时版本时,它给了我一个错误。
It says the card cannot be used.说卡不能用。
I am also based in Ireland, on the off chance location is a problem.我也住在爱尔兰,机会位置是个问题。
My code is as followed.我的代码如下。
My client id is followed up with '...¤cy=EUR'我的客户 ID 后面跟着 '...¤cy=EUR'
I should point out this is when clicking the pay with credit/debit card option.我应该指出这是在单击使用信用卡/借记卡付款选项时。 I have not tested payment from a Paypal account yet.
我尚未测试 Paypal 帐户的付款。
It says please use another card or billing address error.它说请使用另一张卡或帐单地址错误。
useEffect(() => {
window.paypal.Buttons({
createOrder: (data, actions, err) => {
return actions.order.create({
intent: 'CAPTURE',
purchase_units: [{
description: 'Door to Door',
amount: {
currency_code: 'EUR',
value: 0.01
}
}]
})
},
onApprove: async(data, actions) => {
const order = await actions.order.capture();
setPaidFor(true);
sendEmail();
console.log(order)
},
onError: (err) => {
setPaidError(true);
}
}).render(paypal.current)
}, [])
Sounds like that card was declined for the purposes of that payment in live and can't be used.听起来该卡因实时付款而被拒绝,无法使用。 Not an integration problem.
不是集成问题。
This is not unusual if paying a ridiculously low amount like $0.01 or doing live test payments to your own account, which are not permitted.如果支付 0.01 美元这样的低得离谱的金额或向您自己的帐户进行实时测试付款,这并不罕见,这是不允许的。 Use the sandbox environment for your own testing.
使用沙盒环境进行您自己的测试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.