diff --git a/LICENSE b/LICENSE index 69bb478..920d694 100755 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ MIT License -Copyright (c) 2019-present sms77 e.K. +Copyright (c) 2019-2022 sms77 e.K. +Copyright (c) 2023-present seven communications GmbH & Co. KG Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +19,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/README.md b/README.md index e746c8a..b58eecd 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Sms77.io Logo](https://www.sms77.io/wp-content/uploads/2019/07/sms77-Logo-400x79.png "Sms77.io Logo") +![](https://www.seven.io/wp-content/uploads/Logo.svg "seven Logo") # Official PHP API Client @@ -11,7 +11,7 @@ composer require sms77/api ``` Alternatively you -can [download as *.ZIP](https://github.com/sms77io/php-client/releases/latest "download as *.ZIP") +can [download as *.ZIP](https://github.com/seven-io/php-client/releases/latest "download as *.ZIP") if you don't use Composer. ### Usage @@ -162,6 +162,6 @@ particular API key. SMS77_RECIPIENT is the recipient of the test SMS. ###### Support -Need help? Feel free to [contact us](https://www.sms77.io/en/company/contact/). +Need help? Feel free to [contact us](https://www.seven.io/en/company/contact/). [![MIT](https://img.shields.io/badge/License-MIT-teal.svg)](./LICENSE) diff --git a/composer.json b/composer.json index 8eca0c1..cce7f27 100755 --- a/composer.json +++ b/composer.json @@ -1,9 +1,9 @@ { "authors": [ { - "email": "a.matthies@sms77.io", - "homepage": "https://www.sms77.io", - "name": "sms77 e.K.", + "email": "support@seven.io", + "homepage": "https://www.seven.io", + "name": "seven communications GmbH & Co. KG", "role": "Developer" } ], @@ -22,8 +22,8 @@ "php": "7.3" } }, - "description": "Official API Client for requesting the Sms77.io SMS Gateway.", - "homepage": "https://github.com/sms77io/php-client", + "description": "Official API Client for requesting the seven.io SMS Gateway.", + "homepage": "https://github.com/seven-io/php-client", "keywords": [ "2fa", "sms", @@ -49,10 +49,10 @@ "ext-simplexml": "*" }, "support": { - "docs": "https://github.com/sms77io/php-client", - "email": "support@sms77.io", - "rss": "https://www.sms77.io/de/feed/", - "source": "https://github.com/sms77io/php-client" + "docs": "https://github.com/seven-io/php-client", + "email": "support@seven.io", + "rss": "https://www.seven.io/en/feed/", + "source": "https://github.com/seven-io/php-client" }, "type": "library" } diff --git a/src/BaseClient.php b/src/BaseClient.php index 620ce83..d7f608a 100644 --- a/src/BaseClient.php +++ b/src/BaseClient.php @@ -76,11 +76,16 @@ private function request(string $path, string $method, array $options = []) { ]; $url = self::BASE_URI . "/$path"; $params = http_build_query($options); - self::HTTP_GET === $method && $url .= "?$params"; + if (self::HTTP_GET === $method) $url .= "?$params"; $ch = curl_init($url); if (self::HTTP_POST === $method) { + if ($path === 'sms') { + $headers[] = 'Content-Type: application/json'; + $params = stripslashes(json_encode($options)); + } + curl_setopt($ch, CURLOPT_POSTFIELDS, $params); curl_setopt($ch, CURLOPT_POST, true); } @@ -125,4 +130,4 @@ protected function post(string $path, array $options = []) { protected function get(string $path, array $options = []) { return $this->request($path, self::HTTP_GET, $options); } -} \ No newline at end of file +}