feat: trace billing provisioning attempts
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/4d3e0745-26cf-404f-9674-ddc1446a12dd Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
81317e1485
commit
0296c0b623
8 changed files with 694 additions and 36 deletions
|
|
@ -397,8 +397,23 @@ if (!empty($newOrderIds)) {
|
|||
}
|
||||
} else {
|
||||
cap_log('AUTO_PROVISION_SKIPPED', 'panel bootstrap failed — orders require manual provisioning: ' . implode(',', $newOrderIds));
|
||||
$autoProvision = [
|
||||
'provisioned_count' => 0,
|
||||
'failed_count' => count($newOrderIds),
|
||||
'details' => [],
|
||||
'trace_log_path' => 'modules/billing/logs/provisioning_trace.log',
|
||||
'trace_error' => 'Panel bootstrap failed before billing provisioning could start.',
|
||||
];
|
||||
}
|
||||
}
|
||||
if (function_exists('billing_store_provision_session_result')) {
|
||||
billing_store_provision_session_result($txid, [
|
||||
'source' => 'api/capture_order.php',
|
||||
'txid' => $txid,
|
||||
'order_ids' => $newOrderIds,
|
||||
'result' => $autoProvision,
|
||||
]);
|
||||
}
|
||||
|
||||
unset($_SESSION['cart_coupon_code'], $_SESSION['cart_coupon_id']);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue