nason / gw-supply-chain
A API SDK for gwlp supply chain
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/nason/gw-supply-chain
Requires
- ext-json: *
- guzzlehttp/guzzle: ~6.5
- phpunit/phpunit: ~6.5
This package is auto-updated.
Last update: 2025-09-28 17:21:24 UTC
README
A API SDK for gwlp supply chain.
安装
$ composer require nason/gw-supply-chain -vvv
配置
在使用本扩展之前,你需要通过 广物供应链平台 获取到接口凭证:wid 和 token。
使用
商品接口
use Nason\GwSupplyChain\Product; $wid = 'xxxxxxxxxxxxxxxxxxxxxxxx'; $token = 'xxxxxxxxxxxxxxxxxxxxxxxx'; $productApi = new Product($wid, $token);
如:获取商品详情
$goodsId = 68; $response = $productApi->getGoodsInfo($goodsId);
类目接口
use Nason\GwSupplyChain\Category; $wid = 'xxxxxxxxxxxxxxxxxxxxxxxx'; $token = 'xxxxxxxxxxxxxxxxxxxxxxxx'; $categoryApi = new Category($wid, $token);
获取分类列表
$page = 1; $limit = 50; $response = $categoryApi->getCategoryList($page, $limit);
获取单个分类数据
$categoryId = 1; $response = $categoryApi->getCategoryInfo($categoryId);
订单接口
use Nason\GwSupplyChain\Order; $wid = 'xxxxxxxxxxxxxxxxxxxxxxxx'; $token = 'xxxxxxxxxxxxxxxxxxxxxxxx'; $orderApi = new Order($wid, $token);
如:取消订单
$orderSn = 'xxxxxxxxxxxxxxxxxxxxx'; $response = $orderApi->cancelOrder($orderSn);
参考
License
MIT