Skip to content

Commit

Permalink
fix for spree 2.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
qinghe committed Feb 25, 2014
1 parent 08cdd42 commit e2750e7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions app/controllers/spree/checkout_controller_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,18 @@ def alipay_checkout_payment

private

def load_order_with_alipay_return
def load_order_with_lock_with_alipay_return
if request.referer=~/alipay.com/
payment_return = ActiveMerchant::Billing::Integrations::Alipay::Return.new(request.query_string)
@current_order = retrieve_order(payment_return.order)
end
load_order_without_alipay_return
@current_order = retrieve_order(payment_return.order)
end
load_order_with_lock_without_alipay_return
end
alias_method_chain :load_order, :alipay_return

#because of PR below, load_order is renamed to load_order_with_lock
#https://github.com/spree/spree/commit/45eabed81e444af3ff1cf49891f64c85fdd8d546
alias_method_chain :load_order_with_lock, :alipay_return

def alipay_checkout_hook
#logger.debug "----before alipay_checkout_hook"
#all_filters = self.class._process_action_callbacks
Expand Down

0 comments on commit e2750e7

Please sign in to comment.