-
Notifications
You must be signed in to change notification settings - Fork 69
Release testing instructions for WC Payments 4.6.0
Eduardo Pieretti Umpierre edited this page Aug 12, 2022
·
5 revisions
Ensure no errors occur when changing subscription payment method via UPE checkout more than once in a session.
- Ensure UPE is enabled (using the WCPay dev tools plugin or by enabling Additional Payment Methods).
- Ensure WooCommerce Payments Subscriptions is enabled.
- Create a simple monthly subscription product.
- Purchase the subscription using a standard CC:
4242424242424242
(⚠️ don't use a saved card). - Navigate to My Account -> Subscriptions -> Change Payment.
- Change the subscription payment method to a new card (you can use the same number with a different expiry date) or use a card number below (
⚠️ don't use a saved card): - Change the payment again to a new card as per step 5 & 6.
- Confirm that the second payment method change has been successful.
- Follow the normal checkout flow(both UPE and non UPE) for an existing customer.
- Ensure there is a scheduled action created as
wcpay_update_customer_with_order_data
in Scheduled Actions (Tools > Scheduled Actions) - Run the action and ensure there are no errors, additionally check logs to ensure a POST
wcpay/customers/{{customer_id}}
call was made (check WP-Admin > WooCommerce > Status > Logs and there should be a log for WooCommerce Payments with today's date)
- Perform an order on your test shop
- Open Payments > Transactions
- Click on the transaction that you have just made
- It should load the page correctly with all the payment details
- In Network tab on your browser's inspector (You may need to refresh the page after opening the inspector)
- You can filter the requests by "Fetch/XHR" – it will be easier to identify the requests
- A
/charges/ch_***
request should not exist - A
/payment_intents/pi_***
request should exist and its response object should have the following structure:
Payment intent structure
{
"id":"pi_mock",
"amount":5400,
"currency":"USD",
"charge":{
"id":"ch_mock",
"amount":5400,
"created":1660064443,
"payment_method_details":{},
"payment_method":"pm_mock",
"amount_captured":5400,
"amount_refunded":0,
"application_fee_amount":187,
"balance_transaction":{},
"billing_details":{},
"currency":"usd",
"dispute":null,
"disputed":false,
"order":{},
"outcome":{},
"paid":true,
"paydown":null,
"payment_intent":"pi_mock",
"refunded":false,
"refunds":{},
"status":"succeeded"
},
"created":1660064443,
"customer":"cus_mock",
"metadata":{
"customer_email":"admin@example.com",
"customer_name":"First Name",
"fraud_prevention_data_available":"1",
"fraud_prevention_data_shopper_ip_hash":"hash",
"fraud_prevention_data_shopper_ua_hash":"hash",
"order_id":"order_id",
"order_key":"order_key",
"order_number":"order_number",
"payment_type":"single",
"site_url":"http:\/\/wcpay.test"
},
"payment_method":"pm_mock",
"status":"succeeded"
}