Skip to content

HarriesCC/kuaidi100

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

安装

composer require harriescc/kuaidi100

实现功能

- 实时查询
- 智能查询 (不推荐使用)
- 订阅推送
- 云打印

开始准备

快递100接口文档

实时查询

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

About

快递100 PHP SDK

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages