|
@@ -548,6 +548,8 @@ function __construct(){
|
|
|
|
|
|
$url = $url . '?' . http_build_query($get);
|
|
$url = $url . '?' . http_build_query($get);
|
|
$res = $this->su_curl('',$url,$header,'json',300,"GET");
|
|
$res = $this->su_curl('',$url,$header,'json',300,"GET");
|
|
|
|
+ $this->logic_ding->sendToDing("usps快递地址核对参数"."【".$data['number']."】".json_encode($get,JSON_UNESCAPED_UNICODE));
|
|
|
|
+ $this->logic_ding->sendToDing("usps快递地址核对结果"."【".$data['number']."】".$res);
|
|
$res = json_decode($res, true);
|
|
$res = json_decode($res, true);
|
|
if(isset($res['address']))
|
|
if(isset($res['address']))
|
|
{
|
|
{
|
|
@@ -999,7 +1001,7 @@ function __construct(){
|
|
$data['client_secret'] = $secret;
|
|
$data['client_secret'] = $secret;
|
|
$data['grant_type'] = 'client_credentials';
|
|
$data['grant_type'] = 'client_credentials';
|
|
$res = $this->api->su_curl($data,$url,$header,'http_build_query');
|
|
$res = $this->api->su_curl($data,$url,$header,'http_build_query');
|
|
- $this->logic_ding->sendToDing("usp快递获取token的".$res);
|
|
|
|
|
|
+ $this->logic_ding->sendToDing("usps快递获取token的".$res);
|
|
$res = json_decode($res, true);
|
|
$res = json_decode($res, true);
|
|
$token = $res['access_token'];//token
|
|
$token = $res['access_token'];//token
|
|
$dtime = $time+$res['expires_in']-3600;//过期时间 提前一个小时重新获取
|
|
$dtime = $time+$res['expires_in']-3600;//过期时间 提前一个小时重新获取
|