kimulisiraj/sms-speeda-mobile-php
Composer 安装命令:
composer require kimulisiraj/sms-speeda-mobile-php
包简介
Send SMS using speed mobile api
README 文档
README
This is where your description should go. Try and limit it to a paragraph or two. Consider adding a small example.
Installation
You can install the package via composer:
composer require kimulisiraj/sms-speeda-mobile-php
Usage
Send single message
$client = new \Kimulisiraj\SmsSpeedaMobile\SmsSpeedaMobile( apiKey:"your-username", apiSecret: "your-password", ); $response = $client->send( to: 2567xxxxxxxx, mesage:'Hello, Kimulisiraj!' ) return $response;
From the response you can access:
$response->getStatus(); // OK | FAILED $response->getMessage(); // Message sent successfully $response->hasError(); // true | false $response->getMessageId(); // I.E 12345
Chaining
$client = Kimulisiraj\SmsSpeedaMobile::config([ 'apiKey' => 'your-api-key', //You can set and use env('SPEEDAMOBILE_SMS_API_ID') 'apiPassword' => 'your-api-password', ////You can set and use env('SPEEDAMOBILE_SMS_API_PASSWORD') ]); $response = $client->mesage('Hello, Kimulisiraj!') ->to('2567xxxxxxxx') ->send(); return $response
Query Delivery Report / Message Status
$client = new \Kimulisiraj\SmsSpeedaMobile\SmsSpeedaMobile( apiKey:"your-username", apiSecret: "your-password" ); $response = $client->messageStatus( messageId: 'xxxxxxx' //Message ID You Received at The Time of Submit E.G 4234 ); return response()->json([ 'messageId' => $response->getMessageId(), 'phoneNumber' => $response->getPhoneNumber(), 'messageBody' => $response->getMessageBody(), 'MessageType' => $response->getMessageType(), 'messageLength' => $response->getMessageLength(), 'messageParts' => $response->getMessageParts(), 'messageCost' => $response->getMessageCost(), 'deliveryStatus' => $response->getDeliveryStatus(), 'uniqueId' => $response->getUniqueId(), 'errorCode' => $response->getErrorCode(), 'errorDescription' => $response->getErrorDescription(), 'sentDateTime' => $response->getSentDateTime(), 'remarks' => $response->getRemarks(), ]);
From the response you can access:
$response->getMessageId(), // Message ID of the request $response->getPhoneNumber(), // Phone Number to which message was sent $response->getMessageBody(), // Text of the SMS message $response->getMessageType(), // Message Encoding $response->getMessageLength(), // Length of Message $response->getMessageParts(), // No of Message parts $response->getMessageCost(), // Amount Deducted from account $response->getDeliveryStatus(), // Delivery Status Can Be One Of the following (Pending, Delivered, Undeliverable, Acknowledged, Expired, Accepted, Rejected, Unknown, Failed, DND) $response->getUniqueId(), // Carrier Generated SMS ID $response->getErrorCode(), // Error Code If Any $response->getErrorDescription(), // Error Description If Any $response->getSentDateTime(), // SMS Sent Date Time in UTC (Universal TimeCoordinate) $response->getRemarks(), // Remarks for the Request
Get balance
$client = new \Kimulisiraj\SmsSpeedaMobile\SmsSpeedaMobile( apiKey:"your-username", apiSecret: "your-password", ); $client->getBalance(); // ['BalanceAmount' => 1000, 'CurrenceCode' => 'UGX'],
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
kimulisiraj/sms-speeda-mobile-php 适用场景与选型建议
kimulisiraj/sms-speeda-mobile-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.44k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2022 年 02 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「sms」 「sms-client」 「kimulisiraj」 「sms-speeda-mobile-php」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 kimulisiraj/sms-speeda-mobile-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kimulisiraj/sms-speeda-mobile-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 kimulisiraj/sms-speeda-mobile-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Send SMS messages through the LabsMobile platform and the PHP library.
SMS Portal API for PHP
SDK for payment gateway PlatbaMobilom.sk for PHP7.0
Extensible library for building notifications and sending them via different delivery channels.
Send laravel notification using speeda mobile
yii2-sms expand
统计信息
- 总下载量: 1.44k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-02-09