Detecting Users Currency or Currency Personalisation
// Getting the currency from the user's IP
$.get("https://ipforensics.net/api/v1/origin?apikey=APIKEY", function (response) {
if (response.meta_data.currency.code == 'NGN' || response.meta_data.currency.symbol_native = "β¦") {
alert("Show price in naira");
}
else if(response.meta_data.currency.code == 'USD' || response.meta_data.currency.symbol_native = "$"){
alert("Show price in dollar");
}
}, "jsonp");Last updated