Description
Changes proposed in this Pull Request
This abstracts the payment method list and assignment code from ChangePaymentMethod
into its own component called PaymentMethodSelector
. The primary purpose of this is to enable reusing that component in other payment method forms like AddNewPaymentMethod
.
Part of #48966
Depends on #49057
Testing instructions
- Visit the subscription page for a purchase that already has a payment method assigned.
- Click on the “Change payment method” button.
- Verify that the list of payment methods appears.
- Select the “new” credit card payment method, fill it in, and submit the form.
- Verify that you are redirected to the subscription page with a success message.
- Verify that the new payment method is created and assigned to the subscription.
- Repeat the above steps but select an existing card and verify that everything works as before.
Unfortunately, no screenshots were provided by the developer.