This commit is contained in:
Hankin 2026-04-24 17:01:33 +08:00
parent 83d20e4d59
commit 61576d87a4
2 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ class WechatPayController extends Controller
'wechatpay-signature' => $_SERVER['HTTP_WECHATPAY_SIGNATURE'] ?? '',
'wechatpay-serial' => $_SERVER['HTTP_WECHATPAY_SERIAL'] ?? '',
];
$body = $request->all();
$body = $request->getContent();
Log::info("请求头", ["headers" => $headers]);
Log::info("请求体", ["body" => $body]);
$res = WechatPayService::mchTransferCallback($headers, $body);

View File

@ -170,9 +170,9 @@ class WechatPayService
/**
* AES-256-GCM 解密回调数据
*/
private function decryptNotifyData(string $data): ?array
private function decryptNotifyData(string $rawBody): ?array
{
// $data = json_decode($rawBody, true);
$data = json_decode($rawBody, true);
if (!isset($data['resource'])) {
return null;