FIX: new geoip for buy-bitcoin
This commit is contained in:
parent
7682721cee
commit
90614caec7
@ -4,7 +4,7 @@
|
||||
<title></title>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
||||
<noscript>
|
||||
<meta http-equiv="Refresh" content="0;URL=https://exchange.mercuryo.io/?widget_id=4d94cb57-60a4-4804-82a8-257aa94bcb73&utm_source=BlueWallet&utm_medium=referral&type=buy¤cy=BTC&fix_currency=true"/>
|
||||
<meta http-equiv="Refresh" content="0;URL=https://moonpay-redirect.herokuapp.com/?apiKey=pk_live_IkhSI2lIXSiolwakfd95QFD4p3908cZa&enabledPaymentMethods=credit_debit_card%2Capple_pay%2Csepa_bank_transfer%2Cgbp_bank_transfer%2Cgoogle_pay%2Csamsung_pay¤cyCode=BTC&colorCode=%2368BBE1&showWalletAddressForm=false"/>
|
||||
</noscript>
|
||||
<style>
|
||||
.lds-dual-ring {
|
||||
@ -55,19 +55,20 @@
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "https://geolocation-db.com/jsonp",
|
||||
url: "https://ifconfig.co/json",
|
||||
timeout: 5000,
|
||||
jsonpCallback: "callback",
|
||||
dataType: "jsonp",
|
||||
error: function() {
|
||||
window.location = 'https://exchange.mercuryo.io/?widget_id=4d94cb57-60a4-4804-82a8-257aa94bcb73&utm_source=BlueWallet&utm_medium=referral&type=buy¤cy=BTC&fix_currency=true';
|
||||
var moonpay_url = 'https://moonpay-redirect.herokuapp.com/?apiKey=pk_live_IkhSI2lIXSiolwakfd95QFD4p3908cZa&enabledPaymentMethods=credit_debit_card%2Capple_pay%2Csepa_bank_transfer%2Cgbp_bank_transfer%2Cgoogle_pay%2Csamsung_pay¤cyCode=BTC&colorCode=%2368BBE1&showWalletAddressForm=false';
|
||||
if (address) moonpay_url += '&walletAddress=' + address;
|
||||
if (moonpay_currencies.indexOf(currency) !== -1) moonpay_url += '&baseCurrencyCode=' + currency;
|
||||
window.location = moonpay_url;
|
||||
},
|
||||
success: function( location ) {
|
||||
console.log('country_code', location.country_code);
|
||||
if (force_country) location.country_code = force_country;
|
||||
if (location.country_code == 'ZA' || location.country_code == 'ZAF' || location.country_code == 'ZAR') {
|
||||
window.location = 'https://ice3x.com?ref=14342738';
|
||||
} else if (safello_countries.indexOf(location.country_code) !== -1) {
|
||||
console.log('country_iso', location.country_iso);
|
||||
if (force_country) location.country_iso = force_country;
|
||||
if (safello_countries.indexOf(location.country_iso) !== -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) {
|
||||
@ -75,12 +76,12 @@
|
||||
}
|
||||
|
||||
window.location = safello_url
|
||||
} else if (xanpool_countries.indexOf(location.country_code) !== -1) {
|
||||
} else if (xanpool_countries.indexOf(location.country_iso) !== -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_code) !== -1) {
|
||||
} else if (mercuryo_countries.indexOf(location.country_iso) !== -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user