elmage/textng-php 问题修复 & 功能扩展

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

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

elmage/textng-php

Composer 安装命令:

composer require elmage/textng-php

包简介

An unofficial textng.xyz SMS API Wrapper for PHP

README 文档

README

Latest Version on Packagist Latest Version on Packagist Software License Build Status Coverage Status

This is an unofficial client library for the TextNg SMS API. We provide an intuitive, stable interface to integrate TextNG SMS into your PHP project.

Installation

Install the library using Composer. Please read the Composer Documentation if you are unfamiliar with Composer or dependency managers in general.

$ composer require elmage/textng-php

Authentication

API Key

use Elmage\TextNg\Configuration;
use Elmage\TextNg\Client;

$configuration = new Configuration($apiKey, $senderName);
$client = Client::create($configuration);

Usage

This is not intended to provide complete documentation of the API. For more detail, please refer to the Official Documentation.

Get Unit Balance

$response = $client->getBalance();

Send SMS

$response = $client->sendSMS($route, $phoneNumbers, $message, $bypassCode, $optionalParamsArray);

Send OTP

// This method accepts only one phone number 
// and calls $client->sendSMS(..., [$phoneNumber], ...)
// passing the supplied phone number as the single element in an array

$response = $client->sendOTP($route, $phoneNumber, $message, $bypassCode, $optionalParamsArray);

Get Delivery Report

$response = $client->getDeliveryReport($reference, $req, $used_route);

$req can take one of the 3 values all, dnd or success (as specified in the API DOC)

Create Customer

$response = $client->createCustomer($customerName, $customerPhone, $categoryID);

$categoryID is the category url ID generated for each url link you create. (as specified in the API DOC)

Remove Customer

$response = $client->removeCustomer($customerPhone, $categoryID);

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email mails4mage@gmail.com or use the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-08-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固