Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amazon Pay ECE: fix payment method issues for subscriptions #4008

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

annemirasol
Copy link
Contributor

@annemirasol annemirasol commented Mar 4, 2025

Fixes #3938

Changes proposed in this Pull Request:

This PR fixes two issues that currently prevent renewal for subscriptions purchased with Amazon Pay:

  • Issue 1: the payment method is not getting attached because payment_method_options was defined for card instead of amazon_pay
  • Issue 2: we were not storing the payment method ID and customer ID in the subscription meta

Testing instructions

  1. Install Subscriptions, and add a subscription product.
  2. Turn on the feature flag for Amazon Pay by:
    • adding _wcstripe_feature_amazon_pay with a value of yes to your wp_options table, or
    • forcing the is_amazon_pay_available() function to return true
  3. Enable Amazon Pay as a payment method.
  4. As a shopper, purchase a subscription using Amazon Pay.
    • If you do not yet have an Amazon Pay sandbox account, the ECE payment modal will let you create one on the spot, using a valid email.
  5. Go to the Stripe dashboard customers page for your shopper, and under "Payment Methods", verify that the Amazon Pay payment method was successfully attached.
  6. Go to the subscription page and process a renewal. Verify that the renewal order succeeds.

  • Covered with tests (or have a good reason not to test in description ☝️)
  • Tested on mobile (or does not apply)

Changelog entry

  • This Pull Request does not require a changelog entry. (Comment required below)
Changelog Entry Comment

Comment

Post merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Amazon Pay: Subscription renewal failure.
1 participant