From 87f9ad4aec046af7313db3132e599517da95f9ca Mon Sep 17 00:00:00 2001 From: gholak tala Date: Wed, 8 Apr 2026 06:24:46 +0000 Subject: [PATCH] NASER fix send to tahesab for withdraw --- .../Controllers/Customer/WalletController.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/Customer/WalletController.php b/app/Http/Controllers/Customer/WalletController.php index 45cba6b..427c410 100644 --- a/app/Http/Controllers/Customer/WalletController.php +++ b/app/Http/Controllers/Customer/WalletController.php @@ -178,14 +178,14 @@ class WalletController extends Controller $userMobile = $customer->mobile; // User's mobile number $userName = $customer->name; // User's name $withdrawAmount = $data['value']; // amount - - $tahesab = new TahesabController(); - $tahesab->wallet([ - "customer_id" => auth('customer')->id(), - "value" => $data['value'], - "direction" => 1, - ]); - + if($this->Config('send_to_tahesab') == "true") { + $tahesab = new TahesabController(); + $tahesab->wallet([ + "customer_id" => auth('customer')->id(), + "value" => $data['value'], + "direction" => 1, + ]); + } $companyName = $this->Config('name_fa'); // Company name from configuration $message = "کاربر $userName با شماره موبایل $userMobile درخواست برداشت مبلغ " . number_format($withdrawAmount) . " ریال را دارد. با تشکر، $companyName"; if (isset($request->otp)) {