How can I dynamically change the currency using the PayPal JavaScript SDK?
MarkWaller
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Dec-19-2019
08:09 AM
I want to allow my users to choose the currency they checkout with, but I can't find any way to dynamically change the currency. It seems like it is determined by the currency that you specify when the SDK is loaded i.e.
<script src="https://www.paypal.com/sdk/js?client-id=SB_CLIENT_ID¤cy=GBP">
How do I change it to USD or EUR when the customer selects a different currency?
I have tried specifing it the purchase units definition i.e.
amount: {
currency_code: 'USD',
}
But it seems this used to work with checkout.js but no longer works with the SDK.
I am really stuck, has anyone solved this issue?
Thanks, Mark.
Labels:
Login to Me Too
- Labels:
-
Mobile SDKs
-
PayPal Here SDK
-
REST SDK
0 REPLIES 0
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Change the button from Sandbox to Production in REST APIs
- Enable Pay later without credit in SDKs
- Need Help Upgrading to PayPal complete payments in PayPal Upgrade Community
- API - Change currency when shipping country changes in SDKs
- Can i create subscription and plans directly in JavaScript on the page ? in PayPal Payments Standard