maatify/routee 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

maatify/routee

Composer 安装命令:

composer require maatify/routee

包简介

PHP library for Routee API handler, known by our team

README 文档

README

Current version Packagist PHP Version Support Monthly Downloads Total Downloads Stars

Installation

composer require maatify/routee

Usage

Instance

use Maatify\RouteeSms\Routee;

require_once __DIR__ . '/vendor/autoload.php';

$routee = new Routee(__API_KEY__, __SENDER_NAME__); // Routee instance

Check Balance

$result = $routee->CheckBalance();

print_r($result);

Response Example :

Success Example
  Array
  (
       [currency] => Array
           (
               [code] => USD
               [name] => US Dollar
               [sign] => $
           )
   
       [balance] => 400.83762
       [success] => 1
  )
Error Example
   (
       [timestamp] => 2024-07-10T03:39:48.787+0000
       [status] => 401
       [error] => Unauthorized
       [message] => Bad credentials
       [path] => /accounts/me/balance
       [success] => 1
   )

Send SMS Message

$result = $routee->SendSms(__PHONE_NUMBER__, __SMS_MESSAGE__);

print_r($result);

Response Example :

Success Example
  Array
  (
       [trackingId] => 66fb6987-6be1-4e92-b6d5-ca3ca5227d23
       [status] => Queued
       [createdAt] => 2024-07-10T03:32:32.916Z
       [from] => Maatify.dev
       [to] => __PHONE_NUMBER__
       [body] => Welcome to Maatify.dev
       [bodyAnalysis] => Array
           (
               [parts] => 1
               [unicode] => 
               [characters] => 22
           )
   
       [flash] => 
       [callback] => Array
           (
               [url] => {{if your api is set}}
               [strategy] => OnChange
           )
   
       [success] => 1
   )
Error Example
   (
       [timestamp] => 2024-07-10T03:39:48.787+0000
       [status] => 401
       [error] => Unauthorized
       [message] => Bad credentials
       [path] => /sms
       [success] => 1
   )

Get your account transactions

$time_from = date('Y-m-d\TH:i\Z', strtotime('2023-01-01 00:00'));
$time_to = date('Y-m-d\TH:i\Z', strtotime('2024-07-31 23:59:59'));
$result = $routee->Transactions($time_from, $time_to);

print_r($result);

Response Example :

Success Example
  Array
  (
       [content] => Array
           (
               [0] => Array
                   (
                       [id] => 41e667b1-f9f1-4ed4-8ff3-a8032309ff3e
                       [source] => 517879******7503
                       [amount] => 35
                       [status] => Completed
                       [balanceBefore] => 0.054
                       [balanceAfter] => 0.054
                       [date] => 2023-05-27T10:14:26Z
                       [actions] => Array
                           (
                               [0] => Array
                                   (
                                       [id] => e9bc07a1-dea1-4561-a020-52997904e18a
                                       [type] => Status Changed
                                       [amount] => 35
                                       [date] => 2023-05-27T10:15:03Z
                                       [balanceBefore] => 0.054
                                       [balanceAfter] => 35.054
                                       [status] => Completed
                                   )
  
                          )
  
                  )
  
              [1] => Array
                  (
                      [id] => 0af024fa-8f1a-4ca8-b837-f99001a9a906
                      [source] => 559444******1710
                      [amount] => 20
                      [status] => Completed
                      [balanceBefore] => 0.088
                      [balanceAfter] => 0.088
                      [date] => 2023-03-25T00:22:50Z
                      [actions] => Array
                          (
                              [0] => Array
                                  (
                                      [id] => 70a6098e-7ddd-4496-a105-5e80af4f6883
                                      [type] => Status Changed
                                      [amount] => 20
                                      [date] => 2023-03-25T00:23:04Z
                                      [balanceBefore] => 0.088
                                      [balanceAfter] => 20.088
                                      [status] => Completed
                                  )
  
                          )
  
                  )
  
          )
  
      [last] => 1
      [totalElements] => 2
      [totalPages] => 1
      [numberOfElements] => 2
      [first] => 1
      [size] => 20
      [number] => 0
      [success] => 1
  )

Send SMS Message WIth Callback

Instance

use Maatify\RouteeSms\Routee;

require_once __DIR__ . '/vendor/autoload.php';

$routee = new Routee(__API_KEY__, __SENDER_NAME__, __YOUR_CALLBACK_URL__); // SmsEG instance

Send SMS Message WIth Callback On Change

$result = $routee->SendSmsWithCallBackOnChange(__PHONE_NUMBER__, __SMS_MESSAGE__);

print_r($result);

Send SMS Message WIth Callback On Completion(

$result = $routee->SendSmsWithCallBackOnCompletion(__PHONE_NUMBER__, __SMS_MESSAGE__);

print_r($result);

maatify/routee 适用场景与选型建议

maatify/routee 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 73 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 07 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「api」 「sms」 「provider」 「handler」 「Routee」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 maatify/routee 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 maatify/routee 我们能提供哪些服务?
定制开发 / 二次开发

基于 maatify/routee 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2024-07-10