Sync SMS panel with SuperAdmin and mirror local wallet/logs.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -146,6 +146,27 @@ class SmsGatewayService
|
||||
'parts' => $parts,
|
||||
'source' => $source,
|
||||
]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Parallel period: mirror balance + local send log/ledger from SuperAdmin.
|
||||
try {
|
||||
$this->walletService->mirrorConsumeFromSuperAdmin(
|
||||
$to,
|
||||
$text,
|
||||
$parts,
|
||||
$providerName,
|
||||
$source,
|
||||
$isAlert,
|
||||
(int) ($consumed['balanceRials'] ?? 0),
|
||||
(int) ($consumed['costRials'] ?? 0),
|
||||
(int) ($consumed['pricePerPartRials'] ?? 0)
|
||||
);
|
||||
} catch (\Throwable $e) {
|
||||
Log::warning('SmsGateway: local mirror after SuperAdmin consume failed', [
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user