From 5dd411b1aa2dd0ded19be2a24b6c4cb10878380d Mon Sep 17 00:00:00 2001 From: "Gourl.io" Date: Sun, 25 Jun 2017 14:32:42 +0200 Subject: [PATCH] QRCode fix --- cryptobox.js | 2 +- cryptobox.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cryptobox.js b/cryptobox.js index 4f34247..76f21f1 100644 --- a/cryptobox.js +++ b/cryptobox.js @@ -115,7 +115,7 @@ if (data.boxtype == 'paymentbox') $('.'+ext+'boxlogo').attr('src', 'https://coins.gourl.io/images/'+data.coinname.toLowerCase()+'/payment'+logoext+'.png'); else $('.'+ext+'boxlogo').attr('src', 'https://coins.gourl.io/images/'+data.coinname.toLowerCase()+'/captcha'+logoext+'.png'); var qrcodesize = (typeof $('.'+ext+'qrcode_image').attr('data-size') === 'undefined') ? 110 : $('.'+ext+'qrcode_image').attr('data-size'); - $('.'+ext+'qrcode_image').attr('src', 'https://chart.googleapis.com/chart?chs='+qrcodesize+'x'+qrcodesize+'&chld=M|0&cht=qr&chl='+data.coinname+'%3A'+data.addr+'%3Famount%3D'+data.amount+'&choe=UTF-8'); + $('.'+ext+'qrcode_image').attr('src', 'https://chart.googleapis.com/chart?chs='+qrcodesize+'x'+qrcodesize+'&chld=M|0&cht=qr&chl='+data.coinname.toLowerCase()+'%3A'+data.addr+'%3Famount%3D'+data.amount+'&choe=UTF-8'); if ($.isFunction($.fn.tooltip)) { diff --git a/cryptobox.min.js b/cryptobox.min.js index 0d34214..292cde7 100644 --- a/cryptobox.min.js +++ b/cryptobox.min.js @@ -10,6 +10,6 @@ * */ -function cryptobox_custom(a,b,c,d,e){var f=(new Date).getTime(),h=((new Date).getTime(),!1),i=!1;return"number"!=typeof b&&(b=0),"string"!=typeof c&&(c=""),"string"!=typeof d&&(d="gourl_"),"string"!=typeof e&&(e=""),cryptobox_callout=function(){$.ajax({type:"GET",url:a,cache:!1,contentType:"application/json; charset=utf-8",data:{format:"json"},dataType:"json"}).fail(function(){$("."+d+"error_message").html('Error loading data !   Raw details here »'),$("."+d+"loader_button").fadeOut(400,function(){$("."+d+"loader").show(),$("."+d+"cryptobox_error").fadeIn(400)}),i=!0}).done(function(a){if(cryptobox_update_page(a,d),"payment_received"==a.status&&(h=!0,b||$.post(c+"cryptobox.callback.php",a).fail(function(){alert("Internal Error! Unable to find file cryptobox.callback.php. Please contact the website administrator.")}).done(function(a){"cryptobox_newrecord"!=a&&"cryptobox_updated"!=a&&"cryptobox_nochanges"!=a&&alert("Internal Error! "+a)}),e&&setTimeout(function(){window.location=e},5e3)),!h&&!i){(new Date).getTime()-f>12e5?($("."+d+"button_wait").hide(),$("."+d+"button_refresh").removeClass("btn-default").addClass("btn-info"),$("."+d+"cryptobox_unpaid .panel").removeClass("panel-info").removeClass("panel-primary").removeClass("panel-warning").removeClass("panel-success").addClass("panel-default").fadeTo("slow",.4,function(){}),$("[data-original-title]").tooltip("disable")):setTimeout(cryptobox_callout,7e3)}})},cryptobox_callout(),!0}function cryptobox_update_page(a,b){logoext="Bitcoin"==a.coinname?"_"+a.texts.language:"","paymentbox"==a.boxtype?$("."+b+"boxlogo").attr("src","https://coins.gourl.io/images/"+a.coinname.toLowerCase()+"/payment"+logoext+".png"):$("."+b+"boxlogo").attr("src","https://coins.gourl.io/images/"+a.coinname.toLowerCase()+"/captcha"+logoext+".png");var c=void 0===$("."+b+"qrcode_image").attr("data-size")?110:$("."+b+"qrcode_image").attr("data-size");$("."+b+"qrcode_image").attr("src","https://chart.googleapis.com/chart?chs="+c+"x"+c+"&chld=M|0&cht=qr&chl="+a.coinname+"%3A"+a.addr+"%3Famount%3D"+a.amount+"&choe=UTF-8"),$.isFunction($.fn.tooltip)&&($("."+b+"wallet_open").attr("data-original-title",a.texts.btn_wallet).attr("data-placement","bottom").attr("data-toggle","tooltip").tooltip(),$("."+b+"qrcode_image").attr("data-original-title",a.texts.qrcode).attr("data-placement","bottom").attr("data-toggle","tooltip").tooltip(),$("."+b+"fees_hint").attr("data-original-title",'').attr("data-placement","bottom").attr("data-toggle","tooltip").tooltip({html:!0}),$("."+b+"button_wait").attr("data-original-title",a.texts.btn_wait_hint).attr("data-placement","top").attr("data-toggle","tooltip").tooltip()),$("."+b+"paymentcaptcha_amount").text("paymentbox"==a.boxtype?a.texts.payment_amount:a.texts.captcha_amount),$("."+b+"paymentcaptcha_status").text("paymentbox"==a.boxtype?a.texts.payment_status:a.texts.captcha_status);var d="-";"payment_not_received"==a.status?d=a.texts.not_received:"payment_received"==a.status&&(d="paymentbox"==a.boxtype?a.texts.payment_successful:a.texts.captcha_successful),$("."+b+"paymentcaptcha_statustext").text(d),"payment_received"==a.status?($("."+b+"texts_btn_wait_hint").hide(),$("."+b+"button_wait").html("paymentbox"==a.boxtype?a.texts.payment_successful:a.texts.captcha_successful)):$("."+b+"button_wait").html('   '+("paymentbox"==a.boxtype?a.texts.payment_wait:a.texts.captcha_wait)),$("."+b+"button_refresh").html('  '+a.texts.refresh),$("."+b+"paymentcaptcha_title").text("paymentbox"==a.boxtype?a.texts.title:a.coinname),$("."+b+"paymentcaptcha_successful").text("paymentbox"==a.boxtype?a.texts.payment_successful:a.texts.captcha_successful),$("."+b+"paymentcaptcha_date").html(("paymentbox"==a.boxtype?a.texts.received_on:a.texts.captcha_passed)+" "+a.date+""),$("."+b+"button_details").html('  '+a.texts.btn_res),$("."+b+"button_details").attr("href",a.tx_url).attr("target","_blank"),"fa"!=a.texts.language&&"ar"!=a.texts.language||$("."+b+"cryptobox_error, ."+b+"cryptobox_top, ."+b+"cryptobox_unpaid, ."+b+"cryptobox_paid, ."+b+"cryptobox_rawdata").attr("dir","rtl"),$("."+b+"loader").fadeOut(400,function(){$("."+b+"cryptobox_top, ."+b+"cryptobox_rawdata").fadeIn(400),"payment_received"==a.status?($("."+b+"cryptobox_unpaid, ."+b+"boxlogo_unpaid, ."+b+"msg").hide(),$("."+b+"cryptobox_paid, ."+b+"boxlogo_paid").fadeIn(400)):($("."+b+"cryptobox_paid, ."+b+"boxlogo_paid").hide(),$("."+b+"cryptobox_unpaid, ."+b+"boxlogo_unpaid").fadeIn(400)),$("."+b+"msg").delay(7e3).fadeOut(2e3)});var e="";if($.each(a,function(a,c){if("object"==typeof c){var d='
';$.each(c,function(c,e){d+="["+c+"] => "+e+"
",$("."+b+a+"_"+c).html(e)}),c=d+"
"}else a.indexOf("_url")>0?$("."+b+a).attr("href",c):$("."+b+a).html(c);e+="["+a+"] => "+c+"
"}),"undefined"!==$("."+b+"texts_intro1b").attr("data-site")&&"undefined"!==$("."+b+"texts_intro1b").attr("data-url")){var f=''+$("."+b+"texts_intro1b").attr("data-site")+"";$("."+b+"texts_intro1b").html(a.texts.intro1b.replace("___",f))}return $("."+b+"jsondata").html(e),!0}function cryptobox_show(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){"number"!=typeof o&&(o=0),"number"!=typeof p&&(p=0);var q=c.substr(0,c.indexOf("AA"));if(""==q||a!=q||-1==c.indexOf("PUB"))alert("Invalid payment box public_key");else if(d<=0&&e<=0||d>0&&e>0)alert("You can use in payment box options one of variable only: amount or amountUSD. You cannot place values in that two variables together");else if(0!=d&&(d-0!=d||d<1e-4))alert("Invalid payment box amount");else if(0!=e&&(e-0!=e||e<.01))alert("Invalid payment box amountUSD");else if("COOKIE"!=j&&"SESSION"!=j&&"IPADDRESS"!=j&&"MANUAL"!=j)alert("Invalid payment box userFormat value");else if("COOKIE"==j&&""==l)alert("Invalid payment box cookie name");else if("COOKIE"==j&&""==cryptobox_cookie(l))null!=document.getElementById(h).src&&(document.getElementById(h).src="https://gourl.io/images/crypto_cookies.png"),alert("Please enable Cookies in your Browser !");else if("COOKIE"==j&&cryptobox_cookie(l)!=i)alert("Invalid cookie value. It may be you are viewing an older copy of the page that is stored in the website cache. Please contact with website owner, need to disable/turn-off caching for current page");else if(""==k)alert("Invalid orderID");else if(""==f)alert("Invalid period");else if(50!=c.length)alert("Invalid public key");else if(""!=m&&(-1==m.indexOf("DEV")||m.length<20))alert("Invalid webdev_key, leave it empty");else if(""==n)alert("Invalid payment box hash");else{var r="https://coins.gourl.io/b/"+encodeURIComponent(a)+"/c/"+encodeURIComponent(b)+"/p/"+encodeURIComponent(c)+"/a/"+encodeURIComponent(d)+"/au/"+encodeURIComponent(e)+"/pe/"+encodeURIComponent(f.replace(" ","_"))+"/l/"+encodeURIComponent(g)+"/i/"+encodeURIComponent(h)+"/u/"+encodeURIComponent(i)+"/us/"+encodeURIComponent(j)+"/o/"+encodeURIComponent(k)+(m?"/w/"+encodeURIComponent(m):"")+(o>0?"/ws/"+encodeURIComponent(o):"")+(p>0?"/hs/"+encodeURIComponent(p):"")+"/h/"+encodeURIComponent(n)+"/z/"+Math.random(),s=document.getElementById(h);null==s?alert('Cryptobox iframeID HTML with id "'+h+'" not exist!'):s.src=r}return!0}function cryptobox_cookie(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;dRaw details here »'),$("."+o+"loader_button").fadeOut(400,function(){$("."+o+"loader").show(),$("."+o+"cryptobox_error").fadeIn(400)}),l=!0}).done(function(t){if(cryptobox_update_page(t,o),"payment_received"==t.status&&(i=!0,e||$.post(a+"cryptobox.callback.php",t).fail(function(){alert("Internal Error! Unable to find file cryptobox.callback.php. Please contact the website administrator.")}).done(function(t){"cryptobox_newrecord"!=t&&"cryptobox_updated"!=t&&"cryptobox_nochanges"!=t&&alert("Internal Error! "+t)}),n&&setTimeout(function(){window.location=n},5e3)),!i&&!l){var s=(new Date).getTime();s-r>12e5?($("."+o+"button_wait").hide(),$("."+o+"button_refresh").removeClass("btn-default").addClass("btn-info"),$("."+o+"cryptobox_unpaid .panel").removeClass("panel-info").removeClass("panel-primary").removeClass("panel-warning").removeClass("panel-success").addClass("panel-default").fadeTo("slow",.4,function(){}),$("[data-original-title]").tooltip("disable")):setTimeout(cryptobox_callout,7e3)}})},cryptobox_callout(),!0}function cryptobox_update_page(t,e){logoext="Bitcoin"==t.coinname?"_"+t.texts.language:"","paymentbox"==t.boxtype?$("."+e+"boxlogo").attr("src","https://coins.gourl.io/images/"+t.coinname.toLowerCase()+"/payment"+logoext+".png"):$("."+e+"boxlogo").attr("src","https://coins.gourl.io/images/"+t.coinname.toLowerCase()+"/captcha"+logoext+".png");var a="undefined"==typeof $("."+e+"qrcode_image").attr("data-size")?110:$("."+e+"qrcode_image").attr("data-size");$("."+e+"qrcode_image").attr("src","https://chart.googleapis.com/chart?chs="+a+"x"+a+"&chld=M|0&cht=qr&chl="+t.coinname.toLowerCase()+"%3A"+t.addr+"%3Famount%3D"+t.amount+"&choe=UTF-8"),$.isFunction($.fn.tooltip)&&($("."+e+"wallet_open").attr("data-original-title",t.texts.btn_wallet).attr("data-placement","bottom").attr("data-toggle","tooltip").tooltip(),$("."+e+"qrcode_image").attr("data-original-title",t.texts.qrcode).attr("data-placement","bottom").attr("data-toggle","tooltip").tooltip(),$("."+e+"fees_hint").attr("data-original-title",'').attr("data-placement","bottom").attr("data-toggle","tooltip").tooltip({html:!0}),$("."+e+"button_wait").attr("data-original-title",t.texts.btn_wait_hint).attr("data-placement","top").attr("data-toggle","tooltip").tooltip()),$("."+e+"paymentcaptcha_amount").text("paymentbox"==t.boxtype?t.texts.payment_amount:t.texts.captcha_amount),$("."+e+"paymentcaptcha_status").text("paymentbox"==t.boxtype?t.texts.payment_status:t.texts.captcha_status);var o="-";"payment_not_received"==t.status?o=t.texts.not_received:"payment_received"==t.status&&(o="paymentbox"==t.boxtype?t.texts.payment_successful:t.texts.captcha_successful),$("."+e+"paymentcaptcha_statustext").text(o),"payment_received"==t.status?($("."+e+"texts_btn_wait_hint").hide(),$("."+e+"button_wait").html("paymentbox"==t.boxtype?t.texts.payment_successful:t.texts.captcha_successful)):$("."+e+"button_wait").html('   '+("paymentbox"==t.boxtype?t.texts.payment_wait:t.texts.captcha_wait)),$("."+e+"button_refresh").html('  '+t.texts.refresh),$("."+e+"paymentcaptcha_title").text("paymentbox"==t.boxtype?t.texts.title:t.coinname),$("."+e+"paymentcaptcha_successful").text("paymentbox"==t.boxtype?t.texts.payment_successful:t.texts.captcha_successful),$("."+e+"paymentcaptcha_date").html(("paymentbox"==t.boxtype?t.texts.received_on:t.texts.captcha_passed)+" "+t.date+""),$("."+e+"button_details").html('  '+t.texts.btn_res),$("."+e+"button_details").attr("href",t.tx_url).attr("target","_blank"),("fa"==t.texts.language||"ar"==t.texts.language)&&$("."+e+"cryptobox_error, ."+e+"cryptobox_top, ."+e+"cryptobox_unpaid, ."+e+"cryptobox_paid, ."+e+"cryptobox_rawdata").attr("dir","rtl"),$("."+e+"loader").fadeOut(400,function(){$("."+e+"cryptobox_top, ."+e+"cryptobox_rawdata").fadeIn(400),"payment_received"==t.status?($("."+e+"cryptobox_unpaid, ."+e+"boxlogo_unpaid, ."+e+"msg").hide(),$("."+e+"cryptobox_paid, ."+e+"boxlogo_paid").fadeIn(400)):($("."+e+"cryptobox_paid, ."+e+"boxlogo_paid").hide(),$("."+e+"cryptobox_unpaid, ."+e+"boxlogo_unpaid").fadeIn(400)),$("."+e+"msg").delay(7e3).fadeOut(2e3)});var n="";if($.each(t,function(t,a){if("object"==typeof a){var o='
';$.each(a,function(a,n){o+="["+a+"] => "+n+"
",$("."+e+t+"_"+a).html(n)}),a=o+"
"}else t.indexOf("_url")>0?$("."+e+t).attr("href",a):$("."+e+t).html(a);n+="["+t+"] => "+a+"
"}),"undefined"!==$("."+e+"texts_intro1b").attr("data-site")&&"undefined"!==$("."+e+"texts_intro1b").attr("data-url")){var r=''+$("."+e+"texts_intro1b").attr("data-site")+"";$("."+e+"texts_intro1b").html(t.texts.intro1b.replace("___",r))}return $("."+e+"jsondata").html(n),!0}function cryptobox_show(t,e,a,o,n,r,i,l,s,c,p,d,u,m,b,x){"number"!=typeof b&&(b=0),"number"!=typeof x&&(x=0);var y=a.substr(0,a.indexOf("AA"));if(""==y||t!=y||-1==a.indexOf("PUB"))alert("Invalid payment box public_key");else if(0>=o&&0>=n||o>0&&n>0)alert("You can use in payment box options one of variable only: amount or amountUSD. You cannot place values in that two variables together");else if(0!=o&&(o-0!=o||1e-4>o))alert("Invalid payment box amount");else if(0!=n&&(n-0!=n||.01>n))alert("Invalid payment box amountUSD");else if("COOKIE"!=c&&"SESSION"!=c&&"IPADDRESS"!=c&&"MANUAL"!=c)alert("Invalid payment box userFormat value");else if("COOKIE"==c&&""==d)alert("Invalid payment box cookie name");else if("COOKIE"==c&&""==cryptobox_cookie(d))null!=document.getElementById(l).src&&(document.getElementById(l).src="https://gourl.io/images/crypto_cookies.png"),alert("Please enable Cookies in your Browser !");else if("COOKIE"==c&&cryptobox_cookie(d)!=s)alert("Invalid cookie value. It may be you are viewing an older copy of the page that is stored in the website cache. Please contact with website owner, need to disable/turn-off caching for current page");else if(""==p)alert("Invalid orderID");else if(""==r)alert("Invalid period");else if(50!=a.length)alert("Invalid public key");else if(""!=u&&(-1==u.indexOf("DEV")||u.length<20))alert("Invalid webdev_key, leave it empty");else if(""==m)alert("Invalid payment box hash");else{var _="https://coins.gourl.io/b/"+encodeURIComponent(t)+"/c/"+encodeURIComponent(e)+"/p/"+encodeURIComponent(a)+"/a/"+encodeURIComponent(o)+"/au/"+encodeURIComponent(n)+"/pe/"+encodeURIComponent(r.replace(" ","_"))+"/l/"+encodeURIComponent(i)+"/i/"+encodeURIComponent(l)+"/u/"+encodeURIComponent(s)+"/us/"+encodeURIComponent(c)+"/o/"+encodeURIComponent(p)+(u?"/w/"+encodeURIComponent(u):"")+(b>0?"/ws/"+encodeURIComponent(b):"")+(x>0?"/hs/"+encodeURIComponent(x):"")+"/h/"+encodeURIComponent(m)+"/z/"+Math.random(),f=document.getElementById(l);null==f?alert('Cryptobox iframeID HTML with id "'+l+'" not exist!'):f.src=_}return!0}function cryptobox_cookie(t){for(var e=t+"=",a=document.cookie.split(";"),o=0;o