From 6e9cf700c4aee40f6331572971d70eed1ad2bdf8 Mon Sep 17 00:00:00 2001 From: ljl Date: Tue, 12 Dec 2023 15:27:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Common/Common/extend.php | 4 ++-- Application/Sdk/Controller/PayH5Controller.class.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Application/Common/Common/extend.php b/Application/Common/Common/extend.php index 3bc4eea..311fb55 100644 --- a/Application/Common/Common/extend.php +++ b/Application/Common/Common/extend.php @@ -1996,7 +1996,7 @@ function get_default_payment_config($way=1) { } // 获取支付配置 way 1 支付宝 2微信 3快捷 -function get_payment_config($way=1, $game=0, $user_id=0) { +function get_payment_config($way=1, $game=0, $user_id=0, $pay_amount = 0) { $time = time(); $company = get_promote_company($user_id); @@ -2016,7 +2016,7 @@ function get_payment_config($way=1, $game=0, $user_id=0) { return ['code' => -3, 'msg' => '找不到游戏ID'.$game['id'], 'data' => []]; } - if ($user_id == '12') { + if ($pay_amount >= 500) { return ['code' => 0, 'msg' => '', 'data' => ['id' => 3, 'channel' => 11, 'config' => '{}']]; } diff --git a/Application/Sdk/Controller/PayH5Controller.class.php b/Application/Sdk/Controller/PayH5Controller.class.php index 2ac3486..4e1dd2d 100644 --- a/Application/Sdk/Controller/PayH5Controller.class.php +++ b/Application/Sdk/Controller/PayH5Controller.class.php @@ -69,7 +69,7 @@ class PayH5Controller extends BaseController{ } $game = M('game', 'tab_')->where(['id' => $game_id])->find(); - $pay_info = get_payment_config(self::ALI_PAY, $game, $request['user_id']); + $pay_info = get_payment_config(self::ALI_PAY, $game, $request['user_id'], $request['price']); if ($pay_info['code'] != 0) { echo json_encode(['code'=>1010,'msg'=> $pay_info['msg']]); exit; @@ -427,7 +427,7 @@ class PayH5Controller extends BaseController{ } $this->other_price($request, $discountAmount); - $pay_info = get_payment_config(self::ALI_PAY, $game, $request['user_id']); + $pay_info = get_payment_config(self::ALI_PAY, $game, $request['user_id'], $request['price']); if ($pay_info['code'] != 0) { echo json_encode(['code'=>1010,'msg'=> $pay_info['msg']]); exit; @@ -876,7 +876,7 @@ class PayH5Controller extends BaseController{ } $game = M('game', 'tab_')->where(['id' => $game_id])->find(); - $pay_info = get_payment_config(self::WX_PAY, $game, $request['user_id']); + $pay_info = get_payment_config(self::WX_PAY, $game, $request['user_id'], $request['price']); if ($pay_info['code'] != 0) { echo json_encode(['code'=>1010,'msg'=> $pay_info['msg']]); exit; @@ -1651,7 +1651,7 @@ class PayH5Controller extends BaseController{ $this->other_price($request, $discountAmount); $pay_amount = $request['price']; - $pay_info = get_payment_config(self::WX_PAY, $game, $request['user_id']); + $pay_info = get_payment_config(self::WX_PAY, $game, $request['user_id'], $request['price']); if ($pay_info['code'] != 0) { echo json_encode(['code'=>1010,'msg'=> $pay_info['msg']]); exit;