In the Paypal live smart buttons testing tool, Paypal allows users to convert the default currency into local currency (INR). When I complete a transaction generated by the credit card generator tool, the transaction is processed.
https://developer.paypal.com/demo/checkout/#/pattern/mark
But when I test the same code in my app, I can't accept payments in currencies other than the currency I set in the Paypal SDK script URL (The sandbox account's merchant location is India). https://www.paypal.com/sdk/js?client-id=sb¤cy=USD
Paypal displays the following error when I enter the visa card details in the form and click the submit button:
"We aren't able to process your payment using your PayPal account at this time. Please go back to the merchant and try using a different payment method."
Sample code:
purchase_units: [{
amount: {
value: '40'
}
}],
This happens when I test the gateway live and in sandbox mode. I've linked my Paypal business sandbox account to the developer account. Also, I have added multiple currencies to the sandbox and PayPal business account. I've also changed the Block payments settings "Allow payments sent to me in a currency I do not hold:" option to "Yes, accept and convert them to U.S. Dollars. Additional charges apply".
How can I accept payments from multiple currencies in my web application or how I can make PayPal display the currency converter/convert currency automatically as displayed in its example? https://developer.paypal.com/demo/checkout/#/pattern/mark
... View more