diff --git a/Application/Sdk/Controller/SpendController.class.php b/Application/Sdk/Controller/SpendController.class.php index eaa07174..751545d9 100644 --- a/Application/Sdk/Controller/SpendController.class.php +++ b/Application/Sdk/Controller/SpendController.class.php @@ -540,14 +540,17 @@ ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`; $user_token = I('request.user_token'); $pay_way = I('request.payway'); $game_id = I('request.game_id'); - $user_id = I('request.user_id'); if (!$user_token) { echo "access deny!"; die(); } - + $userTokenInfo = M("user_token", "tab_")->where(array( + 'user_token' => $user_token, + 'game_id' => $game_id + ))->getField("user_id"); + $user_id = $userTokenInfo['user_id']; // var_dump($game_id);die(); if (!$game_id) { echo json_encode(['code'=>0,'msg'=>'参数错误']); @@ -591,32 +594,22 @@ ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`; exit; } - $intentionLog = $payChannelIntention->where(array( - 'pay_order_number' => $pay_info['order_id'] - ))->count(); - - $pay_intention_num = M('pay_intention_num','tab_')->field('num')->where(['pay_order_number' => $pay_info['order_id']])->find(); - if ($pay_intention_num&&$pay_intention_num['num']>9) { // 超过十条不做记录 echo json_encode(['code'=>200,'msg'=>'']); exit; } -// $user_info = M('user','tab_')->field('account')->where(['id'=>$user_id])->find(); - $insert['user_id'] = $user_id; $insert['user_account'] = $pay_info['user_account']; $insert['pay_way'] = $pay_way; $insert['pay_amount'] = $pay_info['price']; $insert['pay_order_number'] = $pay_info['order_id']; $insert['create_time'] = time(); - $is_success = M('pay_channel_intention','tab_')->add($insert); if ($is_success) { - if (!$pay_intention_num) { M('pay_intention_num','tab_')->add(['num'=>1,'pay_order_number'=>$pay_info['order_id']]); } else { diff --git a/Application/Sdk/View/default/UserH/platform_pay.html b/Application/Sdk/View/default/UserH/platform_pay.html index 05a15887..cc4bb6fa 100644 --- a/Application/Sdk/View/default/UserH/platform_pay.html +++ b/Application/Sdk/View/default/UserH/platform_pay.html @@ -116,7 +116,6 @@ -