Giter Club home page Giter Club logo

alidayu's Introduction

阿里大于(鱼) - v2.0

Latest Stable Version Total Downloads php>=5.4 License 996.icu LICENSE

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

更新

v2.0.6 (2017-08-12)

  • fixed #6

v2.0.5 (2017-01-25)

  • 修复autoload.php #5

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
  • Anti 996

alidayu's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alidayu's Issues

composer require flc/alidayu Error

[InvalidArgumentException]
Could not find package flc/alidayu at any version for your minimum-stability (stable). Check the package spelli
ng or your minimum-stability

报这个错误

stdClass Object ( [code] => 29 [msg] => Invalid app Key [sub_code] => isv.appkey-not-exists [request_id] => 157dmzyz5gdag )

报错Warning: current() expects parameter 1 to be array, null given in vendor\flc\alidayu\src\Alidayu\Client.php on line 129

代码如下:
require '/vendor/flc/alidayu/autoload.php';
use Flc\Alidayu\Client;
use Flc\Alidayu\App;
use Flc\Alidayu\Requests\AlibabaAliqinFcSmsNumSend;
use Flc\Alidayu\Requests\IRequest;

// 配置信息
$config = array(
'app_key' => '......',
'app_secret' => '......'
);

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

$req->setRecNum('13000000000')
->setSmsParam([
'number' => rand(100000, 999999)
])
->setSmsFreeSignName('...')
->setSmsTemplateCode('SMS_10000000');

$resp = $client->execute($req);
报错:
Warning: current() expects parameter 1 to be array, null given in E:\web\vendor\flc\alidayu\src\Alidayu\Client.php on line 129

请问可否支持阿里云语音服务

叶大 现在阿里大于的语音通信功能已经加入阿里云中了 阿里云语音服务的SDK 写的那么不友好 网上检索 短信的方案比较多 文本转语音通知的文档很少 请问可以支持下阿里云的语音服务吗 万分感谢

关于阿里2017年12月20日至2018年1月21日短信平台迁移公告

2017年12月20日至2018年1月21日属于消息服务中的短信功能和云市场(阿里短信服务)平台迁移期,您已经进入迁移中状态,请尽快参照《迁移帮助手册》,下载并更换新的SDK及API代码。 请问这个公告有影响吗? 这公告最重要有句请更换洗呢SDK及API代码

您好,有两个问题

第一个问题点击注册直接报错
Uploading image.png…

第二个问题,我把上面那个屏蔽之后出现
stdClass Object ( [code] => 11 [msg] => Insufficient isv permissions [sub_code] => isv.permission-api-package-limit [sub_msg] => scope ids is 11022 11600 11863 [request_id] => ut1a52vjjfq )

些许建议

参考了文档和代码发现api仅适合已充值账户使用,在Flc\Alidayu\Requests\AlibabaAliqinFcSmsNumSend::setSmsTemplateCode处必须传参数,方便尝鲜使用可以略加修改,本地测试成功。

短信发送的返回值格式不一样?

错误

stdClass Object
(
    [code] => 15
    [msg] => Remote service error
    [sub_code] => isv.BUSINESS_LIMIT_CONTROL
    [sub_msg] => 触发业务流控
    [request_id] => 3b4sm5xf4cfh
)

成功

stdClass Object
(
    [result] => stdClass Object
        (
            [err_code] => 0
            [model] => 108595036106^1111577531376
            [msg] => *
            [success] => 1
        )

    [request_id] => 10fctspc8d759
)

这个格式是阿里自己的格式吗?这样的返回内容有点恶心

如何集成进ThinkPHP 3.2.3?

请问怎么集成进去呢?能给具体步骤吗?我按说明集成提示,Class 'Flc\Alidayu\Client' not found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.