Package Data | |
---|---|
Maintainer Username: | yaapis |
Maintainer Contact: | yaapis@gmail.com (Bilyk Andrey) |
Package Create Date: | 2015-03-28 |
Package Last Update: | 2016-08-26 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-15 15:17:59 |
Package Statistics | |
---|---|
Total Downloads: | 25 |
Monthly Downloads: | 1 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 3 |
Total Forks: | 4 |
Total Open Issues: | 0 |
This package still in beta. The main problem - SOAP API from TurboSMS (be realists - it's awful). I've contact with TurboSMS's support - lets see what they will do with my request...
Require this package in your composer.json:
"newway/turbo-sms": "dev-master"
And add the ServiceProvider to the providers array in config/app.php
'Newway\TurboSms\ServiceProvider',
Publish config using artisan CLI (if you want to overwrite default config).
php artisan vendor:publish --tag="config"
You can register the facade in the aliases
key of your config/app.php
file.
'aliases' => array(
'TurboSms' => 'Newway\TurboSms\Facade',
)
return array(
/*
|--------------------------------------------------------------------------
| URL
|--------------------------------------------------------------------------
|
| URL for the SOAP API
|
*/
'url' => 'http://turbosms.in.ua/api/wsdl.html',
/*
|--------------------------------------------------------------------------
| Credentials for auth
|--------------------------------------------------------------------------
*/
'auth' => [
'login' => env('TURBO_SMS_LOGIN'),
'password' => env('TURBO_SMS_PASSWORD'),
],
/*
|--------------------------------------------------------------------------
| Sender name
|--------------------------------------------------------------------------
*/
'sender' => env('TURBO_SMS_SENDER'),
);
##Usage
try {
$balance = Newway\TurboSms\Facade::getBalance();
print_r($balance);
$message_id = Newway\TurboSms\Facade::send('Test message', '+38099999999');
print_r($message_id);
$status = Newway\TurboSms\Facade::getStatus($message_id);
print_r($status);
} catch (Newway\TurboSms\Exceptions\TurboSmsException $e) {}