ljl 1 year ago
parent 17eef6737f
commit 00ecb241e2

@ -458,4 +458,28 @@ class MineCommand extends HyperfCommand
$baofu->notifySuccess();
}
public function transferWithdraw() {
$baofu = new Baofu();
$data = [
'transContent' => [
[
'transNo' => time() . rand(1000, 9999),
'transMoney' => 0.1,
'transType' => 2,
'transAccNo' => '4673f922e30cfd2efeeb992ff6a32ece',
'transAccName' => '廖金灵',
'transSummary' => '测试',
// 'cardBankName' => '',
// 'cardProName' => '',
// 'cardCityName' => '',
// 'cardAccDept' => '',
// 'cardCnap' => '',
// 'transIdCard' => '',
// 'transMobile' => '',
]
]
];
$baofu->transferWithdraw($data);
}
}

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

Loading…
Cancel
Save