diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 2c02c29..dd3fa98 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -79,44 +79,44 @@ class Controller extends BaseController $platforms = []; $send_sms = true; $user = User::where('mobile', $to)->first() ?: Customer::where('mobile', $to)->first(); - if ($user) { - - // Telegram - if (isset($credentials['telegram']) && $user->telegram) { - try { - $res = Http::get("https://api.wwwapp.ir/telegran_send.php", [ - 'botToken' => $credentials['telegram']['token'], - 'chatId' => $user->telegram, - 'message' => "جناب {$user->name} {$msg}", - ]); - $data = $res->json(); - if (isset($data['success']) && $data['success'] === true) { - $platforms[] = "telegram:{$user->telegram}"; - $send_sms = false; - } - } catch (\Exception $e) { - } - } - - // Bale - if (isset($credentials['bale']) && $user->bale) { - try { - Http::get("https://api.wwwapp.ir/bale_send.php", [ - 'botToken' => $credentials['bale']['token'], - 'chatId' => $user->bale, - 'message' => "جناب {$user->name} {$msg}", - ]); - $platforms[] = "bale:{$user->bale}"; - $send_sms = false; - } catch (\Exception $e) { - } - } - } +// if ($user) { +// +// // Telegram +// if (isset($credentials['telegram']) && $user->telegram) { +// try { +// $res = Http::get("https://api.wwwapp.ir/telegran_send.php", [ +// 'botToken' => $credentials['telegram']['token'], +// 'chatId' => $user->telegram, +// 'message' => "جناب {$user->name} {$msg}", +// ]); +// $data = $res->json(); +// if (isset($data['success']) && $data['success'] === true) { +// $platforms[] = "telegram:{$user->telegram}"; +// $send_sms = false; +// } +// } catch (\Exception $e) { +// } +// } +// +// // Bale +// if (isset($credentials['bale']) && $user->bale) { +// try { +// Http::get("https://api.wwwapp.ir/bale_send.php", [ +// 'botToken' => $credentials['bale']['token'], +// 'chatId' => $user->bale, +// 'message' => "جناب {$user->name} {$msg}", +// ]); +// $platforms[] = "bale:{$user->bale}"; +// $send_sms = false; +// } catch (\Exception $e) { +// } +// } +// } //SMS if ($send_sms or $force_method=="sms") { $endpoint = "http://www.0098sms.com/sendsmslink.aspx"; - $response = Http::get($endpoint, [ + $response = Http::withoutVerifying()->get($endpoint, [ 'FROM' => $credentials['sms']['sender'], 'TO' => $to, 'TEXT' => trim($msg), diff --git a/app/Http/Controllers/Single/BankAccountController.php b/app/Http/Controllers/Single/BankAccountController.php index ae3a117..721a6a2 100644 --- a/app/Http/Controllers/Single/BankAccountController.php +++ b/app/Http/Controllers/Single/BankAccountController.php @@ -45,7 +45,7 @@ class BankAccountController extends SuperController $message .= $this->Config('name_fa'); User::where('active', 1) ->where('send_sms', 1)->get()->each(function($admin) use ($message) { - $this->Send($admin->mobile, $message); +// $this->Send($admin->mobile, $message); }); $data = $request->only(['account_number', 'bank_name', 'cart_number', 'shaba_number', 'customer_id']); BankAccount::create($data);