From 83d20e4d597e165b34ce8244ddf184ce99b0bb70 Mon Sep 17 00:00:00 2001 From: Hankin Date: Fri, 24 Apr 2026 16:59:13 +0800 Subject: [PATCH] transfer --- app/Http/Controllers/WechatPayController.php | 2 +- app/Services/WechatPayService.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/WechatPayController.php b/app/Http/Controllers/WechatPayController.php index c3c9a41..5919aa8 100644 --- a/app/Http/Controllers/WechatPayController.php +++ b/app/Http/Controllers/WechatPayController.php @@ -55,7 +55,7 @@ class WechatPayController extends Controller 'wechatpay-signature' => $_SERVER['HTTP_WECHATPAY_SIGNATURE'] ?? '', 'wechatpay-serial' => $_SERVER['HTTP_WECHATPAY_SERIAL'] ?? '', ]; - $body = file_get_contents('php://input'); + $body = $request->all(); Log::info("请求头", ["headers" => $headers]); Log::info("请求体", ["body" => $body]); $res = WechatPayService::mchTransferCallback($headers, $body); diff --git a/app/Services/WechatPayService.php b/app/Services/WechatPayService.php index b780fb1..6077d21 100644 --- a/app/Services/WechatPayService.php +++ b/app/Services/WechatPayService.php @@ -170,9 +170,9 @@ class WechatPayService /** * AES-256-GCM 解密回调数据 */ - private function decryptNotifyData(string $rawBody): ?array + private function decryptNotifyData(string $data): ?array { - $data = json_decode($rawBody, true); + // $data = json_decode($rawBody, true); if (!isset($data['resource'])) { return null;