2017-12-17 19:15:46 -08:00
|
|
|
- expiry_str = new Date(invoice.expires_at*1000).toUTCString()
|
|
|
|
|
2017-12-17 03:15:55 -08:00
|
|
|
.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 15:38:12 -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.
|
2017-12-17 19:15:46 -08:00
|
|
|
| The invoice expires #[span(data-countdown-to=invoice.expires_at, title=expiry_str) at #{ expiry_str }].
|
2017-12-17 03:15:55 -08:00
|
|
|
|
2017-12-17 15:38:12 -08:00
|
|
|
p: a.btn.btn-lg.btn-primary(href=`lightning:${invoice.payreq}`) Pay now
|
2017-12-17 03:15:55 -08:00
|
|
|
|
2017-12-17 15:38:12 -08:00
|
|
|
.qr.col-sm-4.mb-3: img(src=qruri('lightning:'+invoice.payreq, { mode: 'alphanumeric', margin: 0 }))
|
2017-12-17 03:15:55 -08:00
|
|
|
|
2017-12-17 15:38:12 -08:00
|
|
|
//- 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')
|