: Can PayPal charge different prices and currencies in different regions? I want to set up a payment module on my website: US/Canada price is a certain price in USD, people other countries pay
I want to set up a payment module on my website: US/Canada price is a certain price in USD, people other countries pay in EUR. The prices is not an exact conversion, but a "round" number which approximates exact conversion. Say, for example 140 USD and 100 EUR.
Is there an easy way to set this up in PayPal? If not, which payment method is cheap and easy to implement?
More posts by @Sims2060225
2 Comments
Sorted by latest first Latest Oldest Best
The way I do this is maintain a list of exchange rates in a database table, I have a cronjob set up to grab these on an hourly basis. (From: www.ecb.int/stats/eurofxref/eurofxref-daily.xml)
My products are all in USD, and I allow visitors to select from a list their preferred currency based on the conversion from USD using my exchange rates table.
So I have a table like this, listing all the currencies that Paypal accepts:
<select>
<option value="">Change Currency...</option>
<option value="USD">USD - U.S. Dollars</option>
<option value="GBP">GBP - Pounds Sterling</option>
When they select a different option I get the converted amount and display it e.g:
Ajax:
function changeCurrency(id) {
var select_price = $("#select").val();
var codes=new Array();
codes['USD']="u0024";
codes['GBP']="u00A3";
$.post("/payment/prices.php", { id: id, currency: select_price },
function(data){
$("#spanPrice").text(codes[select_price] + data);
$("input[name*='currency_code']").val(select_price);
if(select_price=='JPY' || select_price=='HUF'){
var splitData = data.split(".");
$("input[name*='amount']").val(splitData[0].replace(",",""));
} else {
$("input[name*='amount']").val(data.replace(",",""));
}
});
}
PHP:
function convert($amount,$from,$to,$decimals=2) {
return(number_format(($amount/$this->exchange_rates[$from])*$this->exchange_rates[$to],$decimals));
}
When it comes to payment I just take the selected currency and the converted amount. The products that I sell on my website are non-physical goods and is an automated process, so after payment is made I then do another check against the amount paid to be sure that they didn't submit for example [CO].01.
I think you should consider if you need the approx price conversions you describe.
If you use PayPal and set the price in USD then the conversion is made by PayPal; so lets say I buy from you and you set the price in USD then I would pay PayPal with SEK (Swedish Kronor) for the value and PayPal will pay you in USD...
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.