When a merchant changes their Stripe keys to another account's keys, the new account may not support some of the previously enabled payment methods. This PR forces the reset of the entire payment method list when any key is updated (keeping only the default methods).
Testing instructions
Checkout to this branch on your local test environment (tweak/reset-payment-methods-when-changing-stripe-keys)
Run npm install, npm run build:webpack, npm run up
Add your Stripe keys in settings
Non-UPE
Enable the "Legacy checkout experience" in settings
Enable a bunch of payment methods
Change any key (secret or publishable) to any value
Confirm that all payment methods were disabled
UPE
Disable the "Legacy checkout experience" in settings
Enable a bunch of payment methods
Change any key (secret or publishable) to any value
Confirm that all payment methods were disabled
[x] Covered with tests (or have a good reason not to test in description ☝️)
[x] Added changelog entry in bothchangelog.txt and readme.txt (or does not apply)
Fixes #2468
Changes proposed in this Pull Request:
When a merchant changes their Stripe keys to another account's keys, the new account may not support some of the previously enabled payment methods. This PR forces the reset of the entire payment method list when any key is updated (keeping only the default methods).
Testing instructions
tweak/reset-payment-methods-when-changing-stripe-keys
)npm install
,npm run build:webpack
,npm run up
Non-UPE
UPE
changelog.txt
andreadme.txt
(or does not apply)Post merge