shengamo/zmsms 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

shengamo/zmsms

最新稳定版本:0.0.4

Composer 安装命令:

composer require shengamo/zmsms

包简介

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

README 文档

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.

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-06-22