@@ -5,19 +5,19 @@ meta(charset='utf-8')
5
5
base( href =settings .url )
6
6
meta( name ='viewport' , content ='width=device-width, initial-scale=1' )
7
7
8
- meta( name ='invoice-id' , content =id)
8
+ meta( name ='invoice-id' , content =invoice . id )
9
9
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 )
13
13
14
14
mixin css(path )
15
15
link( rel ='stylesheet' , href =settings .static_url + path)
16
16
17
17
+ css('bootstrap.min.css' )
18
18
+ css('checkout.css' )
19
19
20
- - opt = metadata && metadata .checkout || {}
20
+ - opt = invoice . metadata && invoice . metadata .checkout || {}
21
21
22
22
body: .checkout.container
23
23
script window.parent != window && (document.body.className += ' iframed')
@@ -28,33 +28,39 @@ body: .checkout.container
28
28
h4= opt .desc || ' Pay with Lightning'
29
29
if msatoshi
30
30
.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 ) }
34
34
else
35
- h3 #{ formatMsat (msatoshi) }
35
+ h3 #{ formatMsat (invoice . msatoshi ) }
36
36
37
- if status == ' paid'
37
+ if invoice . status == ' paid'
38
38
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 } ' }, '*')
40
40
41
- else if status == ' expired'
41
+ else if invoice . status == ' expired'
42
42
p.expired = opt .expired || ' Your invoice has expired. Please try again.'
43
43
44
- else if status == ' unpaid'
44
+ else if invoice . status == ' unpaid'
45
45
.row
46
46
.qr.col-sm-4 : img( src =qr)
47
47
.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'
50
50
51
51
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
52
58
53
59
script( src =settings .static_url + 'checkout.js' )
54
60
55
61
script .
56
62
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 }' }, ' *' ) }
58
64
updateHeight ()
59
65
window .addEventListener (' resize' , updateHeight)
60
66
}
0 commit comments