Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
joomlaproffs committed Dec 17, 2018
0 parents commit b79f4ac
Show file tree
Hide file tree
Showing 9 changed files with 1,628 additions and 0 deletions.
61 changes: 61 additions & 0 deletions electroneum.js
@@ -0,0 +1,61 @@
window.error_text = "";
function checkelectroniumdata(val)
{
if(val == 2)
{
returnurl = jQuery("#return_url").val();
window.location.href = returnurl+"&cancelorder=yes";
}
if(val == 1)
{


//jQuery("#paymentprogress").show();

jQuery.ajax({
type: "POST",
cache: false,
dataType: "json",
url: window.siteurl + "index.php?option=com_virtuemart&view=cart&vmtask=electroneumajax",
data : jQuery("#electroniumform :input").serialize(),
}).done(
function (data, textStatus){

if(data.success == 0)
{
errorstring = '<div class="uk-alert" uk-alert><a href="" class="uk-alert-close uk-close"></a><p>'+data.message+'</p></div>';
//jQuery("#error_div").html(errorstring);

setTimeout(function(){
checkelectroniumdata(1)
}, 5000);

//jQuery("#electroniumform").submit();
//jQuery("#paymentprogress").hide();
}
if(data.success == 1)
{

jQuery("#paymentqr_div").hide();
jQuery("#successdiv").show();
jQuery("#checkmark").show();
setTimeout(function(){
jQuery("#electroniumform").submit();
}, 3000);
}

});

}
}

function openpayment()
{
code = "";
paymentid = jQuery("#paymentid").val();
outlet = jQuery("#outlet").val();
total = jQuery("#etn").val();
code = "etn-it-"+outlet+"/"+paymentid+'/'+total;
window.open("https://link.electroneum.com/jWEpM5HcxP?vendor=" + code);
}

0 comments on commit b79f4ac

Please sign in to comment.