ljl 1 year ago
parent 9b1455ced7
commit 8cea033e0a

@ -511,7 +511,6 @@ class Baofu
]; ];
ksort($content); ksort($content);
echo PHP_EOL;
echo json_encode($content); echo json_encode($content);
echo PHP_EOL; echo PHP_EOL;
$contentSign = SignatureUtil::sign(base64_encode(json_encode($content)), $this->getPfxFilePath(), $this->getPrivateKeyPassword()); $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'; $url = 'https://public.baofu.com/union-gw/api/' . $header['serviceTp'] . '/transReq.do';
$response = HttpClient::post($url, $header); $response = HttpClient::post($url, $header);
var_dump($response); echo $response;
// $result = Rsa::decryptByPublicKey($response, $this->getCerFilePath()); echo PHP_EOL;
// $result = base64_decode($result); $result = Rsa::decryptByPublicKey($response, $this->getCerFilePath());
echo $result;
echo PHP_EOL;
$result = base64_decode($result);
return json_encode($result, true); return json_encode($result, true);
} }
} }

Loading…
Cancel
Save