moemengaballah/msegat
Composer 安装命令:
composer require moemengaballah/msegat
包简介
This is a Laravel package for msegat. Its goal is to remove the complexity
README 文档
README
This is a Laravel package for msegat. Its goal is to remove the complexity
Package Laravel Msegat
This is a package for msegat. Its goal is to remove the complexity.
Installation
composer require moemengaballah/msegat
Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.
Laravel version less than 5.5:
If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php
MoemenGaballah\Msegat\MsegatServiceProvider::class,
If you want to use the facade to log messages, add this to your facades in app.php:
'Msegat' => MoemenGaballah\Msegat\Msegat::class,
Copy the package config to your local config with the publish command:
php artisan vendor:publish --provider="msegat"
Usage
You must add first API Credentials in file env
MSEGAT_USERNAME= MSEGAT_USER_SENDER= MSEGAT_API_KEY=
Example OTP
// numbers (required, string, international format without zeros separated by comma, example: "966xxxxxxxxx" or "966xxxxxxxxx,966xxxxxxxxx,966xxxxxxxxx") //Msegat::sendMessage('numbers', 'MSG'); use Msegat; $msg = Msegat::sendMessage('966xxxxxxxxx', 'رمز التحقق: 1234'); dd($msg);
// another example Route::get('/', function () { $msg = Msegat::sendMessage('966xxxxxxxxx', 'رمز التحقق: 1234'); dd($msg); });
if you don't have Credentials
This API is based on HTTPS protocol You must have an account to test this API, to register please click here You must use HTTPS POST with parameters in body [ VERY IMPORTANT ] You must use URL ENCODING when you send the variables If SMS is English only, we will charge 1 point for each 160 chars and if you send more than this, we will charge 1 point for each 153 chars If SMS contains language other than English, we will charge 1 point for each 70 chars and if you send more than this, we will charge 1 point for each 67 chars You can test our API for free . You will get free sms every day . To test our service you can send sms using below parameters: userSender: OTP msg: "Pin Code is: xxxx" or "Verification Code: xxxx"
status code and Messages
1 - Success M0000 - Success M0001 - Variables missing M0002 - Invalid login info M0022 - Exceed number of senders allowed M0023 - Sender Name is active or under activation or refused M0024 - Sender Name should be in English or number M0025 - Invalid Sender Name Length M0026 - Sender Name is already activated or not found M0027 - Activation Code is not Correct 1010 - Variables missing 1020 - Invalid login info 1050 - MSG body is empty 1060 - Balance is not enough 1061 - MSG duplicated 1064 - Free OTP , Invalid MSG content you should use "Pin Code is: xxxx" or "Verification Code: xxxx" or "رمز التحقق: 1234" , or upgrade your account and activate your sender to send any content 1110 - Sender name is missing or incorrect 1120 - Mobile numbers is not correct 1140 - MSG length is too long M0029 - Invalid Sender Name - Sender Name should contain only letters, numbers and the maximum length should be 11 characters M0030 - Sender Name should ended with AD M0031 - Maximum allowed size of uploaded file is 5 MB M0032 - Only pdf,png,jpg and jpeg files are allowed! M0033 - Sender Type should be normal or whitelist only M0034 - Please Use POST Method M0036 - There is no any sender
moemengaballah/msegat 适用场景与选型建议
moemengaballah/msegat 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 21.27k 次下载、GitHub Stars 达 16, 最近一次更新时间为 2021 年 11 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 moemengaballah/msegat 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 moemengaballah/msegat 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 21.27k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 16
- 点击次数: 26
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-11-20