Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The currency code is not passed to the gateway correcly #1528

Closed
wants to merge 5 commits into from

Conversation

shadchnev
Copy link
Contributor

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.

@shadchnev
Copy link
Contributor Author

I think I accidentally added a few unnecessary commits to this pull request by not branching first, sorry. Only the first commit is relevant.

This reverts commit beb1166.
@BDQ BDQ closed this in 2db6baa May 14, 2012
@BDQ
Copy link
Member

BDQ commented May 14, 2012

Merged to 1-1-stable also, thanks for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants