...
|
...
|
@@ -142,15 +142,19 @@ class Store extends Backend |
|
|
}
|
|
|
if($params['status'] == 4) {
|
|
|
// 审核不通过,执行退款操作
|
|
|
$time = time();
|
|
|
$refund = [
|
|
|
'order_id' => $row->id,
|
|
|
'user_id' => $row->user_id,
|
|
|
'order_sn' => $row->order_sn,
|
|
|
'transaction_id' => $row->transaction_id,
|
|
|
'out_refund_no' => date('Ymd').substr($row->order_sn,-8),
|
|
|
'price' => 0.01 // $row->money
|
|
|
'price' => 0.01, // $row->money
|
|
|
'createtime' => $time,
|
|
|
'updatetime' => $time
|
|
|
];
|
|
|
$this->refund($refund);
|
|
|
$refund_result = $this->refund($refund);
|
|
|
Db::name('refund')->insert($refund);
|
|
|
}
|
|
|
Db::commit();
|
|
|
} catch (ValidateException $e) {
|
...
|
...
|
@@ -164,7 +168,7 @@ class Store extends Backend |
|
|
$this->error($e->getMessage());
|
|
|
}
|
|
|
if ($result !== false && $result_admin !== false && $result_auth_group !== false) {
|
|
|
$this->success();
|
|
|
$this->error('','',$refund_result);
|
|
|
} else {
|
|
|
$this->error(__('No rows were updated'));
|
|
|
}
|
...
|
...
|
|