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