nov / paypal-express

Ruby Gem for PayPal Express Checkout API
MIT License
374 stars 163 forks source link

Recurring payment does not accept currency code #82

Closed pedrofs closed 9 years ago

pedrofs commented 9 years ago

Hi, I'm trying to perform a recurring payment but it doesn't accept a customizable currency code.

I'm creating a Paypal::Payment::Request using currency code defined as BRL (Brazillian currency code). It works well and I'm able to redirect the user to the authorization flow within paypal. But, when trying to subscribe I cannot define the currency code for the Paypal::Payment::Recurring and it gets the default currency code defined by paypal (USD). It generates an inconsistency because the currency codes don't match and paypal API throws "Invalid currency code".

Error number 11548 from https://developer.paypal.com/docs/classic/api/errorcodes/

API documentation that shows the expectation for CURRENCYCODE for recurring: https://developer.paypal.com/docs/classic/api/merchant/CreateRecurringPaymentsProfile_API_Operation_NVP/

Best, Pedro.

pedrofs commented 9 years ago

I'm sorry. I found the way to customize the Paypal::Payment::Recurring currency code. It should be done through the Billing object.

Best, Pedro.