mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Notify bugsnag and execute post checkout actions (reset to cart state) whenever there's a payment gateway exceeption raised
This commit is contained in:
@@ -254,6 +254,9 @@ class CheckoutController < Spree::StoreController
|
||||
end
|
||||
|
||||
def rescue_from_spree_gateway_error(error)
|
||||
Bugsnag.notify(error)
|
||||
checkout_failed
|
||||
|
||||
flash[:error] = t(:spree_gateway_error_flash_for_checkout, error: error.message)
|
||||
# This can also happen during the edit action
|
||||
# but the response needed here is the same as when the update action fails
|
||||
|
||||
Reference in New Issue
Block a user