pluritech-total-voice/total-voice-php

此包的目的是使用Total Voice Api发送短信。

1.0.2 2018-06-06 20:06 UTC

This package is not auto-updated.

Last update: 2024-09-21 06:48:41 UTC


README

使用Total Voice API的PHP短信发送器

进行中。

安装

可以使用Composer安装此库。运行以下命令

composer require pluritech-total-voice/total-voice-php

用法

注意:此版本的Total Voice API for PHP需要PHP 5.3.3或更高版本。

简单用法示例。

require_once __DIR__ . '/vendor/autoload.php'; // change path as needed



use \Exception;
use TotalVoicePhp\TotalVoicePhp as TotalVoicePhp;

private $totalVoiceSMS = null;

$account       = array('token' => 'your_token', 'url' => 'api_endpoint');
$totalVoicePhp = new TotalVoicePhp('TotalVoiceSMS',$account);//TotalVoiceSMS - determine that a class responsible for send SMS will be instantiated
$this->totalVoiceSMS = $totalVoicePhp->getMyClass();

$data = array(
    'number_destiny'  => $number, 
    'message'         => $message,
    'user_can_answer' => false,
    'multi_sms'       => false
);

$this->totalVoiceSMS->setSMSEntity($data);
$response = $this->totalVoiceSMS->send(); 

文档

进行中。

测试

进行中。

贡献

请随意提交您的pull request,提供建议或报告问题。

许可

MIT © Guilherme Valentim e Natália Gonçalves Machado