5 Star 11 Fork 1

flc1125 / alidayu

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

阿里大于(鱼) - v2.0

Latest Stable Version Total Downloads php>=5.4 License

PS:阿里短信 https://github.com/flc1125/dysms

更新

v2.0.6 (2017-08-12)

  • fixed #6

v2.0.5 (2017-01-25)

v2.0.4 (2016-10-25)

  • 新增自动载入功能(不依靠composer)
  • 新增Client::request快捷调用方法

v2.0.3 (2016-10-12)

  • 新增沙箱配置

功能

待测:因个人开发者,阿里大于权限相对较低。暂时无法测试;功能已开发,如测试可用,请告知~~

环境

安装

composer require flc/alidayu

require '/path/to/alidayu/autoload.php';

使用

<?php
use Flc\Alidayu\Client;
use Flc\Alidayu\App;
use Flc\Alidayu\Requests\AlibabaAliqinFcSmsNumSend;
use Flc\Alidayu\Requests\IRequest;

// 配置信息
$config = [
    'app_key'    => '*****',
    'app_secret' => '************',
    // 'sandbox'    => true,  // 是否为沙箱环境,默认false
];


// 使用方法一
$client = new Client(new App($config));
$req    = new AlibabaAliqinFcSmsNumSend;

$req->setRecNum('13312311231')
    ->setSmsParam([
        'number' => rand(100000, 999999)
    ])
    ->setSmsFreeSignName('叶子坑')
    ->setSmsTemplateCode('SMS_15105357');

$resp = $client->execute($req);

// 使用方法二
Client::configure($config);  // 全局定义配置(定义一次即可,无需重复定义)

$resp = Client::request('alibaba.aliqin.fc.sms.num.send', function (IRequest $req) {
    $req->setRecNum('13312311231')
        ->setSmsParam([
            'number' => rand(100000, 999999)
        ])
        ->setSmsFreeSignName('叶子坑')
        ->setSmsTemplateCode('SMS_15105357');
});

// 返回结果
print_r($resp);
print_r($resp->result->model);
?>

帮助

支持

License

MIT

The MIT License (MIT) Copyright (c) 2016 Flc(http://flc.ren) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

阿里大于(鱼)API接口-SDK 展开 收起
PHP
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
PHP
1
https://gitee.com/flc1125/alidayu.git
git@gitee.com:flc1125/alidayu.git
flc1125
alidayu
alidayu
master

搜索帮助