dever 6 lat temu
rodzic
commit
af5ed2886c
2 zmienionych plików z 18 dodań i 2 usunięć
  1. 1 1
      act/database/order.php
  2. 17 1
      act/lib/Pay.php

+ 1 - 1
act/database/order.php

@@ -433,7 +433,7 @@ return array
         ),
 
         'list_button' => array(
-            'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin', '{status} == 2 && ({type} == 1 || {type} == 3)'),
+            'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin', '{status} >= 2 && ({type} == 1 || {type} == 3)'),
             //'delete' => array('删除', '', '{status} == 1'),
         ),
     ),

+ 17 - 1
act/lib/Pay.php

@@ -16,12 +16,28 @@ class Pay
         if ($status == 5 && $id > 0) {
             $send = array();
             $info = Dever::db('act/order')->one($id);
+            if ($info['system'] == 1) {
+                if ($info['cate_id'] == 1) {
+                    $account_id = 1;
+                }
+                if ($info['cate_id'] == 2) {
+                    $account_id = 4;
+                }
+                if ($info['cate_id'] == 3) {
+                    $account_id = 5;
+                }
+            } elseif ($info['system'] == 2) {
+                $account_id = 2;
+            } else {
+                $account_id = 3;
+            }
             $send['pay_project_id'] = 1;
             $send['pay_uid'] = $info['uid'];
             $send['pay_order_id'] = $info['order_id'] ? $info['order_id'] : Dever::load('act/order')->createOrderId($info, $info['id']);
             $send['pay_tk_pic'] = Dever::param('tk_pic', $data);
             $send['pay_tk_time'] = Dever::param('tk_time', $data);
             $send['pay_tk_desc'] = Dever::param('tk_desc', $data);
+            $send['pay_account_id'] = $account_id;
             $send['pay_status'] = $status;
             $send['dever_token'] = $this->key;
 
@@ -73,7 +89,7 @@ class Pay
                     }
                 }
             }
-            //Dever::load('pay/lib/set.updateStatus', $send);
+            Dever::load('pay/lib/set.updateStatus', $send);
         }
     }