2017 © Pedro Peláez
 

library laravel-turbosms

Turbosms package for Laravel

image

uapixart/laravel-turbosms

Turbosms package for Laravel

  • Friday, June 23, 2017
  • by ua.pixart
  • Repository
  • 1 Watchers
  • 3 Stars
  • 3,068 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 8 Versions
  • 39 % Grown

The README.md

laravel-turbosms

A package for the Laravel Framework for sending emails using the Turbosms.ua by SOAP., (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

composer require uapixart/laravel-turbosms

Add to config/app.php:, (*4)

'providers' => array(
//...
    Uapixart\LaravelTurbosms\TurbosmsServiceProvider::class,
//...
),
'aliases' => array(
//...
    'Turbosms' => Uapixart\LaravelTurbosms\TurbosmsFacade::class,
//...
),

Then run command:, (*5)

$ php artisan vendor:publish --provider="Uapixart\LaravelTurbosms\TurbosmsServiceProvider"

Basic setup

You should: * registered account at http://turbosms.ua/ * add sender in page https://turbosms.ua/sign/add.html * create login and password for soap api in page https://turbosms.ua/route.html, (*6)

Configuration

In your config/turbosms.php, change the following, (*7)

'login' => '',
'password' => '',
'sender' => '',
'options' => [],
'debug' => false,

in debug mode sms not send only add to db table. If you need proxy:, (*8)

'options' => ['proxy_host' => "proxy.com", 'proxy_port' => 3128],

Usage

Send messages

Once the extension is installed, simply use it in your code by:, (*9)

Turbosms::send('+380XXXXXXXXX','test');

or for multiple recipients:, (*10)

Turbosms::send(['+380XXXXXXXXX','+380XXXXXXXXX'],'test');

Example for response this command:, (*11)

Turbosms::send(['+9873','+3805037512XX'],'Test');
array:2 [▼
  0 => array:3 [▼
    "status" => 3
    "status_detail" => "Message undelivered: Не удалось распознать номер получателя "+9873""
    "messageid" => null
  ]
  1 => array:3 [▼
    "status" => 1
    "status_detail" => "Message send"
    "messageid" => "f7a6e2c8-5931-7dda-1d29-19c0bfec6beb"
  ]
]

Statuses:

0 - new message, (*12)

1 - in queue, (*13)

2 - message wait retry in queue, (*14)

3 - message send, (*15)

4 - message failed, (*16)

Get credit balances

Get balance for user account from config, (*17)

Turbosms::getBalance();

Get message status

Get status for message id, (*18)

Turbosms::getMessageStatus('f7a6e2c8-5931-7dda-1d29-19c0bfec6beb');

and response:, (*19)

array:1 [▼
  0 => array:2 [▼
    "status" => 4
    "status_description" => "Сообщение доставлено получателю"
  ]
]

Statuses can be next:, (*20)

'0' => 'Сообщение с ID X не найдено',
'1' => 'Отправлено', *
'2' => 'В очереди', *
'3' => 'Сообщение передано в мобильную сеть', *
'4' => 'Сообщение доставлено получателю',
'5' => 'Истек срок сообщения',
'6' => 'Удалено оператором',
'7' => 'Не доставлено',
'8' => 'Сообщение доставлено на сервер', *
'9' => 'Отклонено оператором',
'10' => 'Неизвестный статус',
'11' => 'Ошибка, сообщение не отправлено',
'12' => 'Не достаточно кредитов на счете',
'13' => 'Отправка отменена',
'14' => 'Отправка приостановлена',
'15' => 'Удалено пользователем',

* - The status of the messages will change until the final status, (*21)

The Versions

23/06 2017

dev-master

9999999-dev

Turbosms package for Laravel

  Sources   Download

MIT

The Requires

 

laravel turbosms

23/06 2017

1.0.6

1.0.6.0

Turbosms package for Laravel

  Sources   Download

MIT

The Requires

 

laravel turbosms

06/06 2017

1.0.5

1.0.5.0

Turbosms package for Laravel

  Sources   Download

MIT

The Requires

 

laravel turbosms

06/06 2017

1.0.4

1.0.4.0

Turbosms package for Laravel

  Sources   Download

MIT

The Requires

 

laravel turbosms

06/06 2017

1.0.3

1.0.3.0

Turbosms package for Laravel

  Sources   Download

The Requires

 

laravel turbosms

06/06 2017

1.0.2

1.0.2.0

Turbosms package for Laravel

  Sources   Download

02/06 2017

1.0.1

1.0.1.0

Turbosms package for Laravel

  Sources   Download

02/06 2017

1.0.0

1.0.0.0

Turbosms package for Laravel

  Sources   Download