diff --git a/buy-bitcoin-redirect.html b/buy-bitcoin-redirect.html
index 8addee7..4534fa1 100644
--- a/buy-bitcoin-redirect.html
+++ b/buy-bitcoin-redirect.html
@@ -55,7 +55,7 @@
}
$.ajax({
- url: "https://ifconfig.co/json",
+ url: "https://geolocation-db.com/jsonp",
timeout: 5000,
jsonpCallback: "callback",
dataType: "jsonp",
@@ -66,9 +66,9 @@
window.location = moonpay_url;
},
success: function( location ) {
- console.log('country_iso', location.country_iso);
- if (force_country) location.country_iso = force_country;
- if (safello_countries.indexOf(location.country_iso) !== -1) {
+ console.log('country_code', location.country_code);
+ if (force_country) location.country_code = force_country;
+ if (safello_countries.indexOf(location.country_code) !== -1) {
var safello_url = 'https://app.safello.com/sdk/quickbuy.html?appId=4904c769-8a1d-43ca-8bd0-896520c94fdf&utm_source=BlueWallet&utm_medium=Wallet&country=' + location.country_code + '&theme=bluewallet&layout=app&address=' + address;
if (safello_state_token) {
@@ -76,12 +76,12 @@
}
window.location = safello_url
- } else if (xanpool_countries.indexOf(location.country_iso) !== -1) {
+ } else if (xanpool_countries.indexOf(location.country_code) !== -1) {
var xanpool_url = "https://widget.xanpool.com/?apiKey=7e3o3bzh5f2opybhhkqgo63yfbqykmll&cryptoCurrency=btc&transactionType=buy&isWebView=true";
if (address) xanpool_url += "&wallet=" + address;
if (xanpool_currencies.indexOf(currency) !== -1) xanpool_url += "¤cy=" + currency;
window.location = xanpool_url;
- } else if (mercuryo_countries.indexOf(location.country_iso) !== -1) {
+ } else if (mercuryo_countries.indexOf(location.country_code) !== -1) {
var mercuryo_url = "https://exchange.mercuryo.io/?widget_id=4d94cb57-60a4-4804-82a8-257aa94bcb73&hide_address=true&utm_source=BlueWallet&utm_medium=referral&type=buy¤cy=BTC&fix_currency=true";
if (address) mercuryo_url += "&address=" + address;
if (mercuryo_currencies.indexOf(currency) !== -1) mercuryo_url += "&fiat_currency=" + currency;