正在显示
1 个修改的文件
包含
4 行增加
和
1 行删除
@@ -591,15 +591,18 @@ class Order extends Api | @@ -591,15 +591,18 @@ class Order extends Api | ||
591 | $config['notify_url'] = $this->request->domain().'api/notify/refund/type/wechat'; | 591 | $config['notify_url'] = $this->request->domain().'api/notify/refund/type/wechat'; |
592 | $config['return_url'] = ''; | 592 | $config['return_url'] = ''; |
593 | $wechat = Pay::wechat($config); | 593 | $wechat = Pay::wechat($config); |
594 | + $refund_no = 'LQ-'.time().mt_rand(10000,99999); | ||
594 | $param = [ | 595 | $param = [ |
595 | // 'total_fee' => $order['pay_price'], | 596 | // 'total_fee' => $order['pay_price'], |
596 | // 'refund_fee' => $order['pay_price'], | 597 | // 'refund_fee' => $order['pay_price'], |
597 | 'total_fee' => 0.01, | 598 | 'total_fee' => 0.01, |
598 | 'refund_fee' => 0.01, | 599 | 'refund_fee' => 0.01, |
599 | 'out_trade_no' => $order['order_no'], | 600 | 'out_trade_no' => $order['order_no'], |
600 | - 'out_refund_no' => 'LQ-'.time().mt_rand(10000,99999) | 601 | + 'out_refund_no' => $refund_no |
601 | ]; | 602 | ]; |
602 | $wechat->refund($param); | 603 | $wechat->refund($param); |
604 | + $order->refund_no = $refund_no; | ||
605 | + $order->isUpdate()->save(); | ||
603 | $this->success('取消成功'); | 606 | $this->success('取消成功'); |
604 | } | 607 | } |
605 | 608 |
-
请 注册 或 登录 后发表评论