Unfortunately, there was an error during the donation process or you canceled the payment! Please contact our support team: support@onecenttrading.com or try again from our donation page.
<div id="logindebug"></div>
<div id="support"></div>
<script>
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, '\\$&');
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, ' '));
}
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return /iPad|iPhone|iPod/.test(navigator.platform) ||
(navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)
},
Opera: function() {
return navigator.userAgent.match(/Opera Mini/i);
},
Windows: function() {
return navigator.userAgent.match(/IEMobile/i);
},
any: function() {
return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
}
};
document.getElementById("logindebug").innerHTML = navigator.userAgent + " | " + navigator.platform;
var token = getParameterByName('token');
if (token) {
console.log(token);
if (isMobile.Android()) {
console.log("redirect to Android app");
window.location = '/sign/' + token;
setTimeout(function() { window.location = 'https://onecenttrading.com/the-mobile-application/'; }, 2000);
}
else if(isMobile.iOS()) {
window.location = 'applinks://onecenttrading.com/sign/' + token;
setTimeout(function() { window.location = 'https://onecenttrading.com/the-mobile-application/'; }, 2000);
}
else {
console.log("Mobile device not detected. Displaying token usage instructions.");
document.getElementById("support").innerHTML = `
<p><strong>Alternate Login:</strong></p>
<p>The App is not opening? No worries! Use the token to log in:</p>
<ol>
<li>Open the One Cent Trading App.</li>
<li>Go to <strong>Menu -> Log In With Token</strong>.</li>
<li>Enter your token: <strong>${token}</strong></li>
</ol>
<p><strong>Please Note:</strong></p>
<ul>
<li>This login token is valid for only 30 minutes.</li>
</ul>`;
}
} else {
console.log("No token provided");
document.getElementById("support").innerHTML = "No token provided. Unable to proceed.";
}
</script>