diff --git a/app/controllers/spree/checkout_controller_decorator.rb b/app/controllers/spree/checkout_controller_decorator.rb index b4046e9..29175a1 100644 --- a/app/controllers/spree/checkout_controller_decorator.rb +++ b/app/controllers/spree/checkout_controller_decorator.rb @@ -252,7 +252,7 @@ module Spree end opts = { :return_url => paypal_confirm_order_checkout_url(order, :payment_method_id => payment_method), - :cancel_return_url => edit_order_url(order), + :cancel_return_url => edit_order_checkout_url(order, :state => :payment), :order_id => order.number, :custom => order.number, :items => items, diff --git a/spec/controllers/checkout_controller_spec.rb b/spec/controllers/checkout_controller_spec.rb index ef07936..e3619a7 100644 --- a/spec/controllers/checkout_controller_spec.rb +++ b/spec/controllers/checkout_controller_spec.rb @@ -256,7 +256,7 @@ module Spree opts[:shipping].should == (order.ship_total * 100).to_i opts[:return_url].should == spree.paypal_confirm_order_checkout_url(order, :payment_method_id => paypal_gateway.id, :host => "test.host") - opts[:cancel_return_url].should == spree.edit_order_url(order, :host => "test.host") + opts[:cancel_return_url].should == spree.edit_order_checkout_url(order, :state => 'payment', :host => "test.host") opts[:items].size.should > 0 opts[:items].size.should == order.line_items.count