Skip to content

Commit

Permalink
Get currency through order, not global config
Browse files Browse the repository at this point in the history
Change-Id: Ic06a24d7d8a7c199316aba76880a2f6f518e3685
  • Loading branch information
Clarke Brunsdon committed Jul 18, 2013
1 parent e36b3eb commit 9a6f125
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/controllers/spree/paypal_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ def express
ip: request.remote_ip,
return_url: confirm_paypal_url(:payment_method_id => params[:payment_method_id]),
cancel_return_url: cancel_paypal_url,
currency: Spree::Config[:currency],
currency: current_order.currency,
locale: I18n.locale.to_s.sub(/-/, '_'),
brand_name: Spree::Config[:site_name],
address: address_options,
header_image: 'http://teclacolorida.com/assets/images/logos/schoooools.png',
allow_guest_checkout: 'true', #payment with credit card for non PayPal users
items: items
)

redirect_to provider.redirect_url_for(response.token)
end

Expand All @@ -37,7 +37,7 @@ def confirm
ip: request.remote_addr,
token: params[:token],
payer_id: payer_id,
currency: Spree::Config[:currency]
currency: current_order.currency
})
# TODO: Add payment to order
end
Expand Down Expand Up @@ -66,4 +66,4 @@ def address_options
}
end
end
end
end

0 comments on commit 9a6f125

Please sign in to comment.