zymawy/sms2net
Composer 安装命令:
composer require zymawy/sms2net
包简介
This Simple Package 📦 Can Help You Interacting With Net2SMS API
README 文档
README
| This Simple Package 📦 Can Help You Interacting With Net2SMS API. | So You Can Send Check Balance, Get All Messages You Saved. And Many More.
Installtions
You Need To Require The Package In Order It To Work.
λ composer require zymawy/sms2net
Then Register The Service Provider To config/app.php Inside providers array
'providers' => [ /* * Package Service Providers... */ Zymawy\Sms2Net\Sms2NetServiceProvider::class, ..Rest of Services ]
In The Same File Place The Facade Inside alias array.
/* Class Aliases */ 'aliases' => [ 'Sms2Net' => \Zymawy\Sms2Net\Facades\Sms2NetFacade::class, ..Rest of Services ]
Update You Your .env
SMS2NET_USERNAME= SMS2NET_PASSWORD= SMS2NET_UNICODE= SMS2NET_SENDER= SMS2NET_IS_TEST=
Finally, You Need To Publish The Config File And The Lang File. So You Can Provide The Account Credentials.
λ php artisan vendor:publish --provider="Zymawy\Sms2Net\Sms2NetServiceProvider"
Available Functions
sendToMany();
This Function Just If You Want To Send A Heavy array of numbers since it take time to process. Use sendToOne Instead For Preference.
|| it take to arguments
$numbers
And
$message
$msg = 'In The Name Of Allah The Merciful'; $numbers = [ '009665900000000', '0540000000', '+966550000000' ]; $response = Sms2Net::sendToMany($numbers,$msg);
On Success
{
"msg": "تم بنجاح ارسال الرسالة",
"code": "Ok 000",
"count_delivered_msg": "99",
"full_massage": "Ok 000, Message Has Been Sent, [99] ID:9999"
}
On Errors ERR: Error number
sendToOne();
This Function Just If You Want To Send A A Major Array Of Numbers. Use sendToOne Instead For heavy Array Of Numbers.
|| it take to arguments
$numbers
And
$message
$msg = 'In The Name Of Allah Most Merciful'; $user = App\User::first(); $response = Sms2Net::sendToMany($user->phone_number,$msg);
On Success
{
"msg": "تم بنجاح ارسال الرسالة",
"code": "Ok 000",
"count_delivered_msg": "99",
"full_massage": "Ok 000, Message Has Been Sent, [99] ID:9999"
}
On Errors
ERR: Error number
geBalance()
This will return the number of credits available on this particular account. The account balance is returned as a floating point value.
$balance = Sms2Net::geBalance(); return $balance;
On Success
{
"msg": "النقاط المتوفرة ",
"full_massage": "Credit = 232340",
"points": "232340"
}
getMessages()
This will return a list of all user messages in an XML format. it returned XML Format
Sms2Net::getMessages();
On Success
<?xml version="1.0" encoding="UTF-8"?> <Messages> <MsgID>xxxx</MsgID> <MsgShortDesc>xxxx</MsgShortDesc> <MsgDesc>xxxx</ MsgDesc > </Messages>
contactUs()
This function to email web service to contact us it returned XML Format
Sms2Net::contactUs('test@gmail.com', 'A Test Message');
On Success
<?xml version='1.0' encoding='UTF-8'?> <Ok> <Message>Your message was sent successfully. Thanks.</Message> </Ok>
getGroups()
This will return a list of all groups for specific user in an XML format --it returned XML Format
Sms2Net::getGroups();
On Success
<?xml version='1.0' encoding='UTF-8'?> <Groups> <GroupID>xxxx</GroupID> <GroupName>xxxx</GroupName> </Groups>
getGroup()
This will return a list of all groups for specific user in an XML format --it returned XML Format
$groupID = 212312; Sms2Net::getGroup($groupID);
On Success
<?xml version='1.0' encoding='UTF-8'?> <Members> <MemberID>xxxx</MemberID> <MemberName>xxxx</MemberName> <MemberMobile>xxxx</MemberMobile> </Members>
phoneBook()
This will return a list of all groups & members for specific user and in an XML format --it returned XML Format
Sms2Net::phoneBook();
On Success
<?xml version='1.0' encoding='UTF-8'?> <PhoneBook> <Group> <GroupID>xxxx</GroupID> <GroupName>xxxx</GroupName> <Member> <MemberID>xxxx</MemberID> <MemberName>xxxx</MemberName> <MemberMobile>xxxx</MemberMobile> </Member> </Group> </PhoneBook>
sender()
This will return a list of all Senders for specific user in an XML format --it returned XML Format
Sms2Net::sender();
On Success
<?xml version='1.0' encoding='UTF-8'?> <Senders> <SenderID>xxxx</ SenderID> <SenderName>xxxx</ SenderName> <SenderStatus>xxxx</ SenderStatus> </Senders>
Contributing
Always Welcome 💞
Security
If you discover any security related issues, please email zymawy@gmail.com instead of using the issue tracker.
Contact
Twitter @RttCy
License
Laravel-Sms2net
is open-sourced software licensed under the MIT license.
© 2018 Hamza Zymawy, All rights reserved.
zymawy/sms2net 适用场景与选型建议
zymawy/sms2net 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14 次下载、GitHub Stars 达 1, 最近一次更新时间为 2018 年 12 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「sms」 「laravel」 「sms2net」 「Deewan Alrasaile」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 zymawy/sms2net 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 zymawy/sms2net 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 zymawy/sms2net 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
SDK for payment gateway PlatbaMobilom.sk for PHP7.0
Extensible library for building notifications and sending them via different delivery channels.
yii2-sms expand
Alfabank REST API integration
A fork of simplesoftwareio/simple-sms with Verimor driver.
Aakash Sms Provider Api Wrapper
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-25