app/controllers/spree/admin/payments_controller.rb in spree_backend-2.0.10 vs app/controllers/spree/admin/payments_controller.rb in spree_backend-2.0.11

- old
+ new

@@ -30,20 +30,18 @@ end if @order.completed? @payment.process! flash[:success] = flash_message_for(@payment, :successfully_created) - - redirect_to admin_order_payments_path(@order) else #This is the first payment (admin created order) until @order.completed? @order.next! end flash[:success] = Spree.t(:new_order_completed) - redirect_to edit_admin_order_url(@order) end + redirect_to admin_order_payments_path(@order) rescue Spree::Core::GatewayError => e flash[:error] = "#{e.message}" redirect_to new_admin_order_payment_path(@order) end end