diff --git a/lnbits/extensions/tpos/templates/tpos/tpos.html b/lnbits/extensions/tpos/templates/tpos/tpos.html
index ae306d154..d23a0c3e0 100644
--- a/lnbits/extensions/tpos/templates/tpos/tpos.html
+++ b/lnbits/extensions/tpos/templates/tpos/tpos.html
@@ -16,13 +16,7 @@
src="{{ url_for('static', filename='plugins/jscam/qrcode.min.js') }}"
type="text/javascript"
>
-
@@ -81,11 +75,13 @@
@@ -211,7 +207,7 @@ console.log(sats)
function(data) {
theinvoice = JSON.parse(data).pay_req
thehash = JSON.parse(data).payment_hash
-
+
new QRCode(document.getElementById('qrcode'), {
text: theinvoice,
width: 300,
@@ -220,6 +216,8 @@ console.log(sats)
colorLight: '#ffffff',
correctLevel: QRCode.CorrectLevel.M
})
+ document.getElementById("sats").innerHTML = ""
+ document.getElementById("fiat").innerHTML = ""
document.getElementById("qrcode").style.backgroundColor = "white";
@@ -231,9 +229,20 @@ console.log(sats)
getAjax('/api/v1/invoice/' + thehash, "{{wave}}", function(datab) {
console.log(JSON.parse(datab).PAID)
if (JSON.parse(datab).PAID == 'TRUE') {
- displayticket(thehash)
- clearInterval(refreshId)
- }
+
+ document.getElementById("qrcode").innerHTML = ""
+ document.getElementById("qrcode").style.padding = "0px";
+ document.getElementById("qrcode").style.backgroundColor = "#363636";
+ document.getElementById("qrcode").innerHTML = "
PAID!
"
+ console.log("theinvoice");
+
+ setTimeout(function(){
+
+
+ location.reload();
+ }, 4000);
+
+ }
})}, 3000);
@@ -241,9 +250,15 @@ console.log(sats)
}
+
-
-