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