承接 webmobyle/africastalking-credit-alert 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

webmobyle/africastalking-credit-alert

最新稳定版本:1.0.2

Composer 安装命令:

composer require webmobyle/africastalking-credit-alert

包简介

Laravel package to monitor Africa's Talking credit balance and send email/SMS alerts when it falls below a configured threshold.

README 文档

README

Packagist Version License Laravel

A Laravel package to monitor your Africa's Talking application credit balance and send Email and/or SMS alerts when the balance falls below a configurable threshold.

🚀 Features

  • Monitor Africa's Talking app credit balance
  • Email and/or SMS notifications
  • Configurable threshold
  • Queue‑friendly notifications
  • Optional cooldown to prevent alert spam
  • No database required
  • Fully environment‑driven configuration

📦 Installation

composer require webmobyle/africastalking-credit-alert

Publish the configuration file:

php artisan vendor:publish --tag=africastalking-credit-alert-config

⚙️ Environment Variables

Add the following to your .env file:

AT_CREDIT_ALERT_ENABLED=true
AT_CREDIT_ALERT_EMAIL_ENABLED=true
AT_CREDIT_ALERT_SMS_ENABLED=true

AT_CREDIT_ALERT_THRESHOLD=50

AT_CREDIT_ALERT_EMAIL_RECIPIENTS="alerts@example.com"
AT_CREDIT_ALERT_SMS_RECIPIENTS="+265991234567"

AFRICASTALKING_USERNAME=your_username
AFRICASTALKING_API_KEY=your_api_key

AT_CREDIT_ALERT_SMS_FROM=   # Optional. Leave empty if not using sender ID

Cooldown (Optional)

AT_CREDIT_ALERT_COOLDOWN_ENABLED=true
AT_CREDIT_ALERT_COOLDOWN_MINUTES=360
AT_CREDIT_ALERT_RESEND_IF_DROPS_BY=10

🧩 Usage

Run the credit check manually:

php artisan africastalking:credit-check

Schedule it in app/Console/Kernel.php:

$schedule->command('africastalking:credit-check')->everyThirtyMinutes();

💬 SMS Sender ID

  • If you do not have an approved sender ID, leave AT_CREDIT_ALERT_SMS_FROM empty.
  • Passing an invalid sender ID will cause "InvalidSenderId" errors.

👷 Queue Workers

This package uses Laravel notifications and queues by default. Ensure your queue worker is running:

php artisan queue:work

🧱 Requirements

DependencyVersion
PHP^8.2
Laravel10.x – 12.x
Africa’s Talking PHP SDK (africastalking/africastalking)^3.0

📦 Versioning

This package follows Semantic Versioning (SemVer) — tag releases like v1.0.0, v1.1.0, etc.

🪪 License

This package is open-sourced software licensed under the MIT License.

👤 Author

Barnett Temwa Msiska
Founder, Webmobyle Limited
📧 barnett@webmobyle.com

⭐ Support

If you find this package useful, please star it on Packagist or Bitbucket.
Contributions, pull requests, and issues are welcome!

Email: contact@webmobyle.com

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固