Skip to content

fix: safely archive duplicate pending merchants - #26

Merged
PDFly-source merged 9 commits into
mainfrom
fix/admin-archive-pending-merchant
Dec 1, 2026
Merged

PDFly-source merged 9 commits into
mainfrom
fix/admin-archive-pending-merchant

Conversation

@PDFly-source

@PDFly-source PDFly-source commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add an authenticated Admin-only archive-pending action for pending merchant records.
  • Require a recorded reason and re-check the merchant is still pending.
  • Fail closed if Limited Access, active API keys, transactions, payment links, checkout sessions or provider connections exist.
  • Archive and its authenticated-admin audit entry are written in one D1 batch; the audit records the real admin identity.
  • Preserve the merchant row, gateway application, onboarding records and audit history; mark the merchant suspended and add an explicit merchant.pending_archived audit event.
  • Add a visible archive action in the Admin pending queue and distinguish archived records in the suspended queue.
  • Keep the existing active Limited Access OxigenDev record untouched; this change does not approve UPI ownership or enable live payments.

Validation

Safety

  • No direct D1 mutation, no hard delete, no production deployment.
  • The archive action remains protected by the existing Admin authentication gate.
  • Do not archive records with active access or payment assets.

@PDFly-source
PDFly-source marked this pull request as ready for review December 1, 2026 06:32
@PDFly-source
PDFly-source merged commit bc980a7 into main Dec 1, 2026
1 check 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.

1 participant