Locale specific paypal urls #55

Merged
merged 4 commits into from Dec 17, 2012

2 participants

@mreinsch

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

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

@mreinsch

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

@tc
Owner
tc commented Dec 17, 2012

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 added some commits May 9, 2012
@mreinsch mreinsch minor stuff:
 - rake is only a development dependency
 - added activesupport as a development dependendy (required in test_helper)
 - ignore rvm config
c18b9ea
@mreinsch mreinsch - allow to pass in locale when generating payment approval URL
- improve tests
87b5d7a
@mreinsch mreinsch don't require an argument so yaml can de-serialize responses aedb90a
@mreinsch

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
Owner
tc commented Dec 17, 2012

ah got it

@mreinsch

rebased and fixed a test in addition

@tc tc merged commit 7f3f827 into tc:master Dec 17, 2012
@mreinsch

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment