diff --git a/app/Services/WechatPayService.php b/app/Services/WechatPayService.php index 001f895..3341c24 100644 --- a/app/Services/WechatPayService.php +++ b/app/Services/WechatPayService.php @@ -184,11 +184,12 @@ class WechatPayService $ciphertext = base64_decode($resource['ciphertext']); $nonce = $resource['nonce']; $associatedData = $resource['associated_data'] ?? ''; - + $apiV3Key = config("wechatpay.payment.api3_key"); + Log::info("解密数据", ["ciphertext" => $ciphertext, "apiV3Key" => $apiV3Key, "nonce" => $nonce, "associatedData" => $associatedData]); // PHP 7.1+ 原生支持 AES-256-GCM $decrypted = AesGcm::decrypt( $ciphertext, // Base64解码后的密文(包含tag) - config("wechatpay.payment.api3_key"), + $apiV3Key, $nonce, $associatedData );