marklestermorta / buka-sms-api-laravel
Laravel wrapper for Buka SMS API
dev-master
2022-07-21 03:30 UTC
This package is auto-updated.
Last update: 2024-04-21 07:02:13 UTC
README
A Laravel wrapper for BUKA SMS API
Installation
Require package
composer require marklestermorta/buka-sms-api-laravel
Publish Configuration file
php artisan vendor:publish --provider="MarkLesterMorta\BukaSMSApi\BukaSMSApiServiceProvider"
Add ENV variables
BUKAS_SMS_API_KEY= BUKAS_SMS_API_SECRET= BUKAS_SMS_APP_ID=
Usage/Examples
Send SMS
return BukaSMSApi::sendSMS('9*********', "Your Message");
Sample Response
{ "status": "0", "reason": "success", "success": "1", "fail": "0", "array":[ { "msgId": "2108021054011000095", "number": "9*********" } ] }
Get Balance
return BukaSMSApi::getBalance();
Sample Response
{ "status": "0", "reason": "success", "balance": "99.990000", "gift": "50.00000", "credit": "0" }
API Response Reference
Sending SMS
Parameter | Type | Description |
---|---|---|
status |
string |
”0”means successful,others than 0 means failure ,seeing Status code description |
reason |
string |
failure reason description |
success |
string |
number of successful submitted numbers |
fail |
string |
number of failure submitted numbers |
array |
JSONArray |
the number of Successful Submitted Array. |
msgId |
string |
submitted numbers id corresponding to platform |
number |
string |
submitted numbers |
Getting Balance
Parameter | Type | Description |
---|---|---|
status |
string |
”0”means successful,others than 0 means failure ,seeing Status code description |
reason |
string |
failure reason description |
balance |
string |
actual account balance |
gift |
string |
gifted account balance |
credit |
string |
credit account balance |