fix: make invoice payment activation idempotent #18

Merged
sirily merged 4 commits from fix/invoice-payment-idempotency-audit into master 2026-03-10 17:53:01 +03:00
Owner

Closes #2

Summary

  • make markInvoicePaid idempotent for already-paid invoices and reject invalid terminal transitions
  • add admin actor metadata and audit-log writes for mark-paid, including replayed no-op calls
  • add focused DB tests for first activation, replay safety, and invalid transition handling
  • document the current payment system, including invoice creation, manual activation, quota reset, and current limitations

Testing

  • built infra/docker/web.Dockerfile
  • ran pnpm --filter @nproxy/db test inside the built container
  • verified @nproxy/db build and @nproxy/web build during the image build
Closes #2 ## Summary - make `markInvoicePaid` idempotent for already-paid invoices and reject invalid terminal transitions - add admin actor metadata and audit-log writes for `mark-paid`, including replayed no-op calls - add focused DB tests for first activation, replay safety, and invalid transition handling - document the current payment system, including invoice creation, manual activation, quota reset, and current limitations ## Testing - built `infra/docker/web.Dockerfile` - ran `pnpm --filter @nproxy/db test` inside the built container - verified `@nproxy/db build` and `@nproxy/web build` during the image build
sirily added 1 commit 2026-03-10 17:13:52 +03:00
sirily added 1 commit 2026-03-10 17:30:43 +03:00
sirily added 1 commit 2026-03-10 17:37:18 +03:00
sirily added 1 commit 2026-03-10 17:51:52 +03:00
sirily merged commit 1b2a4a076a into master 2026-03-10 17:53:01 +03:00
sirily deleted branch fix/invoice-payment-idempotency-audit 2026-03-10 17:53:01 +03:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sirily/nroxy#18