fix: 识别阿里云 SubCode 通过状态
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -95,8 +95,13 @@ final class AliyunProvider implements ProviderInterface {
|
||||
return ProviderResult::passed(['request_id' => (string) ($response['RequestId'] ?? ''), 'result_code' => 'passed']);
|
||||
}
|
||||
$status = strtoupper((string) ($object['SubCode'] ?? $object['Status'] ?? $object['subCode'] ?? $object['status'] ?? ''));
|
||||
if ((string) ($response['Code'] ?? '') === '200' && $status === '200') {
|
||||
return ProviderResult::passed(['request_id' => (string) ($response['RequestId'] ?? ''), 'result_code' => 'passed']);
|
||||
}
|
||||
$message = $object['MaterialInfo'] ?? $object['Message'] ?? $object['message'] ?? __('阿里云仍在处理认证结果', 'aksrt');
|
||||
if ($passed === 'F') {
|
||||
$debug = $this->response_debug_summary($response, $object, ['passed' => 'F']);
|
||||
$this->log_debug('DescribeFaceVerify not passed', $debug);
|
||||
return ProviderResult::failed($status ?: 'not_passed', sanitize_text_field((string) $message));
|
||||
}
|
||||
if ($object === []) {
|
||||
|
||||
Reference in New Issue
Block a user