|
|
@ -411,7 +411,7 @@ class AppleController extends BaseController{
|
|
|
|
$this->add_deposit($request);
|
|
|
|
$this->add_deposit($request);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$json_data['url'] = $is_pay['mweb_url'].'&redirect_url='.(is_ssl()?'https%3A%2F%2F':'http%3A%2F%2F'). $_SERVER ['HTTP_HOST'] . "%2Fsdk.php%2FSpend%2Fpay_success2%2Forderno%2F".$request['pay_order_number'].'%2Fgame_id%2F'.$request['game_id'] ;
|
|
|
|
$json_data['url'] = $is_pay['mweb_url'].'&redirect_url='.(is_ssl()?'https%3A%2F%2F':'http%3A%2F%2F'). $_SERVER ['HTTP_HOST'] . "%2Fsdk.php%2FSpend%2Fpay_success%2Forderno%2F".$request['pay_order_number'].'%2Fgame_id%2F'.$request['game_id'] ;
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -824,7 +824,10 @@ class AppleController extends BaseController{
|
|
|
|
$user_play_map['user_id'] = $request['user_id'];
|
|
|
|
$user_play_map['user_id'] = $request['user_id'];
|
|
|
|
$user_play_map['game_id'] = $request['game_id'];
|
|
|
|
$user_play_map['game_id'] = $request['game_id'];
|
|
|
|
$user_play_data = $user_play->where($user_play_map)->find();
|
|
|
|
$user_play_data = $user_play->where($user_play_map)->find();
|
|
|
|
|
|
|
|
$balance = $user->where(array('id' => $request['user_id']))->getField("balance");
|
|
|
|
|
|
|
|
if ($balance + $user_play_data['bind_balance'] < $request['price']) {
|
|
|
|
|
|
|
|
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'您金额不足,请退出重试.')));exit;
|
|
|
|
|
|
|
|
}
|
|
|
|
if ($user_play_data['bind_balance'] < $request['price']) {
|
|
|
|
if ($user_play_data['bind_balance'] < $request['price']) {
|
|
|
|
$price = $request['price'];
|
|
|
|
$price = $request['price'];
|
|
|
|
if ($user_play_data['bind_balance'] > 0) {
|
|
|
|
if ($user_play_data['bind_balance'] > 0) {
|
|
|
|