fix: 明确阿里云缺少核身链接错误
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -178,17 +178,28 @@ final class AliyunProvider implements ProviderInterface {
|
||||
['Data', 'Url'],
|
||||
['Data', 'url'],
|
||||
]));
|
||||
if ($certify_id === '' || $url === '') {
|
||||
if ($certify_id === '') {
|
||||
$debug = $this->response_debug_summary($response, $object, [
|
||||
'has_certify_id' => $certify_id !== '',
|
||||
'has_certify_id' => false,
|
||||
'has_certify_url' => $url !== '',
|
||||
]);
|
||||
$this->log_debug('InitFaceVerify invalid response', $debug);
|
||||
$this->log_debug('InitFaceVerify missing CertifyId', $debug);
|
||||
return ProviderResult::failed('aliyun_invalid_response', sprintf(
|
||||
__('阿里云未返回有效认证会话:%s', 'aksrt'),
|
||||
$debug
|
||||
));
|
||||
}
|
||||
if ($url === '') {
|
||||
$debug = $this->response_debug_summary($response, $object, [
|
||||
'has_certify_id' => true,
|
||||
'has_certify_url' => false,
|
||||
]);
|
||||
$this->log_debug('InitFaceVerify returned CertifyId without URL', $debug);
|
||||
return ProviderResult::failed('aliyun_missing_certify_url', sprintf(
|
||||
__('阿里云只返回了 CertifyId,未返回可打开的核身链接。请确认 SceneId/ProductCode 对应的是支持 H5 链接的实人认证方案;调试信息:%s', 'aksrt'),
|
||||
$debug
|
||||
));
|
||||
}
|
||||
return ProviderResult::pending([
|
||||
'provider_session_id' => $certify_id,
|
||||
'request_id' => sanitize_text_field((string) ($response['RequestId'] ?? '')),
|
||||
|
||||
Reference in New Issue
Block a user