-
Notifications
You must be signed in to change notification settings - Fork 207
Release testing instructions for the WooCommerce Stripe payment gateway 5.4.0
Kristófer Reykjalín edited this page Aug 10, 2021
·
5 revisions
- Ensure payment dialog won't ask for Shipping details when no Shipping Zones are defined
- Ensure an order with a custom order status is updated properly during payment processing
- Make sure Payment Request Buttons is enabled on Stripe. You can enable Payment Request Buttons in the WooCommerce > Settings > Payments > Stripe > Payment Request Buttons save settings.
- Go to WooCommerce > Settings > Shipping and make sure the Shipping zones section is empty.
- Create a simple product. Add a price. Just make sure the product is not virtual.
- Navigate to the product page.
- Make sure the PRB is visible. Click PRB.
- Make sure the Payment modal (Google Pay or Apple Pay) does not ask for a Shipping Address.
Note: Webhooks must be configured correctly for the testing to work correctly.
Note: You must install the WooCommerce Blocks plugin for the Draft order status to be available.
- Make sure payments are captured immediately by going to WooCommerce > Settings > Payments > Stripe – Credit Card (Stripe), make sure Capture is toggled on, and click Save changes.
- Install and activate the Code Snippets plugin.
- Go to Snippets > Add new
- Copy the following snippet into the Code text area. You can choose any name you want.
function add_draft_to_allowed_payment_processing_statuses( $statuses ) {
if ( ! in_array( 'checkout-draft', $statuses ) ) {
$statuses[] = 'checkout-draft';
}
return $statuses;
}
add_filter( 'wc_stripe_allowed_payment_processing_statuses', 'add_draft_to_allowed_payment_processing_statuses' );
- Make sure Run snippet everywhere is toggled
- Click Save changes and activate
- Go to WooCommerce > Orders and click Add Order
- Set the order status to Draft
- Select the customer for your current account — or any account you have access to on your site. The customer details should be filled in automatically.
- Click Add item(s) followed by Add product(s) and add any product to the order.
- Click Create
- Click Customer payment page
- Pay for the order with a 3DS card:
4000000000003220
- Go back to the order details page
- Make sure the order status has changed to Processing (or completed for digital orders).
- Turn off immediate payment capture by going to WooCommerce > Settings > Payments > Stripe – Credit Card (Stripe), make sure Capture is toggled off, and click Save changes.
- Repeat steps 2-14 (create a draft order, pay through the Customer payment page page)
- Make sure the order status has changed to On hold.
- Make sure there is a note that starts with
Stripe charge authorized (Charge ID: ch_xyz).
- Change the payment status to Processing
- Make sure a note has appeared that says
Stripe charge complete (Charge ID: ch_3JKqQ7KFePZ3MR450VtiEw3i)
Repeat these testing instructions with the following conditions:
- Use a non-3DS card and make sure everything behaves the same.
- Add a product to the draft order that has stock and make sure the stock management behaves in the following ways:
- Stock is not reduced when the order is created (after step 11)
- (For immediate capture) stock is reduced after payment (after step 13)
- (For manual capture) stock is reduced after authorization (after step 20)
- Tip: To add stock to a product go to Products, select any product, go to Inventory, toggle Manage stock? on, change Stock quantity to a positive number, and click Update.