Reputation: 724
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