opensms
This commit is contained in:
@@ -75,26 +75,26 @@ if (! function_exists('sendSMS')) {
|
||||
|
||||
return [];
|
||||
|
||||
// $response = Http::withToken('WsTEJTBGlQiJ')
|
||||
// ->retry(
|
||||
// times: 3,
|
||||
// sleepMilliseconds: 50,
|
||||
// throw: false,
|
||||
// when: function (Exception $exception, PendingRequest $request) {
|
||||
// Log::channel('sms_api_error')
|
||||
// ->error('Exception: ', [
|
||||
// 'message' => $exception->getMessage(),
|
||||
// 'line' => $exception->getLine(),
|
||||
// ]);
|
||||
$response = Http::withToken('WsTEJTBGlQiJ')
|
||||
->retry(
|
||||
times: 3,
|
||||
sleepMilliseconds: 50,
|
||||
throw: false,
|
||||
when: function (Exception $exception, PendingRequest $request) {
|
||||
Log::channel('sms_api_error')
|
||||
->error('Exception: ', [
|
||||
'message' => $exception->getMessage(),
|
||||
'line' => $exception->getLine(),
|
||||
]);
|
||||
|
||||
// return true;
|
||||
// })
|
||||
// ->post('https://sms.post.gov.tm/api/clients/sms/create', [
|
||||
// 'phone' => '993'.$phone,
|
||||
// 'content' => $message,
|
||||
// ]);
|
||||
return true;
|
||||
})
|
||||
->post('https://sms.post.gov.tm/api/clients/sms/create', [
|
||||
'phone' => '993'.$phone,
|
||||
'content' => $message,
|
||||
]);
|
||||
|
||||
// return $response->json();
|
||||
return $response->json();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user