diff --git a/app/controllers/checkout_controller.rb b/app/controllers/checkout_controller.rb index a784bac015..29e1814e35 100644 --- a/app/controllers/checkout_controller.rb +++ b/app/controllers/checkout_controller.rb @@ -178,6 +178,7 @@ class CheckoutController < ::BaseController if @order.state == "payment" return if redirect_to_payment_gateway + return action_failed if @order.errors.any? return action_failed unless @order.process_payments! end diff --git a/app/services/checkout/stripe_redirect.rb b/app/services/checkout/stripe_redirect.rb index 8759471504..760db74615 100644 --- a/app/services/checkout/stripe_redirect.rb +++ b/app/services/checkout/stripe_redirect.rb @@ -16,7 +16,7 @@ module Checkout payment = payment_authorizer.call!(return_url) - raise if order.errors.any? + return if order.errors.any? stripe_payment_url(payment) end