|
|
@ -476,8 +476,8 @@ class Baofu
|
|
|
|
|
|
|
|
|
|
|
|
public function transferWithdraw($params) {
|
|
|
|
public function transferWithdraw($params) {
|
|
|
|
$header = [];
|
|
|
|
$header = [];
|
|
|
|
$header['memberId'] = $params['memberId'];
|
|
|
|
$header['memberId'] = $this->getMerchantNo();
|
|
|
|
$header['terminalId'] = $params['82254'];
|
|
|
|
$header['terminalId'] = $this->getMerchantNo();
|
|
|
|
$header['serviceTp'] = 'T-1001-003-01';
|
|
|
|
$header['serviceTp'] = 'T-1001-003-01';
|
|
|
|
$header['verifyType'] = 1;
|
|
|
|
$header['verifyType'] = 1;
|
|
|
|
|
|
|
|
|
|
|
@ -513,8 +513,9 @@ class Baofu
|
|
|
|
$contentSign = SignatureUtil::sign(base64_encode(json_encode($content)), $this->getPfxFilePath(), $this->getPrivateKeyPassword());
|
|
|
|
$contentSign = SignatureUtil::sign(base64_encode(json_encode($content)), $this->getPfxFilePath(), $this->getPrivateKeyPassword());
|
|
|
|
$header['content'] = $contentSign;
|
|
|
|
$header['content'] = $contentSign;
|
|
|
|
|
|
|
|
|
|
|
|
$url = 'https://vgw.baofoo.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;)
|
|
|
|
$result = Rsa::decryptByPublicKey($response, $this->getCerFilePath());
|
|
|
|
$result = Rsa::decryptByPublicKey($response, $this->getCerFilePath());
|
|
|
|
$result = base64_decode($result);
|
|
|
|
$result = base64_decode($result);
|
|
|
|
return json_encode($result, true);
|
|
|
|
return json_encode($result, true);
|
|
|
|