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: add payment method class #4015

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

annemirasol
Copy link
Contributor

@annemirasol annemirasol commented Mar 5, 2025

Part of #3859

Changes proposed in this Pull Request:

As part of supporting subscriptions and payment tokens for Amazon Pay, this PR introduces Amazon Pay's own payment method class, i.e. WC_Stripe_UPE_Payment_Method_Amazon_Pay.

Succeeding PRs will:

  • update Amazon Pay setting controls to to turn the feature on and off by adding and removing it as an enabled payment method, similar to how we do Link
  • update the Amazon Pay express checkout element to use amazon_pay (instead of stripe) as the payment method
  • add code for supporting automatic subscription renewals, which include creating payment tokens for Amazon Pay(i.e. saved payment methods).

Testing instructions

The new payment method will be used in succeeding PRs. This PR should not introduce any changes in behavior.

  1. Keep an eye on the browser console and error logs while testing.
  2. Smoke test possible regressions by:
    • purchasing a simple product using any non-Amazon Pay method.
    • purchasing a simple product using Amazon Pay.
    • visiting the Stripe Payment Methods page in wp-admin, and making sure everything loads correctly.

  • 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

@annemirasol annemirasol force-pushed the add/amazon-pay-payment-method branch from c710dc2 to 54677c0 Compare March 5, 2025 22:58
@annemirasol annemirasol marked this pull request as ready for review March 5, 2025 23:05
@annemirasol annemirasol force-pushed the add/amazon-pay-payment-method branch 5 times, most recently from 23057d3 to ffb17cd Compare March 6, 2025 17:18
@annemirasol annemirasol force-pushed the add/amazon-pay-payment-method branch from ffb17cd to 82bc8c6 Compare March 6, 2025 17:47
@annemirasol annemirasol self-assigned this Mar 6, 2025
@annemirasol annemirasol requested review from a team and hsingyuc and removed request for a team March 6, 2025 22:26
@annemirasol annemirasol force-pushed the add/amazon-pay-payment-method branch from 82bc8c6 to fcf70df Compare March 7, 2025 18:53
@annemirasol annemirasol force-pushed the add/amazon-pay-payment-method branch from 6428bcc to a8bccba Compare March 10, 2025 18:58
Copy link
Contributor

@hsingyuc hsingyuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@annemirasol, have you seen this error before? I can't checkout with Amazon Pay.
Screenshot 2025-03-10 at 5 16 57 PM

@annemirasol
Copy link
Contributor Author

@annemirasol, have you seen this error before? I can't checkout with Amazon Pay.

@hsingyuc I talked to Stripe support on Discord yesterday, because Amazon Pay was missing despite being enabled, and they told me they were having issues with Amazon Pay not working properly yesterday, so they took it down temporarily. This might be one of the issues.

Anyway, I checked just now and everything seems to be working fine!

@annemirasol annemirasol requested a review from hsingyuc March 12, 2025 15:48
Copy link
Contributor

@hsingyuc hsingyuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@annemirasol, good work!
✅ No console error
✅ Smoke tests are as expected

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.

2 participants