-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add Pay for Order support in ECE #8994
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: +293 B (0%) Total Size: 1.26 MB
ℹ️ View Unchanged
|
cc36642
to
62083f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes are looking good and testing well.
I left a few nit comments, but there were two we may want to handle before merging:
- Unintentionally left behind comment.
- Duplicate code that we may be able to de-duplicate for easier maintenance. This one might be optional.
Testing Instructions
- 🟢 Regression test: Payment request buttons work as expected when ECE is disabled.
- 🟢 Regression test: Checkout with ECE still works in the standard flows.
- 🟢 Regression test: Regular checkout works when no express checkout payment method is active.
- 🟢 Test: Checkout with ECE in Pay for Order works with WooPay disabled.
- 🟢 Test: Checkout with ECE in Pay for Order works with WooPay enabled.
- 🟢
npm run test:js
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look good and test well.
Testing Instructions
- 🟢 Regression test: Payment request buttons work as expected when ECE is disabled.
- 🟢 Regression test: Checkout with ECE still works in the standard flows.
- 🟢 Regression test: Regular checkout works when no express checkout payment method is active.
- 🟢 Test: Checkout with ECE in Pay for Order works with WooPay disabled.
- 🟢 Test: Checkout with ECE in Pay for Order works with WooPay enabled.
- 🟢
npm run test:js
andnpm run test:php
.
Note: For the test Regression test: Payment request buttons work as expected when ECE is disabled
, I was not able to get the PRBs to load due to the issue reported here:
- p1719971520784039-slack-CU6SYV31A
However, I got things to work as intended by checking out to the commit right before.
Fixes #8869.
Changes proposed in this Pull Request
This PR is getting the Express Checkout Elements (ECE) rendered in the Pay for Order flow and introducing the payment processing implementation for the same flow.
Testing instructions
Important
This has been tested using Google Pay since it is currently difficult to test Apple Pay due to Apple Pay's requirements for test cards.
Important
You must test these changes on a public facing URL using HTTPS. Use something like Jurassic Tube or ngrok to create a tunnel to your local environment.
Setup
Ensure ECE is disabled by setting the
_wcpay_feature_stripe_ece
option to0
.Regression test: Payment request buttons work as expected when ECE is disabled
Regression test: Checkout with ECE still works in the standard flows
_wcpay_feature_stripe_ece
option to1
.Regression test: Regular checkout works when no express checkout payment method is active
Test: Checkout with ECE in Pay for Order works with WooPay disabled
Test: Checkout with ECE in Pay for Order works with WooPay enabled
npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge