kudinovfedor/sms-club-json 问题修复 & 功能扩展

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

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

kudinovfedor/sms-club-json

Composer 安装命令:

composer require kudinovfedor/sms-club-json

包简介

SMS CLUB API JSON

README 文档

README

Installation

Require this package with composer using the following command:

composer require kudinovfedor/sms-club-json

Usage

$manager = new \KudinovFedor\SmsClubJSON\SmsManager([
    'token' => 'token', // Token of the user account (which can be obtained in your account in the "Profile" section)
    'from'  => 'from' // Alpha name from which to send
]);

// or
$manager = new \KudinovFedor\SmsClubJSON\SmsManager();
$manager->setToken('token');
$manager->setFrom('from');

Sending messages

After successful sending of the message to the partner’s system, an array will be returned, info in which the key is the id message in our system, by which you can receive the status and the phone number to which the message was sent. In the example below, 106 requests for the given id sms, 380989361131 - recipient's number. An array of add_info may also be present, where information on unsent messages is displayed in the form:

Key - recipient's number Value - Text error

$manager->setTo(['380989361131', '380989361130'])
$manager->setMessage('Your message');
$response = $manager->send();

return

[
    "info": [
        "107": "380989361131"
    ],
    "add_info": [
        "380989361130": "Данный номер находится в черном списке"
    ]
]

Getting the status of messages

Will return the array info in which the key will be id messages and the value of his stat

$status = $manager->getStatus(['106', '107']);
// or
$manager->setSmsIds(['106', '107']);
$status = $manager->getStatus();

return

[
    "106": "ENROUTE",
    "107": "REJECTD"
]

Getting user balance

$balance = $manager->getBalance();

return

[
    "money": "8111.1700",
    "currency": "UAH"
]

Getting a list of alpha usernames

$originator = $manager->getOriginator();

return

[
    [0] => "test1",
    [1] => "test2"
]

Check on errors

if ($manager->hasErrors()) {
    $response = $manager->getErrors();
}

License

The SMS Club API is open-sourced software licensed under the MIT license

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固