pifeifei / jingdong-jos-api-sdk
jingdong aces php sdk
Installs: 2 310
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 4
Open Issues: 0
Requires
- php: >=8.0
- ext-curl: *
- ext-json: *
- ext-openssl: *
- ext-simplexml: *
- composer/ca-bundle: ^1.3
- guzzlehttp/guzzle: ^6.5|^7.0
- monolog/monolog: ^1.24.0|^2.0|^3.0
- netresearch/jsonmapper: ^1.6.0|^2.0|^3.0|^4.0
- psr/simple-cache: ^1.0|^2.0|^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.8
- phpstan/phpstan: ^1.8
- phpunit/phpunit: ^9.5
- symfony/finder: ^5.4|^6.0
- symfony/var-dumper: ^5.4|^6.0
Suggests
- ext-mysqli: 连 MySQL
- ext-sqlite: sqlite3
- symfony/cache: 默认缓存引擎
README
使用
<?php // 简单使用 use ACES\JdClient; //测试demo $config = [ 'appKey' => 'appKey', 'appSecret' => 'secret', 'redirectUrl' => 'https://localhost/?redirect url', // 'isvSource' => null, // 'shopNo' => null, // 'departmentNo' => null, // 'monthlyAccount' => null ]; $client = new JdClient($config); // 设置缓存 // $client->getAccessToken()->setCache(\Illuminate\Support\Facades\Cache::store()); // laravel // 获取 access token 字符串 dump($client->accessToken()); $req = new \ACES\Request\EclpFeeQueryFeeDetailWithPageRequest(); $req->setBillDay('2022-06-10'); $resp = $client->execute($req, $client->accessToken()); dd($resp); // 请求城市列表, 不用授权码 //$req = new \ACES\Request\AreaProvinceGetRequest(); //$req = new \ACES\Request\AreaCityGetRequest(); //$req->setParentId(1); // 北京 //$req = new \ACES\Request\AreaCountyGetRequest(); //$req->setParentId(72); // 北京 朝阳区 //$req = new \ACES\Request\AreaTownGetRequest(); //$req->setParentId(55690); // 北京 朝阳区 小红门地区 // false $req = new \ACES\Request\AreasProvinceGetRequest(); $resp = $client->execute($req, $client->accessToken()); dump($resp);