diff --git a/app/controllers/spree/checkout_controller_decorator.rb b/app/controllers/spree/checkout_controller_decorator.rb index 6b3e5cd..e7b78a8 100644 --- a/app/controllers/spree/checkout_controller_decorator.rb +++ b/app/controllers/spree/checkout_controller_decorator.rb @@ -192,7 +192,12 @@ def paypal_finish private def asset_url(_path) - URI::HTTP.build(:path => ActionController::Base.helpers.asset_path(_path), :host => Spree::Config[:site_url].strip).to_s + host = Spree::Config[:site_url].strip + unless host.match /https?:\/\// + host = "http://#{host}" + end + uri = URI.parse(host) + URI::HTTP.build(:path => ActionController::Base.helpers.asset_path(_path), :host => uri.host, :port => (uri.port || 80)).to_s end def record_log(payment, response)