From 8416d98ca00b585cf0f9ae82140068a20f274b37 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Fri, 25 Aug 2023 16:07:13 +0800 Subject: [PATCH] update --- src/applet/app/controllers/Alipay/DecryptController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/applet/app/controllers/Alipay/DecryptController.php b/src/applet/app/controllers/Alipay/DecryptController.php index b0d059a..c83852e 100644 --- a/src/applet/app/controllers/Alipay/DecryptController.php +++ b/src/applet/app/controllers/Alipay/DecryptController.php @@ -18,8 +18,11 @@ class DecryptController extends ControllerBase $args = $this->request->getJsonRawBody(true); $aesKey = $args["aes_key"] ?? "n1UenLsnSPxi2KsTv3y/0Q=="; //AES密钥 $content = $args["content"] ?? "Ho5y3nixH0tSnYWw8p/HMTO1bIONKSYd7BfkbI+ww4qgJEXKMYFWnSwjXN2B9YwvsKBYykK2gva2v1jfnQVSNQ=="; - $this->logger($args, 'Decrypt', true); $result = openssl_decrypt(base64_decode($content), 'AES-128-CBC', base64_decode($aesKey), OPENSSL_RAW_DATA); + $this->logger([ + "args" => $args, + "content" => $content, + ], 'Decrypt', true); if (!$result) { $this->api(Msg::NewError(500, 'AES解密失败!')); }