set completed_at
This commit is contained in:
parent
4b1def8643
commit
3d5af5bdaf
|
@ -147,7 +147,8 @@ module Spree
|
||||||
Rails.logger.error ppx_auth_response.to_yaml
|
Rails.logger.error ppx_auth_response.to_yaml
|
||||||
end
|
end
|
||||||
|
|
||||||
@order.update_attribute(:state, "complete")
|
@order.update_attributes({:state => "complete", :completed_at => Time.now}, :without_protection => true)
|
||||||
|
|
||||||
state_callback(:after) # So that after_complete is called, setting session[:order_id] to nil
|
state_callback(:after) # So that after_complete is called, setting session[:order_id] to nil
|
||||||
|
|
||||||
# Since we dont rely on state machine callback, we just explicitly call this method for spree_store_credits
|
# Since we dont rely on state machine callback, we just explicitly call this method for spree_store_credits
|
||||||
|
|
|
@ -97,6 +97,7 @@ module Spree
|
||||||
|
|
||||||
order.reload
|
order.reload
|
||||||
order.state.should == "complete"
|
order.state.should == "complete"
|
||||||
|
order.completed_at.should_not be_nil
|
||||||
order.payments.size.should == 1
|
order.payments.size.should == 1
|
||||||
order.payment_state.should == "paid"
|
order.payment_state.should == "paid"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue