阿里大於(魚)API V2.0全新發布

以前的舊版本(v1.0)開源出去後,使用者較多;但兼容各大框架較差;爲此發佈v2.0;該版本全新架構,適用任意框架!php

v2.0不支持從 v1.0直接升級,請拋棄 v1.0

源碼

功能

環境

安裝

composer require flc/alidayu

使用

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

// 配置信息
$config = [
    'app_key'    => '*****',
    'app_secret' => '************',
];

$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)

print_r($resp);
print_r($resp->result->model);
?>

幫助

支持

License

MIThtml

相關文章
相關標籤/搜索