Download the PHP package camelcasetechs/vansosms without Composer
On this page you can find all versions of the php package camelcasetechs/vansosms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download camelcasetechs/vansosms
More information about camelcasetechs/vansosms
Files in camelcasetechs/vansosms
Package vansosms
Short Description An Api for Vanso SMS portal
License MIT
Homepage https://camelcase.co
Informations about the package vansosms
Vanso SMS API
An Api to Call the Vanso SMS Gateway
Vanso is an Interswitch company
This library assumes you are sending sms to Nigeria only.
This library has no unit test embedded yet, it is highly important you test well.
Check composer.json
for dependencies.
Installation
For composer installation, run composer require camelcasetechs/vansosms
Laravel
- For Laravel >=5.5 uses Package Auto-Discovery, so you don't need to manually add the ServiceProvider and Facades
- Run
php-artisan vendor:publish --tag=vansosms-config
to copy sample config file toconfig/vanso-sms.php
Usage
The classes in the src directory are for you to update and adapt to your need.
- If you use Laravel, and publish the config file as explained in installation, update config/vanso-sms.php and everything should work fine.
- If you are not using Laravel, please make a child class of
\CamelCase\VansoSMS\VansoSMSClient
and override theconfigure
method.
Call the \CamelCase\VansoSMS\VansoSMSClient::sendSMS
factory or the derived class:
$phone
is the last 10 digit of the Nigeria phone number e.g 9087263512
\$message
$message
is the sms message string to send minding the 160 character limit per page
Provided you get an object response with ticketId, you have done your own part.
Below is a sample response payload. Please note that this response was json_encode()
Have fun