diff --git a/app/controllers/spree/checkout_controller_decorator.rb b/app/controllers/spree/checkout_controller_decorator.rb index 8e78ef4..7227ad7 100644 --- a/app/controllers/spree/checkout_controller_decorator.rb +++ b/app/controllers/spree/checkout_controller_decorator.rb @@ -145,14 +145,8 @@ module Spree Rails.logger.error ppx_auth_response.to_yaml end - #need to force checkout to complete state - until @order.state == "complete" - if @order.next! - @order.update! - state_callback(:after) - end - end - + @order.update_attribute(:state, "complete") + @order.finalize! flash[:notice] = I18n.t(:order_processed_successfully) redirect_to completion_route