dever 3 年之前
父节点
当前提交
e5ed3eacb0
共有 1 个文件被更改,包括 8 次插入5 次删除
  1. 8 5
      app/shop/lib/Refund.php

+ 8 - 5
app/shop/lib/Refund.php

@@ -397,13 +397,16 @@ class Refund
             'refund_order_id' => $refund_order_id
         );
 
-        $result = Dever::load('pay/api.refund', $param);
+        if ($refund_cash > 0) {
+            $result = Dever::load('pay/api.refund', $param);
 
-        if (!$result) {
-            # 退款失败,抛出错误
-            //throw new \Exception('退款失败');
-            Dever::alert('退款失败');
+            if (!$result) {
+                # 退款失败,抛出错误
+                //throw new \Exception('退款失败');
+                Dever::alert('退款失败');
+            }
         }
+        
         if (isset($data['uid']) && $data['uid'] > 0) {
 
             $shop = Dever::db('shop/info')->one($data['shop_id']);