@@ -5,19 +5,19 @@ meta(charset='utf-8')
55base( href =settings .url )
66meta( name ='viewport' , content ='width=device-width, initial-scale=1' )
77
8- meta( name ='invoice-id' , content =id)
8+ meta( name ='invoice-id' , content =invoice . id )
99
10- if status == ' unpaid'
11- meta( name ='invoice-poll-url' , content =settings .url + 'checkout/' + id+ '/wait' )
12- meta( name ='invoice-expiry' , content =expires_at)
10+ if invoice . status == ' unpaid'
11+ meta( name ='invoice-poll-url' , content =settings .url + 'checkout/' + invoice . id + '/wait' )
12+ meta( name ='invoice-expiry' , content =invoice . expires_at )
1313
1414mixin css(path )
1515 link( rel ='stylesheet' , href =settings .static_url + path)
1616
1717+ css('bootstrap.min.css' )
1818+ css('checkout.css' )
1919
20- - opt = metadata && metadata .checkout || {}
20+ - opt = invoice . metadata && invoice . metadata .checkout || {}
2121
2222body: .checkout.container
2323 script window.parent != window && (document.body.className += ' iframed')
@@ -28,33 +28,39 @@ body: .checkout.container
2828 h4= opt .desc || ' Pay with Lightning'
2929 if msatoshi
3030 .amounts.col-sm-6
31- if quoted_currency
32- h3 #{ quoted_amount } #{ quoted_currency }
33- h4 #{ formatMsat (msatoshi) }
31+ if invoice . quoted_currency
32+ h3 #{ invoice . quoted_amount } #{ invoice . quoted_currency }
33+ h4 #{ formatMsat (invoice . msatoshi ) }
3434 else
35- h3 #{ formatMsat (msatoshi) }
35+ h3 #{ formatMsat (invoice . msatoshi ) }
3636
37- if status == ' paid'
37+ if invoice . status == ' paid'
3838 p.thankyou = opt .thank_you || ' Thank you! Your payment has been received.'
39- script window.parent != window && window.parent.postMessage({ type: 'completed', invoice: '#{ id } ' }, '*')
39+ script window.parent != window && window.parent.postMessage({ type: 'completed', invoice: '#{ invoice . id } ' }, '*')
4040
41- else if status == ' expired'
41+ else if invoice . status == ' expired'
4242 p.expired = opt .expired || ' Your invoice has expired. Please try again.'
4343
44- else if status == ' unpaid'
44+ else if invoice . status == ' unpaid'
4545 .row
4646 .qr.col-sm-4 : img( src =qr)
4747 .pay.col-sm-8
48- pre= payreq
49- a.btn.btn-lg.btn-primary ( href =` lightning:${ payreq} ` ) = opt .button || ' Pay with wallet'
48+ pre= invoice . payreq
49+ a.btn.btn-lg.btn-primary ( href =` lightning:${ invoice . payreq } ` ) = opt .button || ' Pay with wallet'
5050
5151 p.expiry.text-muted Invoice expires in #[ span]
52+
53+ if node .address .length
54+ .row
55+ .qr.col-sm-12
56+ h4 Our node
57+ pre= node .id + " @" + node .address [0 ].address + " :" + node .address [0 ].port
5258
5359 script( src =settings .static_url + 'checkout.js' )
5460
5561 script .
5662 if (window .parent != window ) {
57- function updateHeight () { window .parent .postMessage ({ type: ' height' , value: document .body .scrollHeight , invoice: ' #{ id }' }, ' *' ) }
63+ function updateHeight () { window .parent .postMessage ({ type: ' height' , value: document .body .scrollHeight , invoice: ' #{ invoice. id }' }, ' *' ) }
5864 updateHeight ()
5965 window .addEventListener (' resize' , updateHeight)
6066 }
0 commit comments