dever %!s(int64=3) %!d(string=hai) anos
pai
achega
e5ed3eacb0
Modificáronse 1 ficheiros con 8 adicións e 5 borrados
  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']);