作者 王智

xiugai

@@ -258,9 +258,8 @@ class GuanYiCloud extends Api @@ -258,9 +258,8 @@ class GuanYiCloud extends Api
258 } 258 }
259 259
260 //获取订单oid 260 //获取订单oid
261 - public function GetOrderOid() 261 + public function GetOrderOid($OrderSn)
262 { 262 {
263 - $OrderSn = input('order');  
264 $data = array(); 263 $data = array();
265 $data['appkey'] = APPKEY; 264 $data['appkey'] = APPKEY;
266 $data['sessionkey'] = SESSIONKEY; 265 $data['sessionkey'] = SESSIONKEY;
@@ -269,9 +268,10 @@ class GuanYiCloud extends Api @@ -269,9 +268,10 @@ class GuanYiCloud extends Api
269 // $date['receiver_mobile']='15928552965'; 268 // $date['receiver_mobile']='15928552965';
270 $data['sign'] = $this->sign($data, SECRET); 269 $data['sign'] = $this->sign($data, SECRET);
271 $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);
272 - dump($Array);  
273 - die;  
274 - dump($Array['orders'][0]['details'][0]['refund']); 271 + //验证
  272 + if (empty($Array['orders'])) {
  273 + $this->error('获取订单失败:平台单号' . $OrderSn);
  274 + }
275 } 275 }
276 276
277 277
@@ -280,6 +280,8 @@ class Order extends Api @@ -280,6 +280,8 @@ class Order extends Api
280 'updatetime' => time() 280 'updatetime' => time()
281 ] 281 ]
282 ); 282 );
  283 + $GuanYiCloud = new GuanYiCloud();
  284 + $GuanYiCloud->GetOrderOid($params['OrderSn']);
283 if (!$res2) { 285 if (!$res2) {
284 $this->error('订单状态更改失败', 0); 286 $this->error('订单状态更改失败', 0);
285 die; 287 die;