From e010910a25a8159e6d56e7f87e471b59b35d27d5 Mon Sep 17 00:00:00 2001 From: xl Date: Mon, 13 Nov 2023 22:42:26 +0800 Subject: [PATCH] eee --- wchat/wx/V3/WxV3PaymentNotify.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wchat/wx/V3/WxV3PaymentNotify.php b/wchat/wx/V3/WxV3PaymentNotify.php index 37f5b86..657fe5f 100644 --- a/wchat/wx/V3/WxV3PaymentNotify.php +++ b/wchat/wx/V3/WxV3PaymentNotify.php @@ -73,10 +73,10 @@ class WxV3PaymentNotify extends SmallProgram public function verify(RequestInterface $request): bool { $platformPublicKeyInstance = $this->rsaFrom('file:///path/to/wechatpay/inWechatpaySerial.pem', KEY_TYPE_PUBLIC); - $inWechatpaySignature = $request->getHeaderLine('Wechatpay-Signature');// 请根据实际情况获取 - $inWechatpayTimestamp = $request->getHeaderLine('Wechatpay-Timestamp');// 请根据实际情况获取 - $inWechatpayNonce = $request->getHeaderLine('Wechatpay-Nonce');// 请根据实际情况获取 - $inBody = $request->getBody()->getContents();// 请根据实际情况获取,例如: file_get_contents('php://input'); + $inWechatpaySignature = $request->getHeaderLine('Wechatpay-Signature'); // 请根据实际情况获取 + $inWechatpayTimestamp = $request->getHeaderLine('Wechatpay-Timestamp'); // 请根据实际情况获取 + $inWechatpayNonce = $request->getHeaderLine('Wechatpay-Nonce'); // 请根据实际情况获取 + $inBody = $request->getBody()->getContents(); // 请根据实际情况获取,例如: file_get_contents('php://input'); $timeOffsetStatus = 300 >= abs(time() - (int)$inWechatpayTimestamp); $verifiedStatus = $this->notifyVerify( $this->lineFeed([$inWechatpayTimestamp, $inWechatpayNonce, $inBody]),