Skip to content

Add durable recharge provisioning outbox - #20

Merged
mahin-wpdev merged 1 commit into
mainfrom
fix/recharge-provisioning-outbox
Oct 14, 2026
Merged

mahin-wpdev merged 1 commit into
mainfrom
fix/recharge-provisioning-outbox

Conversation

@mahin-wpdev

Copy link
Copy Markdown
Owner

Recharge provisioning happens before the accounting transaction. If the router succeeds while a DB write fails, the customer can receive service without a recharge receipt or profit entry, and retrying the router call can extend service twice.

This adds a durable outbox around provisioning. Confirmed network work is finalized with the package entitlement, transaction, reseller profit, bill settlement, and outbox completion in one DB transaction. Cron replays only entries whose provisioning success was recorded; uncertain outcomes stop for manual review. Per-customer locking prevents a second recharge while reconciliation is pending.

Validation: release static invariants pass; PHP syntax checks pass with php -n -l on the live host. Full PHP and migration CI is pending.

@mahin-wpdev
mahin-wpdev merged commit f9f7405 into main Oct 14, 2026
3 checks passed
@mahin-wpdev
mahin-wpdev deleted the fix/recharge-provisioning-outbox branch October 14, 2026 07:17
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