From eef56291ebb186443f4585dfff403cf8b1e63d0d Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Thu, 4 Dec 2025 11:05:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(addon/wechatpay):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=94=AF=E4=BB=98=E5=9B=9E=E8=B0=83=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/addon/wechatpay/event/PayNotify.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/addon/wechatpay/event/PayNotify.php b/src/addon/wechatpay/event/PayNotify.php index 72c928437..a180cdb60 100644 --- a/src/addon/wechatpay/event/PayNotify.php +++ b/src/addon/wechatpay/event/PayNotify.php @@ -15,9 +15,11 @@ class PayNotify */ public function handle($param) { - $reqData = empty($GLOBALS[ 'HTTP_RAW_POST_DATA' ]) ? file_get_contents('php://input') : $GLOBALS[ 'HTTP_RAW_POST_DATA' ]; - Log::write('微信支付回调数据'); - Log::write($reqData); - return ( new PayModel() )->payNotify(); + if ($param[ "pay_type" ] == "wechatpay") { + $reqData = empty($GLOBALS[ 'HTTP_RAW_POST_DATA' ]) ? file_get_contents('php://input') : $GLOBALS[ 'HTTP_RAW_POST_DATA' ]; + Log::write('微信支付回调数据'); + Log::write($reqData); + return ( new PayModel() )->payNotify(); + } } } \ No newline at end of file