Skip to content

Commit

Permalink
fix missing recipient bug; add license; update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiez committed Feb 24, 2023
1 parent b9fd418 commit 2cd9cd1
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 12 deletions.
19 changes: 19 additions & 0 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
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.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
![](https://www.sms77.io/wp-content/uploads/2019/07/sms77-Logo-400x79.png "sms77 Logo")
![](https://www.seven.io/wp-content/uploads/Logo.svg "seven Logo")

# sms77 SMS for Open Source Point of Sale
# seven SMS for Open Source Point of Sale

This code implements sms77 as SMS gateway for sending messages via OSPOS.
This code implements seven as SMS gateway for sending messages via OSPOS.

## Prerequisites

- An API Key from [sms77](https://www.sms77.io) - you can create on in
your [developer dashboard](https://app.sms77.io/developer).
- An [API key](https://help.seven.io/en/api-key-access) from [seven](https://www.seven.io) - you can create on in
your [developer dashboard](https://app.seven.io/developer).
- An existing [OSPOS](https://opensourcepos.org/) installation.

## Installation
Expand All @@ -22,7 +22,7 @@ with [Sms_lib.php](Sms_lib.php).
2. Go to `Configuration -> Setup & Conf -> Message`.
3. Set `SMS-API Username` to any value, as the field is not used. Just make sure it's not
empty.
4. Set `SMS-API Password` to your sms77 API key.
4. Set `SMS-API Password` to your seven [API key](https://help.seven.io/en/api-key-access).
5. Set `SMS-API Sender ID` to your sender identifier of choice with a maximum length of 11
alphanumeric or 16 numeric characters. This value gets displayed as the sender in the
receivers phone device. Please notice that country specific restrictions may apply,
Expand All @@ -34,5 +34,7 @@ See the [screenshot](configuration.png) for an example configuration.

## Support

Feel free to [contact us](https://www.sms77.io/en/company/contact/) in case you need any
assistance.
Feel free to [contact us](https://www.seven.io/en/company/contact/) in case you need any
assistance.

[![MIT](https://img.shields.io/badge/License-MIT-teal.svg)](LICENSE)
6 changes: 2 additions & 4 deletions Sms_lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public function sendSMS($to, $text) {
$from = $this->CI->config->item('msg_src');
$response = false;

if (!empty($password) && !empty($phone) && !empty($text) && !empty($from)) {
$ch = curl_init('https://gateway.sms77.io/api/sms');
if (!empty($password) && !empty($to) && !empty($text) && !empty($from)) {
$ch = curl_init('https://gateway.seven.io/api/sms');
$options = [
CURLOPT_HTTPHEADER => [
'Accept: application/json',
Expand All @@ -39,5 +39,3 @@ public function sendSMS($to, $text) {
return $response;
}
}

?>

0 comments on commit 2cd9cd1

Please sign in to comment.