dicr/yii2-p1sms

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Клиент p1sms.ru для Yii2

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Type:yii2-extension

5.1.1 2021-08-16 02:46 UTC

This package is auto-updated.

Last update: 2021-09-15 21:56:35 UTC


README

API: https://admin.p1sms.ru/panel/apiinfo (реализованы не все запросы)

Конфигурация

$config = [
    'modules' => [
        'p1sms' => [
            'class' => dicr\p1sms\P1Sms::class,
            'apiKey' => 'XXXXXXXXXXX',
        ]
    ]
];

Использование

use dicr\p1sms\P1Sms;

/** @var P1Sms $module получаем модуль */ 
$module = Yii::$app->getModule('p1sms');

// создание запроса
$req = $module->createRequest([
    'phone' => '+71111111111',
    'text' => 'Проверка',
]);

// отправка СМС
$req->send();