|
@@ -12,7 +12,7 @@ class Kd100 extends QueryInterface{
|
|
|
public function __construct()
|
|
|
{
|
|
|
$this->key=Env::get('logistics.kd100_key','fVczXhfg8960');
|
|
|
- $this->secret=config('site.kd100_secret')?:'kd100';
|
|
|
+ $this->secret=config('site.kd100_secret')?:'5496a2da1fca49e2acc9283d1f8f32ca';
|
|
|
$this->customer=Env::get('logistics.kd100_customer','B20CCD1C0BAFDD7E69CC986A1A0C57E0');
|
|
|
}
|
|
|
|
|
@@ -109,14 +109,14 @@ class Kd100 extends QueryInterface{
|
|
|
}
|
|
|
$params=[
|
|
|
'printType'=>'IMAGE',
|
|
|
- 'partnerId'=>config('site.kd100_lo_partnerId')?:'kd100',
|
|
|
- 'partnerKey'=>config('site.kd100_lo_partnerKey')?:'kd100',
|
|
|
- 'partnerSecret'=>config('site.kd100_lo_partnerSecret')?:'kd100',
|
|
|
- 'partnerName'=>config('site.kd100_lo_partnerName')?:'kd100',
|
|
|
- 'net'=>config('site.kd100_lo_net')?:'kd100',
|
|
|
- 'code'=>config('site.kd100_lo_code')?:'kd100',
|
|
|
- 'checkMan'=>config('site.kd100_lo_checkMan')?:'kd100',
|
|
|
- 'tbNet'=>config('site.kd100_lo_tbNet')?:'kd100',
|
|
|
+ 'partnerId'=>config('site.kd100_lo_partnerId')?:null,
|
|
|
+ 'partnerKey'=>config('site.kd100_lo_partnerKey')?:null,
|
|
|
+ 'partnerSecret'=>config('site.kd100_lo_partnerSecret')?:null,
|
|
|
+ 'partnerName'=>config('site.kd100_lo_partnerName')?:null,
|
|
|
+ 'net'=>config('site.kd100_lo_net')?:null,
|
|
|
+ 'code'=>config('site.kd100_lo_code')?:null,
|
|
|
+ 'checkMan'=>config('site.kd100_lo_checkMan')?:null,
|
|
|
+ 'tbNet'=>config('site.kd100_lo_tbNet')?:null,
|
|
|
'kuaidicom'=>$this->logistics->code_kd100,
|
|
|
'recMan'=>[
|
|
|
'name'=>$this->username,
|
|
@@ -130,16 +130,16 @@ class Kd100 extends QueryInterface{
|
|
|
'cargo'=>$this->getCargo(),
|
|
|
'count'=>$this->getCount(),
|
|
|
],
|
|
|
- 'tempId'=>config('site.kd100_lo_tempId')?:'kd100',
|
|
|
+ 'tempId'=>config('site.kd100_lo_tempId')?:'3f733ac0e8ca4ebfaadfc2d9b9ca2519',
|
|
|
'orderId'=>$this->getOrderNo(),
|
|
|
];
|
|
|
$body=[
|
|
|
'method'=>'order',
|
|
|
'key'=>$this->key,
|
|
|
't'=>time()*1000,
|
|
|
- 'param'=>$params,
|
|
|
+ 'param'=>json_encode($params,256),
|
|
|
];
|
|
|
- $body['sign']=md5(json_encode($params,256).$body['t'].$body['key'].$this->secret);
|
|
|
+ $body['sign']=strtoupper(md5($body['param'].$body['t'].$body['key'].$this->secret));
|
|
|
|
|
|
$response=(new Client)->post('https://api.kuaidi100.com/label/order',[
|
|
|
'form_params'=>$body,
|
|
@@ -152,6 +152,7 @@ class Kd100 extends QueryInterface{
|
|
|
if($data['code']!=200){
|
|
|
return [false,$data['message']];
|
|
|
}
|
|
|
- return [true,$data['label']];
|
|
|
+
|
|
|
+ return [true,$data['data']];
|
|
|
}
|
|
|
}
|