noticero / notice-sdk-php
PHP SDK Wrapper around notice.ro API
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/noticero/notice-sdk-php
Requires
- guzzlehttp/guzzle: ^7.0
README
Check documentation before:
Installation:
composer require noticero/notice-sdk-php
Usage:
use Notice\SdkPhp\SdkPhp;
require_once 'vendor/autoload.php';
$notice = new SdkPhp('YOUR-API-TOKEN');
Send SMS:
Using just number and message:
$notice->sendSms([
'number' => '07XXXXXXXX',
'message' => 'Hello, world!'
]);
Using template_id and variables:
$notice->sendSms([
'number' => '07XXXXXXXX',
'template_id' => 1,
'variables' => [
'order_id' => '123',
'total' => '100',
]
]);
See available variables to use with templates here
Get Incoming SMS List:
$notice->getIncomeSmsList();
Get Sent SMS List:
$notice->getSentSmsList();
Get Template List:
$notice->getTemplates();