ljl 1 year ago
parent 9b1455ced7
commit 8cea033e0a

@ -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);
}
}

Loading…
Cancel
Save