正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
@@ -34,10 +34,10 @@ class ChargeController extends HomeBaseController | @@ -34,10 +34,10 @@ class ChargeController extends HomeBaseController | ||
34 | $pay = new \Payment(); | 34 | $pay = new \Payment(); |
35 | $return = $pay->handleNotify(); | 35 | $return = $pay->handleNotify(); |
36 | if (!empty($return)) { | 36 | if (!empty($return)) { |
37 | - //$info = Db::name('charge')->where(['id' => $return['attach']])->find(); | ||
38 | - //$balance = $info['denomination'] + $info['bonus']; | ||
39 | - //Db::startTrans(); | ||
40 | - if (Db::name('user')->where(['openid' => $return['openid'], 'id' => session('user.id')])->setInc('balance', 50)) { | 37 | + $info = Db::name('charge')->where(['id' => $return['attach']])->find(); |
38 | + $balance = $info['denomination'] + $info['bonus']; | ||
39 | + Db::startTrans(); | ||
40 | + if (Db::name('user')->where(['openid' => $return['openid']])->setInc('balance', $balance)) { | ||
41 | $data = [ | 41 | $data = [ |
42 | 'user_id' => session('user.id'), | 42 | 'user_id' => session('user.id'), |
43 | 'type' => 1, | 43 | 'type' => 1, |
-
请 注册 或 登录 后发表评论