thiswebshoprules

git clone https://git.tarina.org/thiswebshoprules
Log | Files | Refs

paybtc.html (945B)


      1 $def with (invoice, btcaddress, btcuri, showpayment)
      2 $ qr = '/static/qr/' + btcaddress + '.png'
      3 <script>
      4 function copy() {
      5   let textarea = document.getElementById("payreq");
      6   textarea.select();
      7   document.execCommand("copy");
      8 }
      9 </script>
     10 <meta http-equiv="refresh" content="60" />
     11 <br>
     12 <h3>$invoice.products</h3>
     13 <h3>$float(invoice.amount/100)&euro;</h3>
     14 <h3>$invoice.totsats Satoshi</h3>
     15 $if showpayment == []:
     16     <h3>Status: not paid</h3>
     17 $else:
     18     $for i in showpayment:
     19         <h4>Status:</h4>
     20         <h4>txid: $i['txids']</h4>
     21         <h4>confirmations: $i['confirmations']</h4>
     22 <br>
     23 <img src="$qr">
     24 <div id='hash'>
     25 <h4>bitcoin address:</h4>
     26 <textarea id='payid'>
     27 $btcaddress
     28 </textarea>
     29 <h4>pay uri:</h4>
     30 <textarea id='payreq'>
     31 $btcuri
     32 </textarea>
     33 <br>
     34 <button id="copybutton" onclick="copy()">Copy</button>
     35 <button id="backbutton" autofocus onclick="parent.location='/payln/$invoice.invoice_key'">Pay with Lightning</button>
     36 </div>