作者 王智

xiugai

@@ -108,8 +108,6 @@ class Pay extends Api @@ -108,8 +108,6 @@ class Pay extends Api
108 die; 108 die;
109 } 109 }
110 //在此编写订单逻辑 110 //在此编写订单逻辑
111 - $PayOrderInfo = Db::name('pay_order')->where('PayOrder', $data['out_trade_no'])->find();  
112 - $UnionID = Db::name('user')->where('id', $PayOrderInfo['user_id'])->value('UnionID');  
113 //修改支付订单状态 111 //修改支付订单状态
114 $UpdateStatus = Db::name('pay_order')->where('PayOrder', $data['out_trade_no'])->update( 112 $UpdateStatus = Db::name('pay_order')->where('PayOrder', $data['out_trade_no'])->update(
115 [ 113 [
@@ -119,7 +117,10 @@ class Pay extends Api @@ -119,7 +117,10 @@ class Pay extends Api
119 'pay_time' => time() 117 'pay_time' => time()
120 ] 118 ]
121 ); 119 );
  120 + $PayOrderInfo = Db::name('pay_order')->where('PayOrder', $data['out_trade_no'])->find();
122 $OrderInfo = Db::name('order')->where('OrderSn', $PayOrderInfo['OrderSn'])->find(); 121 $OrderInfo = Db::name('order')->where('OrderSn', $PayOrderInfo['OrderSn'])->find();
  122 + $UnionID = Db::name('user')->where('id', $PayOrderInfo['user_id'])->value('UnionID');
  123 +
123 if (!$UpdateStatus) { 124 if (!$UpdateStatus) {
124 $this->error('修改支付订单状态失败', 0); 125 $this->error('修改支付订单状态失败', 0);
125 die; 126 die;