matejch/bsms-api-handler

Implementation of request for sending sms with viamobile bsms

v1.0 2021-08-21 20:39 UTC

This package is auto-updated.

Last update: 2024-11-29 06:35:48 UTC


README

Api for sending sms with viamobile bsms

https://www.smsmarketing.sk/

Api info

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist matejch/bsms-api-handler "^1.0"

or add

"matejch/bsms-api-handler": "^1.0"

to the require section of your composer.json file.

Usage

First register at https://www.smsmarketing.sk/

For using api username and password is required

Sending sms

$sender = new \matejch\bsmsApiHandler\BsmsSender($username, $password);

/** multiple sms can be sent at once */
$sender->addSms($id,$phoneNum,$message);
$sender->addSms($id2,$phoneNum2,$message2);

$sender->send();

Inquiring delivery status

$sender = new \matejch\bsmsApiHandler\BsmsPullDelivery($username, $password);

/** multiple deliveries can be requested at once */
$sender->addDelivery($id) //id of sms used in addSms method
$sender->addDelivery($id2);

$sender->send();