shengamo/zmsms

This package is abandoned and no longer maintained. No replacement package was suggested.

A Laravel package for integrating with an SMS gateway service in Zambia.

0.0.4 2024-06-23 13:37 UTC

This package is auto-updated.

Last update: 2025-05-06 11:46:16 UTC


README

Latest Version on Packagist Total Downloads GitHub Actions

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.

Installation

You can install the package via composer:

composer require shengamo/zmsms

Usage

The process of the plugin is first to check if you have enough balance to send out the number of SMS's you would like to send out. If you have enough, the messages will be sent but if you do not have enough remaining you will receive a response of "Insufficient balance".

Configuration

Publish the configuration file:

php artisan vendor:publish --provider="Shengamo\Zmsms\ZmsmsServiceProvider"

Add the following environment variables to your .env file:

ZMSMS_GATEWAY_BASE_URL=https://zmsms.online/api/v1/
ZMSMS_GATEWAY_USERNAME=your_user_name
ZMSMS_GATEWAY_PASSWORD=password

Sending SMS

Example usage on how to send SMS from your app

use Shengamo\Zmsms\Facades\Zmsms;

Zmsms::sendSMS('senderId', 'Message', ['zambia_mobile number e.g. 0760123456']);

Ensure your sender ID is already registered on zmSMS or the package will return an error.

use Shengamo\Zmsms\Facades\Zmsms;

Zmsms::sendSMS('Shengamo', 'Hello from Zmsms!', ['0971977252', '0776639088']);

Checking Balance

use Shengamo\Zmsms\Facades\Zmsms;

// Example usage to check SMS balance
$balance = Zmsms::getBalance();
echo "Current SMS balance: " . $balance['response_description'];

Testing

vendor/bin/phpunit

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email mo@shengamo.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.