2017 © Pedro Peláez
 

package epochta-sms

Package for sending SMS in Laravel ~5.3

image

fomvasss/epochta-sms

Package for sending SMS in Laravel ~5.3

  • Monday, March 27, 2017
  • by fomvasss
  • Repository
  • 1 Watchers
  • 2 Stars
  • 80 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Epochta-sms

Package for sending SMS in Laravel ~5.3 (use service https://www.epochta.ru), (*1)

Install

composer require "fomvasss/epochta-sms"

register the service provider and aliases in config/app.php:, (*2)

  Fomvasss\Epochta\EpochtaServiceProvider::class,
  ...
  'Epochta' => Fomvasss\Epochta\Services\Epochta::class,

Then publish assets with, (*3)

php artisan vendor:publish

This will add the file config/epchta_sms.php, (*4)

Config

Edit file config/epchta_sms.php, set: - private_key - public_key - test_mode - sms_lifetime - currency, (*5)

Using

Using facades Epochta

use Fomvasss\Epochta\Services\Facade\Epochta;

Now, you can use next:, (*6)

Epochta::sendSms($sender, $text, $phone) //return ID SMS
Epochta::getUserBalance()   //return float
Epochta::getSmsStatus($idSms);  //return string status SMS

Function getSmsStatus() return next statuses: - Ошибка сервера - В очереди отправки - Отправлено - Доставлено - Не доставлено - Неверный номер - Отрправлено в спам, (*7)

Using objects APISMS, Addressbook and Account (original API)

use Fomvasss\Epochta\Libraries\APISMS;
use Fomvasss\Epochta\Libraries\Account;
use Fomvasss\Epochta\Libraries\Addressbook;
use Fomvasss\Epochta\Libraries\Exceptions;
$sms=new APISMS();
$addressbook=new Addressbook($Gateway);
$account=new Account($Gateway);
$account=new Exceptions($Gateway);


Example sended SMS
$res = $sms->sendSMS('SenderName', 'your sms text :)', '+380969416666', null, 0); $res['result']['id']; // ID SMS

Other method and API see this doc: - https://www.epochta.com.ua/products/sms/v3.php - https://www.epochta.ru/products/sms/php-30-example.php, (*8)

The Versions

27/03 2017

dev-fomin

dev-fomin https://github.com/fomvasss/epochta-sms

Package for sending SMS in Laravel ~5.3

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by Fomin Vasyl

sms epochta

27/03 2017

v1.0.2

1.0.2.0 https://github.com/fomvasss/epochta-sms

Package for sending SMS in Laravel ~5.3

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by Fomin Vasyl

sms epochta

13/12 2016

v1.0.1

1.0.1.0 https://github.com/fomvasss/epochta-sms

Package for sending SMS in Laravel 5.3

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by Fomin Vasyl

sms epochta