Skip to content

Commit be6d6f1

Browse files
committed
fix: invoice auto marked as paid
1 parent 769a3f6 commit be6d6f1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

resources/invoices.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ <h2 class="text-danger">Invoice expired!</h2>
123123
console.log('data', data)
124124
const { status } = data;
125125

126-
if (status === 'pending') {
127-
fallbackTimeout = setTimeout(getInvoiceStatus, getBackoffTime())
128-
return
129-
} else if (status === 'expired') {
126+
console.log('invoice status', status)
127+
128+
if (status === 'expired') {
130129
hide('pending')
131130
show('expired')
132131
return
133-
} else {
134-
console.log('invoice status', status)
132+
} else if (status !== 'completed') {
133+
fallbackTimeout = setTimeout(getInvoiceStatus, getBackoffTime())
134+
return
135135
}
136136

137137
paid = true

0 commit comments

Comments
 (0)