What happens when a customer closes the page after paying
An order should be confirmed even after the customer leaves the website.
The payment provider can send confirmation directly to the store’s server. The order is marked as paid once the server verifies the notification and matches the amount and currency to the order.
Test turning off the phone after payment. Repeat the confirmation and check that the stock update and purchase notification are processed only once.
Worked example
Use a test order with a known amount and currency. Match both against the confirmation before changing the order status.
How to test it
Test rejection, successful payment with the browser closed and a repeated notification for the same payment.
Expected result
Only the successful payment changes the status, and a retry does not send a second customer confirmation.