-
Notifications
You must be signed in to change notification settings - Fork 210
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
ACSS: Refactor unsupported deferred intent in the blocks checkout #3866
base: develop
Are you sure you want to change the base?
Conversation
…merce/woocommerce-gateway-stripe into fix/3804-refactor-deferred-intent
Co-authored-by: César Costa <[email protected]>
Co-authored-by: César Costa <[email protected]>
…merce/woocommerce-gateway-stripe into fix/3804-refactor-deferred-intent
appearance, | ||
paymentMethodCreation: 'manual', | ||
fonts: getFontRulesFromPage(), |
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.
Assigned @cesarcosta99 and @wjrosa as reviewers since this PR is a follow up from #3805. |
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 is good and works as expected! I was able to place an order following the test steps.
One bug I noticed (maybe it is something related to my environment only) is that if I don't provide a phone number I get the following error:
![Screenshot 2025-02-11 at 15 49 21](https://private-user-images.githubusercontent.com/10187816/412123921-bc40daee-2344-42f1-a20b-c88bd9380e2c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MjMzNzAsIm5iZiI6MTczOTYyMzA3MCwicGF0aCI6Ii8xMDE4NzgxNi80MTIxMjM5MjEtYmM0MGRhZWUtMjM0NC00MmYxLWEyMGItYzg4YmQ5MzgwZTJjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDEyMzc1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNkMTYxZWUwODFiNWIxMGIxYTdjMDlmMmM3OTcyN2Q2MTk1NDBlM2U2Njk1N2M0MDNjOTBiNmE5MmI2YzQ4NTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.bWJJs3E35wIuJFFS_GMjobeTJsyq69lUBsodIYRvhl4)
If it is something happening to everyone, we need to make the phone number required for this method.
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 looks good and tests well 🎉 I spotted some issues, though:
- I experienced the same as @wjrosa and get the error
Please provide complete payment details.
when I don't provide a phone number. I tested this in both classic and Blocks checkouts and both errored. We'll likely need to enforce a phone requirement in the forms, maybe not something to address in this PR, but at least something to add to ACSS: Handle Errors and Edge Cases #3830. - When trying to checkout with ACSS in a clean session (e.g. incognito mode), the payment method doesn't display as I fill out the form. Instead, I need to refresh the page to be able to see and select the method. I only experienced this in Blocks checkout:
output.mp4
try { | ||
const response = await api.createIntent( | ||
getBlocksConfiguration()?.orderId, | ||
props.paymentMethodId |
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.
Is paymentMethodId
passed only when deferred intent is not supported? If not, I think it'd look more consistent to destructure it as we're doing with other props.
Fixes #3851
This PR is complementary to #3805.
Changes proposed in this Pull Request:
Testing instructions
Follow testing instructions from #3805, but using the blocks checkout.
changelog.txt
andreadme.txt
(or does not apply)Post merge