diff --git a/Application/Common/Api/GameApi.class.php b/Application/Common/Api/GameApi.class.php index 3a6c71b27..e2584ef09 100644 --- a/Application/Common/Api/GameApi.class.php +++ b/Application/Common/Api/GameApi.class.php @@ -11,6 +11,7 @@ namespace Common\Api; use Org\UcenterSDK\Ucservice; +use Think\Log; class GameApi { public function game_login(){ @@ -18,6 +19,7 @@ class GameApi { } public function game_pay_notify($param=null,$code=1,$is_uc=0){ + Log::write("notice:".serialize($param), Log::DEBUG); $pay_map['pay_status'] = 1; $pay_map['pay_game_status'] = 0; if($is_uc){ diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index 706c27e55..bcfc08db0 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -1772,6 +1772,15 @@ class UserController extends BaseController if (isset($r['shortcut']) && $r['shortcut'] == 1) $shortcut_pay = 1; } + // 双乾微信小程序支付 + $wx_small = 0; + $sqpay = M('tool','tab_')->field('status, config')->where(array('name'=>'sqpay'))->find(); + if ($sqpay['status'] == 1) { + $r = json_decode($sqpay['config'], true); + if (isset($r['wx_small']) && $r['wx_small'] == 1) + $wx_small = 1; + } + $user_id = $request['user_id']; $game_id = $request['game_id']; $balance = M ('user', 'tab_')->where (array( @@ -1797,8 +1806,8 @@ class UserController extends BaseController 'squnion_pay' => $squnion_pay, // 银联0关 1开 'platform_coin' => $balance, 'bind_coin' => $bind_balance, - 'wx_type' => 0, // 0微信 1 微信小程序 双乾 - 'shortcut_pay' => 0, // 快捷支付 0关 1开 + 'wx_type' => $wx_small, // 0微信 1 微信小程序 双乾 + 'shortcut_pay' => $shortcut_pay, // 快捷支付 0关 1开 ))); } @@ -2013,10 +2022,8 @@ class UserController extends BaseController } $return = M('User', 'tab_') -> where($map) -> save($data); - if (!$return) { - + if ($return === false) { $this -> set_message(1070, "fail", "用户数据更新失败"); - } $data['status'] = 200; echo base64_encode(json_encode($data));