Download the PHP package kheme/php-supertext-nigeria without Composer
On this page you can find all versions of the php package kheme/php-supertext-nigeria. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kheme/php-supertext-nigeria
More information about kheme/php-supertext-nigeria
Files in kheme/php-supertext-nigeria
Package php-supertext-nigeria
Short Description A simple PHP wrapper for SuperText Nigeria's SMS gateway API
License MIT
Homepage https://github.com/kheme/php-supertext-nigeria
Informations about the package php-supertext-nigeria
PHP Wrapper for SuperText Nigeria SMS Gateway
Introduction
This is a simple PHP wrapper for SuperText Nigeria's SMS API gateway.
Installation
Using Composer:
Usage
Import the class before making your calls.
Sending to a single recipient
If sending wasn't successful, an exception will be thrown.
Sending to multiple recipients
You can send an SMS to multiple recipients by including multiple to()
in your call:
Or, by supplying an array of phone numbers to a single to()
:
Send to DND enabled numbers
To send SMS to numbers that have Do Not Disturb (DND) enabled, include ignoreDND()
to your call:
Return unit balance after sending
If you would like to return your account balance after sending, include returnBalance()
to your call:
Return amount of units used for sending
If you would like to return the total amount of units used after sending, include returnUnitsUsed()
to your call:
Combining options
The above method options, exluding the balance()
below, can be combined like in the following example:
Checking account balance
To check your SuperText Nigeria credit balance, simply call balance()
:
Errors
In the case of an error, a call will return an error as follows:
The numbers on the left are the corresponding error code from SuperText Nigeria, but will not be included in the error response
- 100: One or more required url parameter is missing or misspelt
- 101: Username is blank
- 102: Password is blank
- 103: Destination is blank
- 104: Message is blank
- 105: Sender is blank
- 200: Wrong username or password
- 201: Account has not been activated
- 202: Inactive account
- 300: Insufficient credit
- 400: Failed delivery (no credit deducted)