Skip to content

Commit

Permalink
fix: invoice auto marked as paid
Browse files Browse the repository at this point in the history
  • Loading branch information
cameri committed Apr 21, 2023
1 parent 769a3f6 commit be6d6f1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions resources/invoices.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ <h2 class="text-danger">Invoice expired!</h2>
console.log('data', data)
const { status } = data;

if (status === 'pending') {
fallbackTimeout = setTimeout(getInvoiceStatus, getBackoffTime())
return
} else if (status === 'expired') {
console.log('invoice status', status)

if (status === 'expired') {
hide('pending')
show('expired')
return
} else {
console.log('invoice status', status)
} else if (status !== 'completed') {
fallbackTimeout = setTimeout(getInvoiceStatus, getBackoffTime())
return
}

paid = true
Expand Down

0 comments on commit be6d6f1

Please sign in to comment.