问题
I am trying to integrate [react-paypal-button-v2][1] in my react app but after filling the details it is showing Something went wrong
<PayPalButton
amount="0.01"
onSuccess={(details, data) => {
console.log(details,"data")
alert("Transaction completed by " + details.payer.name.given_name);
// OPTIONAL: Call your server to save the transaction
// return fetch("/paypal-transaction-complete", {
// method: "post",
// body: JSON.stringify({
// orderID: data.orderID
// })
// });
}}
catchError={(err)=>{
console.log(err)
alert(err)
}
}
onError ={(err)=>{
alert(err)
console.log(err)
}
}
options={{
clientId: "xxxxxx"
}}
/>
this is first screen shot once page load [![enter image description here][2]][2]
this is the second screen shot when I click on mastercard option [![enter image description here][3]][3]
and this is third screen shot when I click on pay now button then its shwo processing but after sometime its show me this page.
[![enter image description here][4]][4]
If click on try again button its redirect to the sandbox and ask for singup
[![enter image description here][5]][5]
I have not integrated any payment getaway in any app so far, that's why I am not able to figure it out that what might cause of it, why its throwing error.
Please your help would be highly appreciated
Thanks in Advance.
来源:https://stackoverflow.com/questions/58448782/unable-to-integrated-react-paypal-button-v2-in-react-app