|
|
@ -574,6 +574,7 @@ class WapPayController extends BaseController{
|
|
|
|
$request['game_id'] = I('request.game_id');
|
|
|
|
$request['game_id'] = I('request.game_id');
|
|
|
|
$type = "platform";
|
|
|
|
$type = "platform";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$userToken = I('request.user_token');
|
|
|
|
/* $request['user_id'] = 232;
|
|
|
|
/* $request['user_id'] = 232;
|
|
|
|
$request['game_id'] = 78;
|
|
|
|
$request['game_id'] = 78;
|
|
|
|
$request['price'] = 0.02;
|
|
|
|
$request['price'] = 0.02;
|
|
|
@ -582,7 +583,7 @@ class WapPayController extends BaseController{
|
|
|
|
$request['pay_order_number'] = "SP_24522992339581"; */
|
|
|
|
$request['pay_order_number'] = "SP_24522992339581"; */
|
|
|
|
|
|
|
|
|
|
|
|
if (empty($request)) {
|
|
|
|
if (empty($request)) {
|
|
|
|
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'登录数据不能为空')));exit;
|
|
|
|
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'is_platform'=> 1,'msg'=>'登录数据不能为空', 'user_token' => $userToken)));exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 支付验证 是否让支付
|
|
|
|
// 支付验证 是否让支付
|
|
|
|
$payCheck = pay_check($request['user_id']);
|
|
|
|
$payCheck = pay_check($request['user_id']);
|
|
|
@ -595,7 +596,7 @@ class WapPayController extends BaseController{
|
|
|
|
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'该游戏暂时无法充值,请联系客服!')));exit;
|
|
|
|
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'该游戏暂时无法充值,请联系客服!')));exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if($request['price']*1<=0){
|
|
|
|
if($request['price']*1<=0){
|
|
|
|
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'is_platform'=> 1,'msg'=>'充值金额有误')));exit;
|
|
|
|
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'is_platform'=> 1,'msg'=>'充值金额有误', 'user_token' => $userToken)));exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
C(api('Config/lists'));
|
|
|
|
C(api('Config/lists'));
|
|
|
@ -603,7 +604,7 @@ class WapPayController extends BaseController{
|
|
|
|
if ($request['code'] == 1) {
|
|
|
|
if ($request['code'] == 1) {
|
|
|
|
$extend_data = M('spend','tab_')->where(array('extend'=>$request['extend'],'game_id'=>$request['game_id'],'pay_status'=>1))->find();
|
|
|
|
$extend_data = M('spend','tab_')->where(array('extend'=>$request['extend'],'game_id'=>$request['game_id'],'pay_status'=>1))->find();
|
|
|
|
if($extend_data){
|
|
|
|
if($extend_data){
|
|
|
|
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'is_platform'=> 1,'msg'=>$request['game_id'].'订单号重复,请关闭支付页面重新支付'.$request['extend'])));exit;
|
|
|
|
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'is_platform'=> 1,'msg'=>$request['game_id'].'订单号重复,请关闭支付页面重新支付'.$request['extend'], 'user_token' => $userToken)));exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -620,7 +621,7 @@ class WapPayController extends BaseController{
|
|
|
|
$discount = $discount['discount'];
|
|
|
|
$discount = $discount['discount'];
|
|
|
|
$pay_amount = $discount * $request['price'] / 10;
|
|
|
|
$pay_amount = $discount * $request['price'] / 10;
|
|
|
|
if ($pay_amount < 0.01) {
|
|
|
|
if ($pay_amount < 0.01) {
|
|
|
|
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'is_platform'=> 1, 'msg'=>'充值金额有误.'.$pay_amount)));exit;
|
|
|
|
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'is_platform'=> 1, 'msg'=>'充值金额有误.'.$pay_amount, 'user_token' => $userToken)));exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ($request['code'] == 1) {
|
|
|
|
if ($request['code'] == 1) {
|
|
|
|