|
@@ -19,14 +19,12 @@ class Pay
|
|
|
$status = $param['pay_status'];
|
|
|
$msg = $param['pay_msg'];
|
|
|
|
|
|
- if ($status == 2) {
|
|
|
-
|
|
|
- $order_id = 'WX' . $order_id;
|
|
|
- $order = Dever::db('product/order')->one(array('order_id' => $order_id, 'uid' => $uid));
|
|
|
+ $order = Dever::db('product/order')->one(array('order_id' => $order_id, 'uid' => $uid));
|
|
|
|
|
|
- if ($order) {
|
|
|
- Dever::db('product/order')->update(array('where_id' => $order['id'], 'status' => 2));
|
|
|
- }
|
|
|
+ if ($status == 2 && $order) {
|
|
|
+ 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));
|
|
|
}
|
|
|
}
|
|
|
}
|