fix: auto-run and harden billing provisioning idempotency

Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/a39ca073-858c-4e1e-978f-09caabb0f029

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-05-09 14:16:41 +00:00 committed by GitHub
parent d636f65647
commit 2a6c8440aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 130 additions and 23 deletions

View file

@ -180,7 +180,8 @@ foreach ($invoices as $inv) {
]);
if ($currentHomeId > 0) {
$repo->updateInvoiceFields($invoiceId, ['home_id' => $currentHomeId]);
} else {
}
if (!in_array($orderId, $newOrderIds, true)) {
$newOrderIds[] = $orderId;
}
} else {
@ -206,7 +207,9 @@ foreach ($invoices as $inv) {
if ($newOrderId > 0) {
$repo->updateInvoiceOrderId($invoiceId, $newOrderId);
$repo->updateInvoiceFields($invoiceId, ['order_id' => $newOrderId]);
$newOrderIds[] = $newOrderId;
if (!in_array($newOrderId, $newOrderIds, true)) {
$newOrderIds[] = $newOrderId;
}
}
}
}