...
|
...
|
@@ -33,12 +33,10 @@ class ChargeController extends HomeBaseController |
|
|
{
|
|
|
$pay = new \Payment();
|
|
|
$return = $pay->handleNotify();
|
|
|
session('op', $return['attach']);
|
|
|
if (!empty($return)) {
|
|
|
$info = Db::name('charge')->where(['id' => $return['attach']])->find();
|
|
|
$balance = $info['denomination'] + $info['bonus'];
|
|
|
|
|
|
Db::startTrans();
|
|
|
//Db::startTrans();
|
|
|
if (Db::name('user')->where(['openid' => $return['openid'], 'id' => session('user.id')])->setInc('balance', $balance)) {
|
|
|
$data = [
|
|
|
'user_id' => session('user.id'),
|
...
|
...
|
@@ -47,7 +45,7 @@ class ChargeController extends HomeBaseController |
|
|
'create_time' => time()
|
|
|
];
|
|
|
if (Db::name('my_wallet')->insert($data)) {
|
|
|
Db::commit();
|
|
|
//Db::commit();
|
|
|
echo "<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>";
|
|
|
exit();
|
|
|
} else {
|
...
|
...
|
|