NewwayLibs / TurboSms by yaapis

Package for TurboSMS service(http://turbosms.ua/)
24
0
3
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-04-11 03:20:20
Package Statistics
Total Downloads: 24
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 3
Total Forks: 4
Total Open Issues: 0

Package for [TurboSMS] (http://turbosms.ua/) for Laravel 5

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...

Installation

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',
)

Package config

	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) {}