Skip to content

Release testing instructions for WC Payments 5.3.0

Dat Hoang edited this page Dec 24, 2022 · 4 revisions

Store order ID to session, check it before update/create_confirm intents PR #5247

This PR primary aim is to prevent creating duplicate orders.

Setup

  • 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) and 4000002760003184 (3DS).

Test cases:

Please test 4 scenarios:

  • Non-UPE flow, classic checkout.
  • Non-UPE flow, block checkout.
  • UPE flow, classic checkout.
  • UPE flow, block checkout.

Testing steps

  • 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 order xyz should be changed to Processing/Paid.

  • Go back to the checkout tab, attempt to make another payment.

  • Get redirected to order-received page of order xyz with this parameter wcpay_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 ID abc is different from xyz and usually bigger than xyz.

  • Visit http://test-site.url/?dump_session - confirm that Nothing stored.

After finishing all tests

Remove or deactivate the snippet added in the Setup step.

Clone this wiki locally