huami-cloud/taobao-php-sdk

Taobao php sdk

This package's canonical repository appears to be gone and the package has been frozen as a result.

1.0.1 2017-01-21 03:45 UTC

This package is not auto-updated.

Last update: 2024-01-20 15:39:26 UTC


README

alidayu

Demo

<?php
header("Content-type: text/html; charset=utf-8");
include "TopSdk.php";
 
//将下载到的SDK里面的TopClient.php的$gatewayUrl的值改为沙箱地址:http://gw.api.tbsandbox.com/router/rest
//正式环境时需要将该地址设置为:http://gw.api.taobao.com/router/rest
 
$c = new TopClient;
$c->appkey = "test"; // 可替换为您的沙箱环境应用的AppKey
$c->secretKey = "test"; // 可替换为您的沙箱环境应用的AppSecret
$sessionkey= "test";  // 必须替换为沙箱账号授权得到的真实有效SessionKey
 
$req = new SellerItemGetRequest;
$req->setFields("num_iid,title,nick,price,approve_status,sku");
$req->setNumIid("123456789");
$rsp = $c->execute($req,$sessionkey);
 
echo "api result:";
print_r($rsp);
?>