本想改写一下变成swoft里能用的,后来发现了另一个也比较好用,建议用这个 https://github.com/Hanson/open-taobao-sdk
~/swoft/vendor/yijie/easytbk git add . && git commit -m 'test' && git push
淘宝联盟、京东联盟、多多进宝SDK封装,有bug或者新增api请提交PR
微信:bugfixed
1、安装扩展包
composer require niugengyun/easytbk
2、执行下面的命令,然后修改config/easytbk.php
php artisan vendor:publish --provider "Yijie\EasyTBK\ServiceProvider"
3、淘宝SDK初始化
<?php
use Yijie\EasyTBK\Factory;
use Yijie\EasyTBK\TaoBao\Request\TbkItemInfoGetRequest;
$client = Factory::taobao ();
$req = new TbkItemInfoGetRequest;
$req->setNumIids ($numIids);
return $client->execute ($req);
4、京东、拼多多SDK初始化基本一样,自己摸索