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) {
}
$kuaidi->getSign();
MIT