btcp-digital-store/views/_checkout.pug

27 lines
1.1 KiB
Plaintext
Raw Normal View History

- expiry_str = new Date(invoice.expires_at*1000).toUTCString()
if invoice.status == 'expired'
h3 Invoice expired
p Please go back and try again.
2017-12-17 03:15:55 -08:00
else
.checkout
h3 Pay with Lightning
h4 #[strong= invoice.quoted_amount] #{invoice.quoted_currency } = #[strong= fmsat(invoice.msatoshi)] mBTC
.row
.pay.col-sm-8
pre= invoice.payreq
2017-12-17 03:15:55 -08:00
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 }].
2017-12-17 03:15:55 -08:00
p: a.btn.btn-lg.btn-primary(href=`lightning:${invoice.payreq}`) Pay now
2017-12-17 03:15:55 -08:00
.qr.col-sm-4.mb-3: img(src=qruri('lightning:'+invoice.payreq, { mode: 'alphanumeric', margin: 0 }))
//- long-pull payment updates via <img> 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')