onetech/easy-lazada
最新稳定版本:1.1.1
Composer 安装命令:
composer require onetech/easy-lazada
包简介
Package description here.
README 文档
README
.
Installing
使用之前,请认真阅读ladaza API 文档 https://open.lazada.com/doc/doc.htm?spm=a2o9m.11193494.0.0.191e266bRZ7fPZ&nodeId=27493&docId=118729#?nodeId=29586&docId=120248
$ composer require onetech/easy-lazada -vvv
Usage
use Onetech\EasyLazada\Lazada; require 'vendor/autoload.php'; $lazada = new Lazada([ 'region' => 'TH', 'app_key' => '', 'app_secret' => '', 'redirect_uri' => 'https://admin.erp.local', 'debug' => true, 'sandbox' => true, 'log' => [ 'name' => 'foundation', 'file' => sys_get_temp_dir() . '/foundation.log', 'level' => 'debug', 'permission' => 0777, ], 'cache' => new Doctrine\Common\Cache\FilesystemCache(sys_get_temp_dir()) ]); //1. 创建授权地址,引导用户进行授权 echo $lazada->oauth->authorizer->create(); //2. 从redirect url中获取code值,去换取access_token等信息 $code = $_GET['code']; echo $lazada->access_token->setCode($code)->getToken();//创建token //$lazada->access_token->refresh(); //$lazada->access_token->getToken(); //$lazada->access_token->getRefreshToken(); //$lazada->access_token->delToken(); $order_id = 13800138000; $res = $lazada->order->getOrder($order_id);
TODO
- 还有部分API还没有对接,PR welcome
- 上传图片的API还没有对接成功
- 其他未知问题
Contributing
You can contribute in one of three ways:
- File bug reports using the issue tracker.
- Answer questions or fix bugs on the issue tracker.
- Contribute new features or update the wiki.
The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.
License
MIT
统计信息
- 总下载量: 2.9k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-12-07