Fix require directory
This commit is contained in:
parent
6e6b553313
commit
16ff366534
|
@ -127,7 +127,7 @@ module Spree
|
|||
payment = @order.payments.create(
|
||||
:amount => ppx_auth_response.params["gross_amount"].to_f,
|
||||
:source => paypal_account,
|
||||
:source_type => 'PaypalAccount',
|
||||
:source_type => 'Spree::PaypalAccount',
|
||||
:payment_method_id => params[:payment_method_id],
|
||||
:response_code => ppx_auth_response.params["ack"],
|
||||
:avs_response => ppx_auth_response.avs_result["code"])
|
||||
|
@ -255,9 +255,9 @@ module Spree
|
|||
credits_total = credits.map {|i| i[:amount] * i[:quantity] }.sum
|
||||
end
|
||||
|
||||
opts = { #:return_url => request.protocol + request.host_with_port + "/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}",
|
||||
:cancel_return_url => "http://" + request.host_with_port + "/orders/#{order.number}/edit",
|
||||
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 + "/spree/orders/#{order.number}/checkout/paypal_confirm?payment_method_id=#{payment_method}",
|
||||
:cancel_return_url => "http://" + request.host_with_port + "/spree/orders/#{order.number}/edit",
|
||||
:order_id => order.number,
|
||||
:custom => order.number,
|
||||
:items => items,
|
||||
|
@ -272,7 +272,7 @@ module Spree
|
|||
if stage == "checkout"
|
||||
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
|
||||
elsif stage == "payment"
|
||||
#hack to add float rounding difference in as handling fee - prevents PayPal from rejecting orders
|
||||
|
|
|
@ -10,7 +10,7 @@ module SpreePaypalExpress
|
|||
end
|
||||
|
||||
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)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue