Fix require directory
This commit is contained in:
parent
6e6b553313
commit
16ff366534
|
@ -127,7 +127,7 @@ module Spree
|
||||||
payment = @order.payments.create(
|
payment = @order.payments.create(
|
||||||
:amount => ppx_auth_response.params["gross_amount"].to_f,
|
:amount => ppx_auth_response.params["gross_amount"].to_f,
|
||||||
:source => paypal_account,
|
:source => paypal_account,
|
||||||
:source_type => 'PaypalAccount',
|
:source_type => 'Spree::PaypalAccount',
|
||||||
:payment_method_id => params[:payment_method_id],
|
:payment_method_id => params[:payment_method_id],
|
||||||
:response_code => ppx_auth_response.params["ack"],
|
:response_code => ppx_auth_response.params["ack"],
|
||||||
:avs_response => ppx_auth_response.avs_result["code"])
|
:avs_response => ppx_auth_response.avs_result["code"])
|
||||||
|
@ -255,9 +255,9 @@ module Spree
|
||||||
credits_total = credits.map {|i| i[:amount] * i[:quantity] }.sum
|
credits_total = credits.map {|i| i[:amount] * i[:quantity] }.sum
|
||||||
end
|
end
|
||||||
|
|
||||||
opts = { #:return_url => request.protocol + request.host_with_port + "/orders/#{order.number}/checkout/paypal_confirm?payment_method_id=#{payment_method}",
|
opts = { #:return_url => request.protocol + request.host_with_port + "/spree/orders/#{order.number}/checkout/paypal_confirm?payment_method_id=#{payment_method}",
|
||||||
:return_url => "http://" + request.host_with_port + "/orders/#{order.number}/checkout/paypal_confirm?payment_method_id=#{payment_method}",
|
:return_url => "http://" + request.host_with_port + "/spree/orders/#{order.number}/checkout/paypal_confirm?payment_method_id=#{payment_method}",
|
||||||
:cancel_return_url => "http://" + request.host_with_port + "/orders/#{order.number}/edit",
|
:cancel_return_url => "http://" + request.host_with_port + "/spree/orders/#{order.number}/edit",
|
||||||
:order_id => order.number,
|
:order_id => order.number,
|
||||||
:custom => order.number,
|
:custom => order.number,
|
||||||
:items => items,
|
:items => items,
|
||||||
|
@ -272,7 +272,7 @@ module Spree
|
||||||
if stage == "checkout"
|
if stage == "checkout"
|
||||||
opts[:handling] = 0
|
opts[:handling] = 0
|
||||||
|
|
||||||
opts[:callback_url] = "http://" + request.host_with_port + "/paypal_express_callbacks/#{order.number}"
|
opts[:callback_url] = "http://" + request.host_with_port + "/spree/paypal_express_callbacks/#{order.number}"
|
||||||
opts[:callback_timeout] = 3
|
opts[:callback_timeout] = 3
|
||||||
elsif stage == "payment"
|
elsif stage == "payment"
|
||||||
#hack to add float rounding difference in as handling fee - prevents PayPal from rejecting orders
|
#hack to add float rounding difference in as handling fee - prevents PayPal from rejecting orders
|
||||||
|
|
|
@ -10,7 +10,7 @@ module SpreePaypalExpress
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.activate
|
def self.activate
|
||||||
Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c|
|
Dir.glob(File.join(File.dirname(__FILE__), "../../app/**/*_decorator*.rb")) do |c|
|
||||||
Rails.env.production? ? require(c) : load(c)
|
Rails.env.production? ? require(c) : load(c)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue