diff --git a/composer.json b/composer.json index 4040149..8d6ecc6 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "guzzlehttp/guzzle": "^6.3|^7.3", "ext-json": "*", "ext-curl": "*", - "php": ">=7.2" + "php": ">=7.3" }, "autoload": { "psr-4": { diff --git a/src/Provider/AjuraTech.php b/src/Provider/AjuraTech.php index 1e54fcd..0199791 100644 --- a/src/Provider/AjuraTech.php +++ b/src/Provider/AjuraTech.php @@ -19,6 +19,7 @@ class AjuraTech extends AbstractProvider { + private string $apiEndpoint = 'https://smpp.ajuratech.com:7790/sendtext?json'; /** * Ajuratech constructor. * @param Sender $sender @@ -52,7 +53,7 @@ public function sendRequest() 'messageContent' => $text, ]; - $requestObject = new Request('https://smpp.ajuratech.com:7790/sendtext?json', $query, $queue); + $requestObject = new Request($this->apiEndpoint, $query, $queue); $response = $requestObject->get(); if ($queue) { return true; diff --git a/src/Provider/BDBulkSms.php b/src/Provider/BDBulkSms.php index e9eb092..7773511 100644 --- a/src/Provider/BDBulkSms.php +++ b/src/Provider/BDBulkSms.php @@ -18,6 +18,7 @@ class BDBulkSms extends AbstractProvider { + private string $apiEndpoint = 'http://api.greenweb.com.bd/api2.php'; /** * BDBulkSms constructor. * @param Sender $sender @@ -42,7 +43,7 @@ public function sendRequest() 'to' => $number, 'message' => $text, ]; - $requestObject = new Request('http://api.greenweb.com.bd/api2.php', $query, $queue); + $requestObject = new Request($this->apiEndpoint, $query, $queue); $response = $requestObject->get(); if ($queue) { diff --git a/src/Provider/Banglalink.php b/src/Provider/Banglalink.php index c06a2c7..e3aa5fe 100644 --- a/src/Provider/Banglalink.php +++ b/src/Provider/Banglalink.php @@ -18,6 +18,8 @@ class Banglalink extends AbstractProvider { + private string $apiEndpoint = 'https://vas.banglalink.net/sendSMS/sendSMS'; + /** * Banglalink constructor. * @param Sender $sender @@ -46,7 +48,7 @@ public function sendRequest() 'message' => $text, ]; - $requestObject = new Request('https://vas.banglalink.net/sendSMS/sendSMS', [], $queue); + $requestObject = new Request($this->apiEndpoint, [], $queue); $requestObject->setFormParams($formParams); $response = $requestObject->post(); if ($queue) { diff --git a/src/Provider/BoomCast.php b/src/Provider/BoomCast.php index 2b9b5aa..d216b7c 100644 --- a/src/Provider/BoomCast.php +++ b/src/Provider/BoomCast.php @@ -9,6 +9,7 @@ class BoomCast extends AbstractProvider { + private string $apiEndpoint = 'https://api.boom-cast.com/boomcast/WebFramework/boomCastWebService/OTPMessage.php'; /** * BoomCast Constructor * @param Sender $sender @@ -43,7 +44,7 @@ public function sendRequest() "message" => $text, ]; - $requestObject = new Request('https://api.boom-cast.com/boomcast/WebFramework/boomCastWebService/OTPMessage.php', $query, $queue); + $requestObject = new Request($this->apiEndpoint, $query, $queue); $response = $requestObject->get(); if ($queue) { diff --git a/src/Provider/Brilliant.php b/src/Provider/Brilliant.php index 84aba02..330e76f 100644 --- a/src/Provider/Brilliant.php +++ b/src/Provider/Brilliant.php @@ -17,6 +17,8 @@ class Brilliant extends AbstractProvider { + private string $apiEndpoint ='http://sms.brilliant.com.bd:6005/api/v2/SendSMS'; + /** * Brilliant constructor. * @param Sender $sender @@ -45,7 +47,7 @@ public function sendRequest() 'Is_Unicode' => true, ]; - $requestObject = new Request('http://sms.brilliant.com.bd:6005/api/v2/SendSMS', $query, $queue); + $requestObject = new Request($this->apiEndpoint, $query, $queue); $response = $requestObject->get(); if ($queue) { return true; diff --git a/src/Provider/BulkSmsBD.php b/src/Provider/BulkSmsBD.php index 069a08d..5be6ac2 100644 --- a/src/Provider/BulkSmsBD.php +++ b/src/Provider/BulkSmsBD.php @@ -19,6 +19,7 @@ class BulkSmsBD extends AbstractProvider { + private string $apiEndpoint = 'https://bulksmsbd.net/api/smsapi'; /** * BulkSmsBD constructor. * @param Sender $sender @@ -52,7 +53,7 @@ public function sendRequest() - $requestObject = new Request('https://bulksmsbd.net/api/smsapi', $query, $queue); + $requestObject = new Request($this->apiEndpoint, $query, $queue); $response = $requestObject->get(); if ($queue) { return true; diff --git a/src/Provider/DianaHost.php b/src/Provider/DianaHost.php index 33eebcc..d8c25f6 100644 --- a/src/Provider/DianaHost.php +++ b/src/Provider/DianaHost.php @@ -17,6 +17,8 @@ class DianaHost extends AbstractProvider { + private string $apiEndpoint ='http://esms.dianahost.com/smsapi'; + /** * DianaHost constructor. * @param Sender $sender @@ -45,7 +47,7 @@ public function sendRequest() ]; - $requestObject = new Request('http://esms.dianahost.com/smsapi', $query, $queue); + $requestObject = new Request($this->apiEndpoint, $query, $queue); $response = $requestObject->get(); if ($queue) { return true;