transfer
This commit is contained in:
parent
82410e0f3d
commit
6a043fc827
@ -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
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user