I am implementing a store in the UK on Spree. I am using spree_gateway for Paypal Website Payments Pro support. I noticed that even though I set currency_code in the gateway options to "GBP", Paypal still bills the card in USD.
It turned out that Spree::Payment::Processing.gateway_options that is responsible for passing the options to the Paypal gateway is not passing :currency. Because it's not passed, Paypal assumes USD as the default.
The gateway options (including the currency_code) are used to initialize the gateway but the Paypal gateway expects the currency to be in a different set of options that are passed to authorize(), which are passed from Spree without the currency code.
A patch with a test case (my first for spree!) is included.
passing the currency code from payment method preferences to the gateway
Merge remote-tracking branch 'upstream/master'
Revert "Merge remote-tracking branch 'upstream/master'"
This reverts commit 2c75284, reversing
changes made to 8369951.
I think I accidentally added a few unnecessary commits to this pull request by not branching first, sorry. Only the first commit is relevant.
Revert "version bump"
This reverts commit beb1166.
Merged to 1-1-stable also, thanks for the contribution.