Skip to content

Commit

Permalink
ADD: debug force_country to buy-bitcoin page
Browse files Browse the repository at this point in the history
  • Loading branch information
Overtorment committed Mar 13, 2020
1 parent 10412ed commit 1fd30a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion buy-bitcoin-redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
var safello_countries = ["SE"];
var u = new URLSearchParams(window.location.search);
var address = u.get('address') || '';
var force_country = u.get('force_country') || '';
var safello_state_token = u.get('safelloStateToken')
if (safello_state_token == 'TEST') {
// for the sake of testing
Expand All @@ -48,14 +49,15 @@
}

$.ajax({
url: "https://geoip-db.com/jsonp",
url: "https://geolocation-db.com/jsonp",
jsonpCallback: "callback",
dataType: "jsonp",
error: function(){
window.location = 'https://changenow.io?link_id=7ccc7c1c261e17';
},
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) {
Expand Down

0 comments on commit 1fd30a9

Please sign in to comment.