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

Split upe w' deferred intent - don't display APMs on classic checkout while auth and capture is enabled #2924

Merged
merged 6 commits into from
Feb 21, 2024

Conversation

james-allan
Copy link
Contributor

Fixes #2923

Changes proposed in this Pull Request:

When you enable authorize and capture in the Stripe plugin settings, a modal pops up to explain that only card payments will be available while using auth and capture.

This works as expected on the block checkout, however it doesn't on the classic checkout. All APMS were being shown even though auth and capture were enabled.

Screenshot 2024-02-20 at 11 35 12 am Screenshot 2024-02-20 at 11 42 21 am

This PR fixes that.

Testing instructions

  1. Under WooCommerce > Settings > General, set the store currency to EUR
  2. Under the Stripe Payment methods tab, enable all available APMs.
  3. Under the Stripe Settings tab, enable the Updated Checkout Experience and the 'authorization on checkout, and capture later' setting.
  4. As a shopper, add a product to your cart and go to the classic checkout.
    • On the add/deferred-intent branch notice all APMs are displayed.
    • On the this branch only cards are shown.
  5. Turn off authorize and capture and all payment methods should be now shown again.

  • Covered with tests (or have a good reason not to test in description ☝️)
  • Added changelog entry in both changelog.txt and readme.txt (or does not apply)
  • Tested on mobile (or does not apply)

Post merge

@james-allan james-allan requested review from a team and wjrosa and removed request for a team February 20, 2024 02:39
Copy link
Contributor

@mattallan mattallan left a comment

Choose a reason for hiding this comment

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

Thanks @james-allan for the PR. The code changes look good to me and tests well. I just made a small suggestion on the inline comment to clarify how the UPE gateway function is called.

  • With Authorize and Capture enabled 👍
develop fix/2923
image image
  • With capture immediately 👍

image

Co-authored-by: Matt Allan <matttallan@gmail.com>
@james-allan james-allan merged commit 4665591 into add/deferred-intent Feb 21, 2024
32 checks passed
@james-allan james-allan deleted the fix/2923 branch February 21, 2024 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants