正在显示
1 个修改的文件
包含
11 行增加
和
4 行删除
@@ -253,10 +253,17 @@ class Api extends Controller | @@ -253,10 +253,17 @@ class Api extends Controller | ||
253 | $cks = Db::name('order') | 253 | $cks = Db::name('order') |
254 | ->where(['order_no' => $data['out_trade_no']]) | 254 | ->where(['order_no' => $data['out_trade_no']]) |
255 | ->find(); | 255 | ->find(); |
256 | + | ||
256 | file_put_contents("pcl_pay_logs.log", date("Y-m-d H:i:s") . "::" . json_encode($cks, JSON_UNESCAPED_UNICODE) . PHP_EOL, FILE_APPEND); | 257 | file_put_contents("pcl_pay_logs.log", date("Y-m-d H:i:s") . "::" . json_encode($cks, JSON_UNESCAPED_UNICODE) . PHP_EOL, FILE_APPEND); |
257 | $this->senWxmsgToDriverUser($cks['id']); | 258 | $this->senWxmsgToDriverUser($cks['id']); |
258 | 259 | ||
259 | - if (!empty($cks) && $cks['is_pay'] == '2') { | 260 | + if($cks['rebook']==0){ |
261 | + | ||
262 | + $order['commission_pay'] = 1; | ||
263 | + $rs = Db::name('order') | ||
264 | + ->where(['order_no' => $data['out_trade_no']]) | ||
265 | + ->update($order); | ||
266 | + }else if (!empty($cks) && $cks['is_pay'] == '2') { | ||
260 | //更新订单信息 | 267 | //更新订单信息 |
261 | $order['transaction_id'] = $data['transaction_id']; | 268 | $order['transaction_id'] = $data['transaction_id']; |
262 | $order['is_pay'] = 1; | 269 | $order['is_pay'] = 1; |
@@ -267,7 +274,9 @@ class Api extends Controller | @@ -267,7 +274,9 @@ class Api extends Controller | ||
267 | ->where(['order_no' => $data['out_trade_no']]) | 274 | ->where(['order_no' => $data['out_trade_no']]) |
268 | ->update($order); | 275 | ->update($order); |
269 | SendMessage($cks['id']); | 276 | SendMessage($cks['id']); |
270 | - //生成订单日志 | 277 | + |
278 | + } | ||
279 | +//生成订单日志 | ||
271 | if ($rs) { | 280 | if ($rs) { |
272 | if($order['type']==1){ | 281 | if($order['type']==1){ |
273 | $orderlog['content'] = '计票消费'; | 282 | $orderlog['content'] = '计票消费'; |
@@ -284,8 +293,6 @@ class Api extends Controller | @@ -284,8 +293,6 @@ class Api extends Controller | ||
284 | //$this->SendMessage($cks['id']); | 293 | //$this->SendMessage($cks['id']); |
285 | 294 | ||
286 | } | 295 | } |
287 | - } | ||
288 | - | ||
289 | //你可以在这里你的业务处理逻辑,比如处理你的订单状态、给会员加余额等等功能 | 296 | //你可以在这里你的业务处理逻辑,比如处理你的订单状态、给会员加余额等等功能 |
290 | //下面这句必须要执行,且在此之前不能有任何输出 | 297 | //下面这句必须要执行,且在此之前不能有任何输出 |
291 | return $pay->success()->send(); | 298 | return $pay->success()->send(); |
-
请 注册 或 登录 后发表评论