tc / paypal_adaptive

Light wrapper for Paypal's Adaptive Payment API
MIT License
252 stars 97 forks source link

Locale specific paypal urls #55

Closed mreinsch closed 11 years ago

mreinsch commented 12 years ago

The subject says it all, you can now use something like

redirect_to pay_response.approve_paypal_payment_url(:locale => I18n.locale)

to give Paypal a hint which locale it should use (got this tip from Paypal technical support).

Also improved the tests to actually test the generated URLs and simplified the code there.

mreinsch commented 12 years ago

after some more tests: this actually has to be the user's country code to work correctly. So I updated the commit.

mreinsch commented 12 years ago

rebased on top of current master and another minor change. Using the locale specific URLs in production now and they are working fine.

tc commented 11 years ago

sorry for missing this one long ago. Can you rebase it on master? Also, is it possible you change test to not depend on activesupport?

mreinsch commented 11 years ago

I didn't pull in the active support requirement, just added it to the gemspec because of the "require 'active_support/core_ext/string'" in the test_helper.rb: https://github.com/tc/paypal_adaptive/blob/master/test/test_helper.rb

tc commented 11 years ago

ah got it

mreinsch commented 11 years ago

rebased and fixed a test in addition

mreinsch commented 11 years ago

thanks!