dever 6 yıl önce
ebeveyn
işleme
a001c05519
1 değiştirilmiş dosya ile 5 ekleme ve 7 silme
  1. 5 7
      product/lib/Pay.php

+ 5 - 7
product/lib/Pay.php

@@ -19,14 +19,12 @@ class Pay
         $status = $param['pay_status'];
         $status = $param['pay_status'];
         $msg = $param['pay_msg'];
         $msg = $param['pay_msg'];
 
 
-		if ($status == 2) {
+        $order = Dever::db('product/order')->one(array('order_id' => $order_id, 'uid' => $uid));
-            # 支付成功
-            $order_id = 'WX' . $order_id;
-            $order = Dever::db('product/order')->one(array('order_id' => $order_id, 'uid' => $uid));
 
 
-            if ($order) {
+		if ($status == 2 && $order) {
-                Dever::db('product/order')->update(array('where_id' => $order['id'], 'status' => 2));
+            Dever::db('product/order')->update(array('where_id' => $order['id'], 'status' => 2));
-            }
+        } else {
+        	Dever::db('product/order')->update(array('where_id' => $order['id'], 'status' => 3));
         }
         }
 	}
 	}
 }
 }