From acf3905c2e315c31c6b9da98251f5f70d9b69ad6 Mon Sep 17 00:00:00 2001 From: tping Date: Fri, 20 Aug 2021 15:14:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=98=E6=89=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/Controller/PayH5Controller.class.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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']);