From 8cea033e0afd847ba4845ced6371aed597b67016 Mon Sep 17 00:00:00 2001 From: ljl Date: Wed, 30 Aug 2023 15:23:57 +0800 Subject: [PATCH] yh --- app/Helper/Baofu/Baofu.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Helper/Baofu/Baofu.php b/app/Helper/Baofu/Baofu.php index 2dd1348..e03eb15 100644 --- a/app/Helper/Baofu/Baofu.php +++ b/app/Helper/Baofu/Baofu.php @@ -511,7 +511,6 @@ class Baofu ]; ksort($content); - echo PHP_EOL; echo json_encode($content); echo PHP_EOL; $contentSign = SignatureUtil::sign(base64_encode(json_encode($content)), $this->getPfxFilePath(), $this->getPrivateKeyPassword()); @@ -522,9 +521,12 @@ class Baofu $url = 'https://public.baofu.com/union-gw/api/' . $header['serviceTp'] . '/transReq.do'; $response = HttpClient::post($url, $header); - var_dump($response); - // $result = Rsa::decryptByPublicKey($response, $this->getCerFilePath()); - // $result = base64_decode($result); + echo $response; + echo PHP_EOL; + $result = Rsa::decryptByPublicKey($response, $this->getCerFilePath()); + echo $result; + echo PHP_EOL; + $result = base64_decode($result); return json_encode($result, true); } }