|
|
|
@ -1203,6 +1203,15 @@ class PayH5Controller extends BaseController{
|
|
|
|
|
$request['pay_way'] = 0;
|
|
|
|
|
$request['spend_ip'] = get_client_ip();
|
|
|
|
|
$user_entity = get_user_entity($request['user_id']);
|
|
|
|
|
$spend = M('spend','tab_')->where(['pay_order_number' => $request['order_id']])->find();
|
|
|
|
|
if ($spend) {
|
|
|
|
|
if ($spend['discount_amount'] > 0) {
|
|
|
|
|
$discountInfo = discountInfo($request['game_id']);
|
|
|
|
|
if (!$discountInfo) {
|
|
|
|
|
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>urlencode('折扣无效,请重试!'), 'user_token' => $this->userToken)));exit;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$discount = get_discount($request['game_id'], $request['user_id']);
|
|
|
|
|
$discount = $discount['discount'];
|
|
|
|
|
$discountAmount = 0;
|
|
|
|
|