[转自简书(图文)] 淘宝SDK-PhalApi框架的引入问题
淘宝SDK-PhalApi框架的引入问题
更多请访问原文:https://www.jianshu.com/p/e1037b037f3c
第一步:从淘宝开放平台下载相应的SDK文件 并解压
第二步:将解压好的SDK文件夹复制到PhalApi项目的Vendor目录下
第三步:PhalApi的统一初始化文件中加载淘宝SDK的入口文件
第四步:在领域层import相应的class即可使用
<?php
namespace App\Domain\Test;
use TbkItemGetRequest;
use TopClient;
class Test {
public function test($params){
$c = new TopClient;
$c->appkey = "";
$c->secretKey = "";
$req = new TbkItemGetRequest;
$req->setFields("");
$req->setQ("");
$resp = $c->execute($req);
return $resp;
}
}
更多请访问原文:https://www.jianshu.com/p/e1037b037f3c