修正医生分享二维码

This commit is contained in:
2023-10-24 14:09:34 +08:00
parent 25ce316ce9
commit 674c3af243
4 changed files with 160 additions and 226 deletions
+32 -1
View File
@@ -69,7 +69,7 @@ class CaOnline extends Ca
* @param string $type
* @return mixed
*/
public function removeCloudCert(array $data, string $type = "Personal"): mixed
public function removeCloudCert(array $data): mixed
{
$option = [
'form_params' => [
@@ -93,4 +93,35 @@ class CaOnline extends Ca
throw new BusinessException($e->getMessage());
}
}
/**
* 更新云证书
* @param array $data
* @param string $type
* @return mixed
*/
public function renewCloudCert(array $data): mixed
{
$option = [
'form_params' => [
'entityId' => $data['user_id'], // 用户唯一标识,由业务系统定义
'pin' => $data['user_id'], // 证书PIN码
'authType' => "实人认证", // 委托鉴证方式[实人认证、线下认证、其它方式认证]
'authTime' => time(), // 委托鉴证时间(鉴证完成的时间戳)单位:秒
'authResult' => "认证通过", // 委托鉴证结果[认证通过]
'authNoticeType' => "数字证书更新告知", // 委托鉴证告知类型[数字证书申请告知]
]
];
try {
$response = $this->httpRequest($this->api_url . '/cloud-certificate-service' . '/api/cloudCert/open/v2/cert/certRenew', $option);
if (empty($response)) {
// 返回值为空
throw new BusinessException(HttpEnumCode::getMessage(HttpEnumCode::SERVER_ERROR));
}
return $response;
} catch (GuzzleException $e) {
throw new BusinessException($e->getMessage());
}
}
}