happypixels / laravel-shopr

A developer-friendly e-commerce foundation for your Laravel app
https://laravel-shopr.happypixels.se
MIT License
208 stars 19 forks source link

If a transaction fails, the cart should not be cleared and no order should be created #19

Closed mattias-persson closed 5 years ago

mattias-persson commented 5 years ago

Describe the bug In the checkout process, if the transaction fails (for example due to insufficient funds), the cart will still be cleared and the order will be created with the payment_status 'pending'. No order should be created and the cart should still be there, in order to reattempt the checkout.

To Reproduce Steps to reproduce the behavior:

  1. Make sure you have too little money left on your card. This can only be reproduced with the live environment.
  2. Run the checkout process. The cart will be cleared and order created even though the checkout fails.