-
Notifications
You must be signed in to change notification settings - Fork 68
Release testing instructions for WC Payments 5.3.0
Store order ID to session, check it before update/create_confirm intents PR #5247
This PR primary aim is to prevent creating duplicate orders.
-
Add this snippet to your site https://gist.github.com/htdat/8971b603ea0ab4fe07474a7a7b30000c. You can add it with plugin Code Snippets or directly to the bottom of file
woocommerce-payments.php
in the plugin file. Remember to remove the first line<?php
; otherwise, it can create a fatal error. This snippet has two purposes:- (1) Stimulate errors that customers can face when trying to check out an order.
- (2) Display the current session value for
wcpay_processing_order
at http://test-site.url/?dump_session
-
Log into an existing account.
-
When you're asked to make a payment, please randomly choose between two testing cards:
4242424242424242
(basic) and4000002760003184
(3DS).
Please test 4 scenarios:
- Non-UPE flow, classic checkout.
- Non-UPE flow, block checkout.
- UPE flow, classic checkout.
- UPE flow, block checkout.
-
Add some products to the cart, visit to the checkout page.
-
Open a new tab, visit http://test-site.url/?dump_session. Confirm that
Nothing stored
. -
Make a payment in the checkout page.
-
See an error due to our snippet
- For non-UPE flow: See an error in the checkout page.
- For UPE flow: see that the maybe_process_upe_redirect process was interrupted.
-
Visit this tab again http://test-site.url/?dump_session - it should display the progressing order_id, e.g.
xyz
. -
Open another tab, check in WP Admin -> Orders, this progressing order_id
xyz
is precisely the newest order. After a while, this orderxyz
should be changed toProcessing/Paid
. -
Go back to the checkout tab, attempt to make another payment.
-
Get redirected to
order-received
page of orderxyz
with this parameterwcpay_paid_for_previous_order=yes
, which includes a blue notice message, something like this screenshot. -
Check this order
xyz
in WP Admin, see a note like this:WooCommerce Payments: detected and deleted order ID abc, which has duplicate cart content with this order.
. Order IDabc
is different fromxyz
and usually bigger thanxyz
. -
Visit http://test-site.url/?dump_session - confirm that
Nothing stored
.
Remove or deactivate the snippet added in the Setup
step.
Check intent attached to order before processing payment PR #5346
- Add this snippet to your site https://gist.github.com/htdat/6a52eec1be77b8442ac05401908a3627 (Note: this one is slighly different from the snippet in PR 5247). You can add it with plugin Code Snippets or directly to the bottom of file
woocommerce-payments.php
in the plugin file. Remember to remove the first line<?php
; otherwise, it can create a fatal error. This snippet tries to stimulate errors that customers can face when trying to check out an order. - When you're asked to make a payment, please randomly choose between two testing cards:
4242424242424242
(basic) and4000002760003184
(3DS).
Before starting the test, please try to edit woocommerce-payments.php
with this diff https://gist.github.com/htdat/09eef1ed0cbeec50a5354ca8da38d623
If that's not possible, please use only 3DS card when testing non-UPE flow.
Please test 4 scenarios:
- Non-UPE flow, classic checkout.
- Non-UPE flow, block checkout.
- UPE flow, classic checkout.
- UPE flow, block checkout.
- Add some products, visit to the checkout page.
- Try to make an payment in the checkout page.
- See an error due to our snippet (trying to replicate potential issues that real customers can get).
- See this order (usually the newest order) in WP Admin > Order, confirm that it has not been paid.
- Try to make another payment again.
- Get redirected to
order-received
page of this order with this parameterwcpay_previous_successful_intent=yes
, like this screenshot.
Remove or deactivate the snippet added in the Setup
step.