-
Notifications
You must be signed in to change notification settings - Fork 69
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. This snippet have 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.