webmobyle/africastalking-credit-alert
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
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_FROMempty. - 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
| Dependency | Version |
|---|---|
| PHP | ^8.2 |
| Laravel | 10.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
webmobyle/africastalking-credit-alert 适用场景与选型建议
webmobyle/africastalking-credit-alert 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 174 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 01 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 webmobyle/africastalking-credit-alert 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 webmobyle/africastalking-credit-alert 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 174
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 45
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-30