lvhao 1 month ago
parent
commit
7a2bafa705
1 changed files with 5 additions and 3 deletions
  1. 5 3
      core/CoreApp/models/Model_usps.php

+ 5 - 3
core/CoreApp/models/Model_usps.php

@@ -508,17 +508,19 @@ function __construct(){
 		$payment_token = $this->get_payment();
 		$token = $this->get_token();
 		$url = 'https://apis.usps.com/labels/v3/return-label';
+		
+		$this->logic_ding->sendToDing("usps获取退货面单的pay_token【".$data['number']."】".json_encode($payment_token));
+		$this->logic_ding->sendToDing("usps获取退货面单的token【".$data['number']."】".json_encode($token));
 		if(is_array($payment_token)){
 			return$payment_token;
 		}
-		$this->logic_ding->sendToDing("usps获取退货面单的pay_token【".$data['number']."】".json_encode($payment_token));
-		$this->logic_ding->sendToDing("usps获取退货面单的token【".$data['number']."】".json_encode($token));
 		$header = array('X-Payment-Authorization-Token:'.$payment_token,'Authorization: Bearer '.$token,'Content-Type: application/json',"Accept: application/vnd.usps.labels+json");
 		$list = json_encode($list);
 
+
 		$this->logic_ding->sendToDing("usps获取退货面单的请求数据".$list);
 	   
-
+		
 
 		$ch = curl_init();
 		curl_setopt($ch,CURLOPT_URL,$url);