|
@@ -31,10 +31,14 @@ class Set
|
|
|
$order = Dever::db('pay/order')->one(array('order_id' => $order_id, 'uid' => $uid));
|
|
|
|
|
|
if ($order) {
|
|
|
- $pay = Dever::db('pay/account')->one($order['account_id']);
|
|
|
- $method = '\\Pay\\Lib\\' . ucwords($pay['type']);
|
|
|
- $method = new $method($pay);
|
|
|
- $method->refund($order_id);
|
|
|
+
|
|
|
+ if ($status == 5) {
|
|
|
+ $pay = Dever::db('pay/account')->one($order['account_id']);
|
|
|
+ $method = '\\Pay\\Lib\\' . ucwords($pay['type']);
|
|
|
+ $method = new $method($pay);
|
|
|
+ $method->refund($order_id);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
$update['where_id'] = $order['id'];
|
|
|
$update['status'] = $status;
|