1

is there a way to change the currency in the paypal button script?

<script src="https://www.paypal.com/sdk/js?client-id=sb&currency="<Currencyid=sb&currency="<Currency Code"></script>

I want it to dynamically change the currency code depending on what currency our page captures. we are using the stepper so it is only a single page where both the currency is selected and the script is rendered.

apollosoftware.org
  • 11,878
  • 4
  • 43
  • 64
Reub
  • 101
  • 1
  • 10
  • When the user changes their desired currency, perhaps you can [reinject the script](https://stackoverflow.com/questions/8578617/inject-a-script-tag-with-remote-src-and-wait-for-it-to-execute)? – msanford Jun 13 '19 at 01:05
  • FYI you misspelled currency -> https://www.paypal.com/sdk/js?client-id=sb&currency=USD I changed it for you up there. – apollosoftware.org Jun 13 '19 at 01:05
  • 1
    Related (though currently unanswered, a more elaborated question): https://stackoverflow.com/questions/56142863/paypal-sdk-how-to-change-currency-dynamically-without-reinjecting-and-reinitial – msanford Jun 13 '19 at 01:05
  • sorry for the errors. thanks! – Reub Jun 13 '19 at 02:00

0 Answers0