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:
parent
d636f65647
commit
2a6c8440aa
8 changed files with 130 additions and 23 deletions
|
|
@ -558,10 +558,8 @@ function wh_fulfill_payment(mysqli $db, string $pfx, array $payment, string $bil
|
|||
$last_order_id = $order_id;
|
||||
$existing_home_id = intval($row['home_id'] ?? 0);
|
||||
wh_log('info', 'order_renewed', ['order_id' => $order_id, 'new_end' => $new_end, 'home_id' => $existing_home_id]);
|
||||
if ($existing_home_id <= 0) {
|
||||
$dir = ($billing_dir !== '') ? $billing_dir : dirname(__DIR__);
|
||||
wh_try_provision($dir, $order_id, $user_id);
|
||||
}
|
||||
$dir = ($billing_dir !== '') ? $billing_dir : dirname(__DIR__);
|
||||
wh_try_provision($dir, $order_id, $user_id);
|
||||
}
|
||||
} else {
|
||||
// New order: create billing_orders row
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue