Naster
Naster

Reputation: 724

Currency PayPal Rails 4.1

I'm making a rails app and I need to let people pay in different currencies like EUR, USD, MXN, KRW, etc. My current code is as follows:

def paypal_url(return_url)
  values = {
  :business => '[email protected]',
  :cmd => '_cart',
  :upload => 1,
  :return => return_url,
  :invoice => id,
}
values.merge!({
    "amount_1" => price,
    "item_name_1" => title,
    "item_number_1" => id,
    "quantity_1" => '1'

})
"https://www.sandbox.paypal.com/cgi-bin/webscr?" + values.to_query
end

This works, but it only lets you pay in USD. How can I change it? I've tried to write inside values :currency => 'EUR' but it doesn't work.

Thnx!!

Upvotes: 0

Views: 227

Answers (1)

edariedl
edariedl

Reputation: 3352

try to use :currency_code => 'EUR'. It should work.

Upvotes: 2

Related Questions