harriescc / kuaidi100
基于快递100,查询智能推送,云打印,短信
Installs: 4 361
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 2
Requires
- ext-json: *
- guzzlehttp/guzzle: >=6.3
- phpunit/phpunit: >=5
README
composer require harriescc/kuaidi100
实现功能
- 实时查询
- 智能查询 (不推荐使用)
- 订阅推送
- 云打印
开始准备
实时查询
use HarriesCC\Kuaidi100\Tracker; try { $kuaidi = new Tracker([ 'key' => '你的key', 'customer' => '你的customer' ]); $kuaidi->track('快递公司编码', '快递单号'); } catch (Exception $e) { }
智能查询(不推荐使用,查询结果不准)
use HarriesCC\Kuaidi100\Tracker; try { $kuaidi = new Tracker([ 'key' => '你的key' ]); $kuaidi->getAutoTrack('快递单号'); } catch (Exception $e) { }
订阅推送
use HarriesCC\Kuaidi100\Poll; try { $kuaidi = new Poll([ 'key' => 'uexWYZbd2758', ]); $kuaidi->getPoll('快递公司编码', '快递单号', '回调地址', '返回格式'); $kuaidi->getPollByParam([ // 根据文档的param参数 ], 'json'); } catch (Exception $e) { }
云打印
use HarriesCC\Kuaidi100\CloudPrint; try { $kuaidi = new CloudPrint([ 'customer' => '快递公司编码', 'key' => '申请的key', 'secret' => '分配的secret' ]); } catch (Exception $e) { }
云打印的sign
$kuaidi->getSign();
License
MIT