- expiry_str = new Date(invoice.expires_at*1000).toUTCString() if invoice.status == 'expired' h3 Invoice expired p Please go back and try again. else .checkout h3 Pay with Lightning if invoice.quoted_currency && invoice.quoted_currency != 'BTC' h4 #[strong= invoice.quoted_amount] #{invoice.quoted_currency} ≈ #[strong= msat2milli(invoice.msatoshi)] mBTC else h4 #[strong= msat2milli(invoice.msatoshi)] mBTC .row .pay.col-sm-8 pre= invoice.payreq p.small.text-muted noscript Your browser has JavaScript turned off. Please refresh the page manually after making the payment. span.yesscript #[img(src='_assets/loader.gif', alt='loading')] Awaiting payment. | The invoice expires #[span(data-countdown-to=invoice.expires_at, title=expiry_str) at #{ expiry_str }]. p: a.btn.btn-lg.btn-primary(href=`lightning:${invoice.payreq}`) Pay now .qr.col-sm-4.mb-3: img(src=qruri(('lightning:'+invoice.payreq).toUpperCase(), { margin: 0 })) //- long-pull payment updates via reloading hack. not the prettiest, but extremely terse, and it works img.d-none(src='_invoice/'+invoice.id+'/longpoll.png', onerror='this.src=this.src', onload='location.reload()') script(src='_assets/countdown.js')