diff --git a/Application/Sdk/Controller/PayH5Controller.class.php b/Application/Sdk/Controller/PayH5Controller.class.php index e0deff91..b243e91e 100644 --- a/Application/Sdk/Controller/PayH5Controller.class.php +++ b/Application/Sdk/Controller/PayH5Controller.class.php @@ -1203,13 +1203,11 @@ 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; - } + $spend = M('spend','tab_')->where(['pay_order_number' => $request['pay_order_number']])->find(); + if ($spend && $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']);