正在显示
1 个修改的文件
包含
4 行增加
和
1 行删除
@@ -154,6 +154,9 @@ class Store extends Backend | @@ -154,6 +154,9 @@ class Store extends Backend | ||
154 | 'updatetime' => $time | 154 | 'updatetime' => $time |
155 | ]; | 155 | ]; |
156 | $refund_result = $this->refund($refund); | 156 | $refund_result = $this->refund($refund); |
157 | + if($refund_result['return_code'] != 'SUCCESS' || $refund_result['result_code'] != 'SUCCESS') { | ||
158 | + Db::rollback(); | ||
159 | + } | ||
157 | Db::name('refund')->insert($refund); | 160 | Db::name('refund')->insert($refund); |
158 | } | 161 | } |
159 | Db::commit(); | 162 | Db::commit(); |
@@ -168,7 +171,7 @@ class Store extends Backend | @@ -168,7 +171,7 @@ class Store extends Backend | ||
168 | $this->error($e->getMessage()); | 171 | $this->error($e->getMessage()); |
169 | } | 172 | } |
170 | if ($result !== false && $result_admin !== false && $result_auth_group !== false) { | 173 | if ($result !== false && $result_admin !== false && $result_auth_group !== false) { |
171 | - $this->error('','',$refund_result); | 174 | + $this->error('','',[$refund,$refund_result]); |
172 | } else { | 175 | } else { |
173 | $this->error(__('No rows were updated')); | 176 | $this->error(__('No rows were updated')); |
174 | } | 177 | } |
-
请 注册 或 登录 后发表评论