-
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
Add support for Oxxo & Boleto payments via the Block checkout #2840
Add support for Oxxo & Boleto payments via the Block checkout #2840
Conversation
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.
Hey @james-allan!
I think I'm doing something wrong here, the shortcode checkout works fine, but with the blocks checkout no voucher is displayed for either Boleto or OXXO the form stays disabled, with no error in the console, and the network request succeded:


Also, the checkbox: Save payment information to my account for future purchases.
should not be present for Boleto... if you check it and try to pay for the order the correct message is displayed: This payment method cannot be saved for future use.
but I think we should hide the checkbox.
hmm ok. I'll have a look into it. Locally the modal pops up after a second. Boleto.movI'll start a JN site to rule out any local variation. FWIW, on my local site it's this |
…he blocks_checkout
I set up a fresh JN site and uploaded a built version of this branch and the voucher was still displayed to me. As I mentioned above the voucher is supposed to be displayed via this maybeConfirmVoucherPayment() function. @diegocurbelo can you confirm if that function is running for your or if that file is loaded? |
@james-allan I've been able to replicate the issue @diegocurbelo was having by going to WC > Settings > Advanced and setting the checkout page to a classic/shortcode checkout page, but then when testing manually go to a checkout block page. I wasn't getting the boleto pop-up. Then after I updated the checkout page in WC settings to a checkout block page, the voucher pop-up started working 🤔 I need to do some digging to see what might be causing this but I wanted to share this first incase you might have a clue |
Ah nice find. I did have a similar issue back while working on #2784. IIRC I was able to fix that by updating the With this new information about using a separate checkout page, I've been able to replicate it too so I'll have a look into it as well. |
@james-allan looks like the problem is just the We could change this line to:
|
Thanks @mattallan. That suggestion works. I pushed that up in 9dbeb91. |
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.
I've tested the latest changes and they look good to me 👍 Thanks @james-allan !
- Checkout blocks
- Classic checkout (confirm any changes didn't break existing functionality)
- With both shortcode and blocks checkout pages set as default checkout.
Fixes #2790
Changes proposed in this Pull Request:
The changes in this PR are pretty small. @mattallan added most of the changes necessary to get Boleto and Oxxo to work on the block checkout page in #2823
Testing instructions
These testing instructions are largely copied from Matt's PR.
Pre-requisites
Testing Boleto
Warning
If this is not a fresh store and you are connecting a different Stripe account, you will need to go into the
usermeta
and delete the row withmeta_key
wp__stripe_customer_id
as the existing customer ID won't exist in the Brazil store.{any_prefix}@{any_domain}
format (i.e. test@example.com)00.000.000/0000-00
into the text box.Boleto error testing
Stripe docs on testing Boleto: https://stripe.com/docs/payments/boleto/accept-a-payment?platform=checkout#test-integration
expire_immediately@example.com
00.000.000/0000-00
00.000.000/0000-00
Testing Oxxo
Testing Oxxo is the same as Boleto above, except you'll need to connect a Stripe account set in Mexico and set your store's currency to Mexican Peso. A few things to note:
expire_immediately@example
so that the vouchers don't expire immediately.Testing APM errors
This PR also fixes error processing when using APMS on the block checkout.
These are some sketchy steps to replicate but the easiest way to see this with APMs is to following these steps:
usermeta
table.wp__stripe_customer_id
add/deferred-intent
branch (base branch) attempt to make a purchase with any payment method other than a card.Something went wrong. Please contact us to get assistance.
error and the follow warning in your error logs.PHP Warning: Undefined array key "redirect" in /plugins/woocommerce/src/StoreApi/Legacy.php on line 68
changelog.txt
andreadme.txt
(or does not apply)Post merge