sersid/yii2-smsaero

Integration of SMS-messages to yii2 application

Installs: 481

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

1.0.0 2014-11-11 00:14 UTC

This package is not auto-updated.

Last update: 2020-07-06 05:38:02 UTC


README

http://smsaero.ru/ Integration of SMS-messages to yii2 application

Installation

One

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist sersid/yii2-smsaero "dev-master"

or add

"sersid/yii2-smsaero": "dev-master"

to the require section of your composer.json file.

Two

$config = [
    ...
    'components' => [
        ...
        'sms' => [
            'class' => 'sersid\smsaero\SmsAero',
            'user' => 'username',
            'password' => '*****',
            'sender' => 'INFORM', // default sender
        ],
    ]
];

Three

Read the documentation http://smsaero.ru/api/

Usage

Once the extension is installed, simply use it in your code by :

Send message

Yii::$app->sms->send('798765543210', 'Message'); //@see Send message method

Checking the status of the sent message

Yii::$app->sms->status(123456);

Balance

Yii::$app->sms->balance(); // ['balance' => '30.00']

Available senders

Yii::$app->sms->senders(); // ['INFORM', 'MY_SENDER', '...']

Request new signature

Yii::$app->sms->sign('new sender');