...
|
...
|
@@ -34,10 +34,10 @@ class ChargeController extends HomeBaseController |
|
|
$pay = new \Payment();
|
|
|
$return = $pay->handleNotify();
|
|
|
if (!empty($return)) {
|
|
|
//$info = Db::name('charge')->where(['id' => $return['attach']])->find();
|
|
|
//$balance = $info['denomination'] + $info['bonus'];
|
|
|
//Db::startTrans();
|
|
|
if (Db::name('user')->where(['openid' => $return['openid'], 'id' => session('user.id')])->setInc('balance', 50)) {
|
|
|
$info = Db::name('charge')->where(['id' => $return['attach']])->find();
|
|
|
$balance = $info['denomination'] + $info['bonus'];
|
|
|
Db::startTrans();
|
|
|
if (Db::name('user')->where(['openid' => $return['openid']])->setInc('balance', $balance)) {
|
|
|
$data = [
|
|
|
'user_id' => session('user.id'),
|
|
|
'type' => 1,
|
...
|
...
|
|