Restore payment error feedback

This commit is contained in:
Maikel Linke
2020-01-23 16:19:56 +11:00
parent 6763012ee9
commit bd67d63b63

View File

@@ -68,6 +68,9 @@ class CheckoutController < Spree::CheckoutController
render json: { path: order_path(@order) }, status: :ok
end
end
rescue Spree::Core::GatewayError => error
# This is done for all actions in the Spree::CheckoutController.
rescue_from_spree_gateway_error(error)
rescue StandardError => error
Bugsnag.notify(error)
flash[:error] = I18n.t("checkout.failed")