作者 王智

xiugai

@@ -268,36 +268,23 @@ class GuanYiCloud extends Api @@ -268,36 +268,23 @@ class GuanYiCloud extends Api
268 // $date['receiver_mobile']='15928552965'; 268 // $date['receiver_mobile']='15928552965';
269 $data['sign'] = $this->sign($data, SECRET); 269 $data['sign'] = $this->sign($data, SECRET);
270 $Array = json_decode(json_encode(json_decode($this->mycurl(URL, $data))), true); 270 $Array = json_decode(json_encode(json_decode($this->mycurl(URL, $data))), true);
271 - //验证  
272 -// if (empty($Array['orders'])) {  
273 -// $this->error('获取订单失败:平台单号' . $OrderSn);  
274 -// }  
275 dump($Array['orders'][0]['details'][0]['refund']); 271 dump($Array['orders'][0]['details'][0]['refund']);
276 -// $delivery_state = $Array['orders'][0]['delivery_state'];  
277 -// $refund = $Array['orders'][0]['details'][0]['refund'];  
278 -// $platform_code = $Array['orders'][0]['platform_code'];  
279 -// if (!empty($Array['orders'][0]['deliverys'])) {  
280 -// $express_name = $Array['orders'][0]['deliverys'][0]['express_name'];  
281 -// $express_code = $Array['orders'][0]['deliverys'][0]['express_code'];  
282 -// $mail_no = $Array['orders'][0]['deliverys'][0]['mail_no'];  
283 -// } else {  
284 -// $express_name = '';  
285 -// $express_code = '';  
286 -// $mail_no = '';  
287 -// }  
288 -// $Return = [  
289 -// //发货状态 0-未发货//1-部分发货//2-全部发货  
290 -// 'delivery_state' => $delivery_state,  
291 -// //平台单号  
292 -// 'platform_code' => $platform_code,  
293 -// //快递公司名称  
294 -// 'express_name' => $express_name,  
295 -// //快递公司代码  
296 -// 'express_code' => $express_code,  
297 -// //快递单号  
298 -// 'mail_no' => $mail_no  
299 -// ];  
300 -// $Json = json_encode($Return);  
301 -// return $Json; 272 + }
  273 +
  274 +
  275 + //获取订单oid
  276 + public function OrderUpdate()
  277 + {
  278 + $OrderSn = input('order');
  279 + $data = array();
  280 + $data['appkey'] = APPKEY;
  281 + $data['sessionkey'] = SESSIONKEY;
  282 + $data['method'] = 'gy.erp.trade.refund.update';
  283 + $data['tid'] = $OrderSn;
  284 + $data['refund_state'] = 2;
  285 + // $date['receiver_mobile']='15928552965';
  286 + $data['sign'] = $this->sign($data, SECRET);
  287 + $Array = json_decode(json_encode(json_decode($this->mycurl(URL, $data))), true);
  288 + dump($Array);
302 } 289 }
303 } 290 }