added log for better response

This commit is contained in:
2026-05-29 21:28:50 +03:30
parent 847b856078
commit 497ccd7e14
2 changed files with 13 additions and 1 deletions
@@ -174,6 +174,12 @@ class TahesabController extends Controller
//MultiRadif
]
])->json();
\Log::info('Tahesab wallet response', [
'data' => $data,
'response' => $response ?? null,
]);
} catch (\Exception $e) {
return $e->getMessage();
}
@@ -197,11 +197,17 @@ class WalletController extends Controller
$withdrawAmount = $data['value']; // amount
if($this->Config('send_to_tahesab') == "true") {
$tahesab = new TahesabController();
$tahesab->wallet([
$result = $tahesab->wallet([
"customer_id" => auth('customer')->id(),
"value" => $data['value'],
"direction" => 1,
]);
\Log::info('Tahesab withdraw result', [
'customer_id' => auth('customer')->id(),
'value' => $data['value'],
'result' => $result,
]);
}
$companyName = $this->Config('name_fa'); // Company name from configuration
$message = "کاربر $userName با شماره موبایل $userMobile درخواست برداشت مبلغ " . number_format($withdrawAmount) . " ریال را دارد. با تشکر، $companyName";