快捷支付 平台币充值

master
tpingzhang 5 years ago
parent 43adffff1b
commit 02615ce30f

@ -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) { $payInfo = M('pay_info', 'tab_')->where([
$request['price'] = I('request.price'); 'user_id' => I('user_id'),
} else { 'game_id' => I('game_id'),
$payInfo = M('pay_info', 'tab_')->where([ 'extend' => I('extend'),
'user_id' => I('user_id'), ])->order('id desc')->find();
'game_id' => I('game_id'), $request['price'] = $payInfo['price'];
'extend' => I('extend'),
])->order('id desc')->find();
$request['price'] = $payInfo['price'];
}
$userToken = I('request.user_token'); $userToken = I('request.user_token');
@ -689,8 +684,8 @@ class WapPayController extends BaseController{
'id' => $payInfo['id'] 'id' => $payInfo['id']
])->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'];

Loading…
Cancel
Save