Closed DevinWalker closed 2 years ago
@JasonTheAdams the merge conflicts have been resolved for this PR. As well, here's a short video that should provide some context for the features in this update: https://www.loom.com/share/ca459483ecc34e82a51e00178b650634
@JasonTheAdams I didn't know about navigation.language
, which looks like exactly what we want. Thanks for the tip, I'll refactor this now.
Resolves #15 #38 #40
Description
This PR adds support for switching the currency of a donation form from USD to any other Stripe-supported currency.
I have reworked the block's panel options with a new section called "Donation Settings" that now includes the new currency select and donation levels that were previously under "Appearance Settings".
If Stripe does not support the chosen currency an error notice will appear when attempting to move from Step 1 to Step 2 (payment step).
This PR also includes currency formatting using
Intl.NumberFormat
as described in #15I also added support for zero decimal currencies.
Affects
Currency formatting.
Testing Instructions
Other
In the future we'll likely want to trim up the list to only the supported Stripe currencies. They support the vast majority of them though.
As well, RTL languages and currencies are not very well supported. We'll have to tackle that in a separate issue.