kch/smsapi-bundle

Symfony 2 Bundle for SMSApi PHP Client library.

Package info

github.com/KredytyChwilowki/smsapi-bundle

Issues

Type:symfony-bundle

pkg:composer/kch/smsapi-bundle

Statistics

Installs: 8 335

Dependents: 0

Suggesters: 0

Stars: 1

1.6.2 2016-06-01 07:46 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT f3f5e76e021b6a5da8c8d8accb81c4e283b9faa7

  • KredytyChwilowkiProgrammer <p.pikula.woop@kredyty-chwilowki.pl>

smsbundlemmsvms

This package is not auto-updated.

Last update: 2026-06-21 04:16:25 UTC


README

Symfony 2 Bundle for SMSApi PHP Client library.

Symfony 2 Bundle dla biblioteki SMSApi PHP Client.

Installation:

composer require kch/smsapi-bundle

Configuration - config.yml:

kch_sms_api:
 clients:
 default:
 client_login: TEST
 client_password_hash: TEST

Usage - sending one SMS:

Based on original library code: https://github.com/smsapi/smsapi-php-client/wiki/Examples

$smsFactory = $this->get('kch_sms_api.sms_factory.default');

try {
 $actionSend = $smsFactory->actionSend();

 $actionSend->setTo('600xxxxxx');
 $actionSend->setText('Hello World!!');
 $actionSend->setSender('Info'); //Pole nadawcy, lub typ wiadomości: 'ECO', '2Way'

 $response = $actionSend->execute();

 foreach ($response->getList() as $status) {
 echo $status->getNumber() . ' ' . $status->getPoints() . ' ' . $status->getStatus();
 }
} catch (SmsapiException $exception) {
 echo 'ERROR: ' . $exception->getMessage();
}