Skip to content

Guard closed invoice payment events#495

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
phucnguyen1707:fix/closed-invoice-webhook-guard
Jul 9, 2026
Merged

Guard closed invoice payment events#495
ralyodio merged 1 commit into
profullstack:masterfrom
phucnguyen1707:fix/closed-invoice-webhook-guard

Conversation

@phucnguyen1707

Copy link
Copy Markdown
Contributor

Summary

  • only settle gig invoices from payable/open statuses when CoinPay reports confirmed or forwarded
  • preserve rejected/cancelled invoices so stale payment events cannot revive them as paid
  • apply the same closed-invoice guard to webhook metadata updates and payment-status sync

Tests

  • ./node_modules/.bin/vitest run src/app/api/payments/coinpayportal/webhook/route.test.ts
  • ./node_modules/.bin/vitest run src/lib/coinpay-payment-sync.test.ts
  • ./node_modules/.bin/eslint src/app/api/payments/coinpayportal/webhook/route.ts src/app/api/payments/coinpayportal/webhook/route.test.ts src/lib/coinpay-payment-sync.ts src/lib/coinpay-payment-sync.test.ts
  • ./node_modules/.bin/tsc --noEmit
  • ./node_modules/.bin/vitest run --reporter=dot

@ralyodio
ralyodio merged commit 465ce61 into profullstack:master Jul 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants