wip
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
use App\Models\Auth\Verification;
|
||||
use App\Models\Ecommerce\Channel\Channel;
|
||||
use App\Models\Ecommerce\Product\Inventory\Inventory;
|
||||
use App\Models\System\Settings\Settings;
|
||||
use App\Repositories\Ecommerce\Product\Barcode\BarcodeRepository;
|
||||
use Illuminate\Http\Client\PendingRequest;
|
||||
use Illuminate\Support\Collection;
|
||||
@@ -71,21 +70,21 @@ if (! function_exists('sendSMS')) {
|
||||
function sendSMS(string|int $phone, string|int $message): mixed
|
||||
{
|
||||
$response = Http::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(),
|
||||
]);
|
||||
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;
|
||||
})
|
||||
return true;
|
||||
})
|
||||
->post('http://216.250.14.144:3000/api/data', [
|
||||
'phone' => '+993'.$phone,
|
||||
'code' => $message,
|
||||
'phone' => '+993'.$phone,
|
||||
'code' => $message,
|
||||
]);
|
||||
|
||||
return $response->body();
|
||||
@@ -355,7 +354,7 @@ if (! function_exists('calculateProductPriceAmount')) {
|
||||
*/
|
||||
function halkbankCredentials(string $key = ''): int|string|array
|
||||
{
|
||||
return match($key) {
|
||||
return match ($key) {
|
||||
'username' => 516122500260,
|
||||
'password' => 'MrZsO9wfgWOBjf4',
|
||||
default => [
|
||||
@@ -368,7 +367,7 @@ function halkbankCredentials(string $key = ''): int|string|array
|
||||
/**
|
||||
* Create halkbank order
|
||||
*
|
||||
* @param string $price
|
||||
* @param string $price
|
||||
* @return array{status: string, url: string|null}
|
||||
*/
|
||||
function createHalkbankOrder($price = 123): array
|
||||
|
||||
Reference in New Issue
Block a user