-
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
Implement payments via Express Checkout Element for Simple Products on the Product Page #8937
Conversation
@asumaran As noted from #8914, the checkout from the product page didn't work for me. I figured out why: In case the fraud prevention service is enabled for the account, I guess we're not passing the token correctly here, so it throws this error:
If I comment out that check I can proceed with the checkout. |
Just to add to the above comment. I'm also having problems checking out with a saved card while the fraud prevention service is enabled, so this is either a problem with my local environment or a more general issue. |
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 comments we may want to address before merging.
Testing Instructions
- ✅ Pay using Google Pay. All tests passed.
- ✅ Pay using Apple Pay. All tests passed.
- ✅
npm run test:js
andnpm run test:php
.
includes/express-checkout/class-wc-payments-express-checkout-ajax-handler.php
Outdated
Show resolved
Hide resolved
@ricardo, I was able to see the bug, too. |
@bborman22 I was referring to the bug while the prevention service is enabled for the site. I didn't test with saved cards but I assume we'll have the same results. |
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 LGTM 👍
@bborman22 @ricardo I've created an issue for the issue we have with ECE and the Card Testing Protection Service. #8981 |
@bborman22 @ricardo ^ I'm fixing #8981 in #8987. The fix was pretty straightforward 59f8f33 |
Fixes #8868
Changes proposed in this Pull Request
Implements payments using the Express Checkout Elements API.
This feature is behind the
_wcpay_feature_stripe_ece
flag.Testing instructions
Note that the changes on this PR are the same as #8914. So, please make sure to follow the setup instructions before starting to test this PR.
Testing on this PR must focus on the product page for simple products only.
Note
There shouldn't be any problem with testing Google Pay or Apple Pay using your own credit card. Just make sure the site is in test mode.
Visit the product page for a simple product then:
Pay using Google Pay
Pay using Apple Pay
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