|
|
@ -69,7 +69,7 @@ class PayH5Controller extends BaseController{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$game = M('game', 'tab_')->where(['id' => $game_id])->find();
|
|
|
|
$game = M('game', 'tab_')->where(['id' => $game_id])->find();
|
|
|
|
$pay_info = get_payment_config(self::ALI_PAY, $game, $request['user_id'], $request['price']);
|
|
|
|
$pay_info = get_payment_config(self::ALI_PAY, $game, $request['user_id'], $request['price'], true);
|
|
|
|
if ($pay_info['code'] != 0) {
|
|
|
|
if ($pay_info['code'] != 0) {
|
|
|
|
echo json_encode(['code'=>1010,'msg'=> $pay_info['msg']]);
|
|
|
|
echo json_encode(['code'=>1010,'msg'=> $pay_info['msg']]);
|
|
|
|
exit;
|
|
|
|
exit;
|
|
|
@ -425,13 +425,15 @@ class PayH5Controller extends BaseController{
|
|
|
|
$request['discount_amount'] = $discountAmount;
|
|
|
|
$request['discount_amount'] = $discountAmount;
|
|
|
|
$request['discount'] = $discount;
|
|
|
|
$request['discount'] = $discount;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$this->other_price($request, $discountAmount);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$pay_info = get_payment_config(self::ALI_PAY, $game, $request['user_id'], $request['price']);
|
|
|
|
$pay_info = get_payment_config(self::ALI_PAY, $game, $request['user_id'], $request['price']);
|
|
|
|
if ($pay_info['code'] != 0) {
|
|
|
|
if ($pay_info['code'] != 0) {
|
|
|
|
echo json_encode(['code'=>1010,'msg'=> $pay_info['msg']]);
|
|
|
|
echo json_encode(['code'=>1010,'msg'=> $pay_info['msg']]);
|
|
|
|
exit;
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->other_price($request, $discountAmount, $pay_info);
|
|
|
|
|
|
|
|
|
|
|
|
$main_id = $pay_info['data']['main_id'];
|
|
|
|
$main_id = $pay_info['data']['main_id'];
|
|
|
|
$pay_conf = json_decode($pay_info['data']['config'], true);
|
|
|
|
$pay_conf = json_decode($pay_info['data']['config'], true);
|
|
|
|
$pay_info = $pay_info['data'];
|
|
|
|
$pay_info = $pay_info['data'];
|
|
|
@ -876,7 +878,7 @@ class PayH5Controller extends BaseController{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$game = M('game', 'tab_')->where(['id' => $game_id])->find();
|
|
|
|
$game = M('game', 'tab_')->where(['id' => $game_id])->find();
|
|
|
|
$pay_info = get_payment_config(self::WX_PAY, $game, $request['user_id'], $request['price']);
|
|
|
|
$pay_info = get_payment_config(self::WX_PAY, $game, $request['user_id'], $request['price'], true);
|
|
|
|
if ($pay_info['code'] != 0) {
|
|
|
|
if ($pay_info['code'] != 0) {
|
|
|
|
echo json_encode(['code'=>1010,'msg'=> $pay_info['msg']]);
|
|
|
|
echo json_encode(['code'=>1010,'msg'=> $pay_info['msg']]);
|
|
|
|
exit;
|
|
|
|
exit;
|
|
|
|