fix(addon/wechatpay): 修复微信支付回调错误

This commit is contained in:
2025-12-04 11:05:08 +08:00
parent 8e159edf1d
commit eef56291eb

View File

@@ -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();
}
}
}