new feature on sms and some bugs fixed

This commit is contained in:
2026-07-18 22:22:01 +03:30
parent 518334da11
commit fc9de5198c
20 changed files with 489 additions and 95 deletions
+20 -20
View File
@@ -142,7 +142,7 @@ class WalletController extends Controller
//send sms to users and customer
$status = $data['value'] > 0 ?" شارژ شد ": " کسر شد ";
if($this->Config('charge_notif') == "true"){
if (self::isSmsNotifEnabled('charge_notif')) {
$message = 'کیف پول کاربر ' . $customer->name . ' به مقدار ' . self::formatSmsRialAmount($data['value']) . " ریال در تاریخ " . verta()->format('Y/n/j H:i:s') .$status . "بابت" . "\n"
. $data['note']
. "\n"
@@ -150,13 +150,13 @@ class WalletController extends Controller
User::where('send_sms', 1)->get()->each(function ($admin) use ($message, $data) {
$this->send($admin->mobile, $message);
});
}
$message = 'کیف پول شما به اندازه ' . self::formatSmsRialAmount($data['value']) . " ریال در تاریخ " . verta()->format('Y/n/j H:i:s') .$status . "بابت" . "\n"
. $data['note']
. "\n"
. $this->Config('name_fa');
$this->Send($customer->mobile, $message);
$message = 'کیف پول شما به اندازه ' . self::formatSmsRialAmount($data['value']) . " ریال در تاریخ " . verta()->format('Y/n/j H:i:s') .$status . "بابت" . "\n"
. $data['note']
. "\n"
. $this->Config('name_fa');
$this->Send($customer->mobile, $message);
}
$this->broadcastCustomerWalletAssets($customer);
return response()->json(true);
@@ -215,7 +215,7 @@ class WalletController extends Controller
//send sms to users and customer
$status = $data['value'] > 0 ?" شارژ شد ": " کسر شد ";
$weightUnit = self::tradeWeightUnit();
if($this->Config('charge_notif') == "true"){
if (self::isSmsNotifEnabled('charge_notif')) {
$message = 'کیف پول کاربر ' . $customer->name . ' به مقدار ' . self::formatSmsGoldWeight($data['value']) . " {$weightUnit} در تاریخ " . verta()->format('Y/n/j H:i:s') .$status . "بابت" . "\n"
. $data['note']
. "\n"
@@ -223,12 +223,12 @@ class WalletController extends Controller
User::where('send_sms', 1)->get()->each(function ($admin) use ($message, $data) {
$this->send($admin->mobile, $message);
});
}
$message = 'کیف پول شما به اندازه ' . self::formatSmsGoldWeight($data['value']) . " {$weightUnit} در تاریخ " . verta()->format('Y/n/j H:i:s') . $status . " بابت" . "\n"
. $data['note']
. $this->Config('name_fa');
$this->Send($customer->mobile, $message);
$message = 'کیف پول شما به اندازه ' . self::formatSmsGoldWeight($data['value']) . " {$weightUnit} در تاریخ " . verta()->format('Y/n/j H:i:s') . $status . " بابت" . "\n"
. $data['note']
. $this->Config('name_fa');
$this->Send($customer->mobile, $message);
}
$this->broadcastCustomerWalletAssets($customer);
return response()->json(true);
@@ -364,7 +364,7 @@ class WalletController extends Controller
$status = $deposit ? ' شارژ شد ' : ' کسر شد ';
$formatted = self::formatSmsGoldWeight($data['value']);
if ($this->Config('charge_notif') == 'true') {
if (self::isSmsNotifEnabled('charge_notif')) {
$message = 'کیف پول کاربر ' . $customer->name . ' به مقدار ' . $formatted . ' ' . $unitLabel . ' در تاریخ ' . verta()->format('Y/n/j H:i:s') . $status . 'بابت' . "\n"
. ($data['note'] ?? '')
. "\n"
@@ -372,13 +372,13 @@ class WalletController extends Controller
User::where('send_sms', 1)->get()->each(function ($admin) use ($message) {
$this->send($admin->mobile, $message);
});
}
$message = 'کیف پول شما به اندازه ' . $formatted . ' ' . $unitLabel . ' در تاریخ ' . verta()->format('Y/n/j H:i:s') . $status . ' بابت' . "\n"
. ($data['note'] ?? '')
. "\n"
. $this->Config('name_fa');
$this->Send($customer->mobile, $message);
$message = 'کیف پول شما به اندازه ' . $formatted . ' ' . $unitLabel . ' در تاریخ ' . verta()->format('Y/n/j H:i:s') . $status . ' بابت' . "\n"
. ($data['note'] ?? '')
. "\n"
. $this->Config('name_fa');
$this->Send($customer->mobile, $message);
}
$this->broadcastCustomerWalletAssets($customer);
return response()->json(true);