fix some issu
This commit is contained in:
@@ -29,7 +29,7 @@ class MeliPayamakProvider implements SmsProviderInterface
|
||||
];
|
||||
|
||||
$handle = curl_init('https://rest.payamak-panel.com/api/SendSMS/SendSMS');
|
||||
curl_setopt_array($handle, [
|
||||
$opts = [
|
||||
CURLOPT_HTTPHEADER => ['content-type: application/x-www-form-urlencoded'],
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_SSL_VERIFYHOST => false,
|
||||
@@ -37,7 +37,16 @@ class MeliPayamakProvider implements SmsProviderInterface
|
||||
CURLOPT_POST => true,
|
||||
CURLOPT_POSTFIELDS => http_build_query($data),
|
||||
CURLOPT_TIMEOUT => 30,
|
||||
]);
|
||||
CURLOPT_CONNECTTIMEOUT => 5,
|
||||
CURLOPT_PROXY => '',
|
||||
];
|
||||
if (defined('CURLOPT_IPRESOLVE') && defined('CURL_IPRESOLVE_V4')) {
|
||||
$opts[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4;
|
||||
}
|
||||
if (defined('CURLOPT_HTTP_VERSION') && defined('CURL_HTTP_VERSION_1_1')) {
|
||||
$opts[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1;
|
||||
}
|
||||
curl_setopt_array($handle, $opts);
|
||||
|
||||
$response = curl_exec($handle);
|
||||
$error = curl_error($handle);
|
||||
|
||||
Reference in New Issue
Block a user