added tahesab options

This commit is contained in:
2026-06-25 22:20:40 +03:30
parent 936cc88e53
commit e6e1ff0cc4
11 changed files with 411 additions and 144 deletions
@@ -234,18 +234,21 @@ class WalletController extends Controller
$userName = $customer->name; // User's name
$withdrawAmount = $data['value']; // amount
if($this->Config('send_to_tahesab') == "true") {
$tahesab = new TahesabController();
$result = $tahesab->wallet([
"customer_id" => auth('customer')->id(),
"value" => $data['value'],
"direction" => 1,
]);
try {
$result = app(TahesabController::class)->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,
]);
\Log::info('Tahesab withdraw result', [
'customer_id' => auth('customer')->id(),
'value' => $data['value'],
'result' => $result,
]);
} catch (\Exception $e) {
report($e);
}
}
$companyName = $this->Config('name_fa'); // Company name from configuration
$message = "کاربر $userName با شماره موبایل $userMobile درخواست برداشت مبلغ " . number_format($withdrawAmount) . " ریال را دارد. با تشکر، $companyName";