duncanmcclean / simple-commerce

A simple, yet powerful e-commerce addon for Statamic.
https://statamic.com/addons/duncanmcclean/simple-commerce
Other
147 stars 41 forks source link

Check stock before redirecting to off-site gateways #847

Closed duncanmcclean closed 1 year ago

duncanmcclean commented 1 year ago

This pull request fixes #842 by checking the stock of line items before redirecting users to off-site gateways, like Mollie.

Previously, if one of the products didn't have enough stock to fulfil the order, the customer would still be redirected to the payment gateway. Simple Commerce would then error in the webhook causing the order to never be marked as paid.

This has been fixed in v5.0 in #843 as part of some other changes so this PR fixes the issue for v4.

github-actions[bot] commented 1 year ago

Released as part of v4.5.6.