Browse Source

Fix calls for spree root url. [fix #102]

1-2-stable-sysmocom
Jeff Dutil 9 years ago
parent
commit
00b170eed2
  1. 4
      app/controllers/spree/checkout_controller_decorator.rb
  2. 7
      spec/support/url_helpers.rb

4
app/controllers/spree/checkout_controller_decorator.rb

@ -320,7 +320,7 @@ module Spree
if stage == "checkout"
opts[:handling] = 0
opts[:callback_url] = spree_root_url + "paypal_express_callbacks/#{order.number}"
opts[:callback_url] = spree.root_url + "paypal_express_callbacks/#{order.number}"
opts[:callback_timeout] = 3
elsif stage == "payment"
#hack to add float rounding difference in as handling fee - prevents PayPal from rejecting orders
@ -353,7 +353,7 @@ module Spree
end
{
:callback_url => spree_root_url + "paypal_shipping_update",
:callback_url => spree.root_url + "paypal_shipping_update",
:callback_timeout => 6,
:callback_version => '61.0',
:shipping_options => shipping_default

7
spec/support/url_helpers.rb

@ -1,7 +0,0 @@
module Spree
module UrlHelpers
def spree
Spree::Core::Engine.routes.url_helpers
end
end
end
Loading…
Cancel
Save