Skip to content

Guard closed invoice payment events#495

Open
phucnguyen1707 wants to merge 1 commit into
profullstack:masterfrom
phucnguyen1707:fix/closed-invoice-webhook-guard
Open

Guard closed invoice payment events#495
phucnguyen1707 wants to merge 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

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.

1 participant