From 0223f71f93da73d133316f9fa6042b494ee46817 Mon Sep 17 00:00:00 2001 From: ljl Date: Wed, 30 Aug 2023 15:15:51 +0800 Subject: [PATCH] yh --- app/Helper/Baofu/Baofu.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/Helper/Baofu/Baofu.php b/app/Helper/Baofu/Baofu.php index 51a52d3..1bff883 100644 --- a/app/Helper/Baofu/Baofu.php +++ b/app/Helper/Baofu/Baofu.php @@ -510,14 +510,21 @@ class Baofu 'body' => $body, ]; ksort($content); + + echo PHP_EOL; + echo json_encode($content); + echo PHP_EOL; $contentSign = SignatureUtil::sign(base64_encode(json_encode($content)), $this->getPfxFilePath(), $this->getPrivateKeyPassword()); $header['content'] = $contentSign; + echo json_encode($header); + echo PHP_EOL; + $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); + // $result = Rsa::decryptByPublicKey($response, $this->getCerFilePath()); + // $result = base64_decode($result); return json_encode($result, true); } }