|
|
@ -590,25 +590,20 @@ class WapPayController extends BaseController{
|
|
|
|
$is_platform = 1; // 平台币充值
|
|
|
|
$is_platform = 1; // 平台币充值
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$prefix = ($is_platform == 1) ? 'PF_' : 'SP_';
|
|
|
|
//$prefix = ($is_platform == 1) ? 'PF_' : 'SP_';
|
|
|
|
$request['pay_order_number'] = $prefix . date('Ymd') . date('His') . sp_random_string(4);
|
|
|
|
//$request['pay_order_number'] = $prefix . date('Ymd') . date('His') . sp_random_string(4);
|
|
|
|
$request['game_id'] = I('request.game_id');
|
|
|
|
$request['game_id'] = I('request.game_id');
|
|
|
|
$game_id = $request['game_id'];
|
|
|
|
$game_id = $request['game_id'];
|
|
|
|
$request['user_id'] = I('request.user_id');
|
|
|
|
$request['user_id'] = I('request.user_id');
|
|
|
|
$user_id = $request['user_id'];
|
|
|
|
$user_id = $request['user_id'];
|
|
|
|
$request['code'] = I('request.code');
|
|
|
|
$request['code'] = I('request.code');
|
|
|
|
|
|
|
|
|
|
|
|
if ($is_platform) {
|
|
|
|
|
|
|
|
$request['price'] = I('request.price');
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$payInfo = M('pay_info', 'tab_')->where([
|
|
|
|
$payInfo = M('pay_info', 'tab_')->where([
|
|
|
|
'user_id' => I('user_id'),
|
|
|
|
'user_id' => I('user_id'),
|
|
|
|
'game_id' => I('game_id'),
|
|
|
|
'game_id' => I('game_id'),
|
|
|
|
'extend' => I('extend'),
|
|
|
|
'extend' => I('extend'),
|
|
|
|
])->order('id desc')->find();
|
|
|
|
])->order('id desc')->find();
|
|
|
|
$request['price'] = $payInfo['price'];
|
|
|
|
$request['price'] = $payInfo['price'];
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$userToken = I('request.user_token');
|
|
|
|
$userToken = I('request.user_token');
|
|
|
|
|
|
|
|
|
|
|
@ -690,7 +685,7 @@ class WapPayController extends BaseController{
|
|
|
|
])->save([
|
|
|
|
])->save([
|
|
|
|
'type' => 'sq_shortcut', // 游戏充值
|
|
|
|
'type' => 'sq_shortcut', // 游戏充值
|
|
|
|
//'order_id' => $request['pay_order_number'],
|
|
|
|
//'order_id' => $request['pay_order_number'],
|
|
|
|
'price' => $request['actual_amount'] ? $request['actual_amount'] : $request['price'],
|
|
|
|
//'price' => $request['actual_amount'] ? $request['actual_amount'] : $request['price'],
|
|
|
|
'info' => $infosave
|
|
|
|
'info' => $infosave
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
$info['code'] = $request['code'];
|
|
|
|
$info['code'] = $request['code'];
|
|
|
|