shopwwi / webman-express
express for the webman
v1.0.2
2023-12-07 02:13 UTC
Requires
- php: >=7.2 || ^8.0
- guzzlehttp/guzzle: ^7.0
README
composer require shopwwi/webman-express
配置文件
//路径 config/plugin/shopwwi/express/app.php
'default' => 'kuaidi100',
'holder' => [
'kuaidi100' => [
'driver' => \Shopwwi\WebmanExpress\Adapter\KuaiDi100AdapterFactory::class,
'api_url' => 'https://poll.kuaidi100.com/poll/query.do',
'app_id' => '', //customer
'app_key' => '' //授权KEY
],
'kdniao' => [
'driver' => \Shopwwi\WebmanExpress\Adapter\KdNiaoAdapterFactory::class,
'api_url' => 'https://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx', //测试地址 http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json
'app_id' => '',
'app_key' => ''
],
'showapi' => [
'driver' => \Shopwwi\WebmanExpress\Adapter\ShowApiAdapterFactory::class,
'api_url' => 'https://route.showapi.com/2650',
'app_id' => '', //showapi_appid
'app_key' => '' //secret
]
],
支持的查询
- 快递100 (kuaidi100)
- 快递鸟(kdniao)
- 万维易源 (showapi)
使用方法
- 选择选定器
use Shopwwi\WebmanExpress\Facade\Express; $express = Express::make(); //默认选定器 $express = Express::make('kuaidi100');
2.快递查询
use Shopwwi\WebmanExpress\Facade\Express; $express = Express::make(); //默认选定器 // $tracking_code 快递单号 // $shipping_code 物流公司编码 // $additional 扩展参数 详见下面说明 $express = $express->track($tracking_code, $shipping_code,$additional = [])
3.请求扩展参数区别($additional)
- 快递鸟
- 快递100
4.返回结果说明(对各站进行了统一)