Browse Source

订单取消与退订

lizhen_gitee 6 months ago
parent
commit
94b42ddcc6
2 changed files with 5 additions and 5 deletions
  1. 4 4
      addons/unishop/controller/Order.php
  2. 1 1
      application/config.php

+ 4 - 4
addons/unishop/controller/Order.php

@@ -357,7 +357,7 @@ class Order extends Base
         if ($order['have_paid'] != \addons\unishop\model\Order::PAID_NO) {
             $this->error('此订单已支付,无法取消');
         }
-        if ($order['have_delivered'] != \addons\unishop\model\Order::DELIVERED_NO) {
+        if ($order['have_received'] != \addons\unishop\model\Order::RECEIVED_NO) {
             $this->error('此订单已核销,无法取消');
         }
 
@@ -393,12 +393,12 @@ class Order extends Base
         if ($order['have_paid'] == \addons\unishop\model\Order::PAID_NO) {
             $this->error('未支付订单,直接取消即可');
         }
-        if ($order['have_delivered'] != \addons\unishop\model\Order::DELIVERED_NO) {
+        if ($order['have_received'] != \addons\unishop\model\Order::RECEIVED_NO) {
             $this->error('此订单已核销,无法退订');
         }
 
         Db::startTrans();
-        if ($order['status'] == \addons\unishop\model\Order::STATUS_NORMAL && $order['have_paid'] == \addons\unishop\model\Order::DELIVERED_NO) {
+        if ($order['status'] == \addons\unishop\model\Order::STATUS_NORMAL && $order['have_received'] == \addons\unishop\model\Order::RECEIVED_NO) {
 
             $refund_amount = $order['total_price'];
             $refund_status = 3;
@@ -444,7 +444,7 @@ class Order extends Base
     // 退款
     public function old_refund($order, $refund_price)
     {
-
+        return true;
         $table = 'unishop_order';
         $remark = '订单退款';
 

+ 1 - 1
application/config.php

@@ -372,7 +372,7 @@ return [
     //默认头像
     'default_avatar' => '/assets/img/default_avatar.png',
 
-    //微信支付退款用,和epay保持一直
+    //微信支付退款用,和epay保持一直, 健康E家的配置
     'wechatpay' => [
         'app_id' => 'wxbe5585d53a9b5062',  //小程序appid
         //'app_app_id' => 'wx6844c1575498710e',  //APP appid ,暂时用不到