校验核身结果
校验按商户拉起核身时预下单的token值对应的微工卡核身结果是否成功
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
sp_mchid | string | 服务商商户号 |
sub_mchid | string | 特约商户商户号 |
token | string | token值 |
user_name | string | 用户姓名 |
id_card_number | string | 用户身份证号 |
authenticate_type | string | 核身类型NORMAL | SIGN_IN | INSURANCE | CONTRACT 枚举值之一 |
headers | object | 声明请求的头参数 |
Wechatpay-Serial | string | 平台公钥ID/平台公钥证书序列号 |
php
$instance->v3->payrollCard->wesure->tokenValidations->postAsync([
'json' => [
'sp_mchid' => '1900000109',
'sub_mchid' => '1900000109',
'token' => 'abcdefghijklmn',
'user_name' => 'LP7bT4hQXUsOZCEvK2YrSiqFsnP0oRMfeoLN0vBg',
'id_card_number' => '7FzH5XksJG3a8HLLsaaUV6K54y1OnPMY5',
'authenticate_type' => 'NORMAL',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/payroll-card/wesure/token-validations')->postAsync([
'json' => [
'sp_mchid' => '1900000109',
'sub_mchid' => '1900000109',
'token' => 'abcdefghijklmn',
'user_name' => 'LP7bT4hQXUsOZCEvK2YrSiqFsnP0oRMfeoLN0vBg',
'id_card_number' => '7FzH5XksJG3a8HLLsaaUV6K54y1OnPMY5',
'authenticate_type' => 'NORMAL',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/payroll-card/wesure/token-validations']->postAsync([
'json' => [
'sp_mchid' => '1900000109',
'sub_mchid' => '1900000109',
'token' => 'abcdefghijklmn',
'user_name' => 'LP7bT4hQXUsOZCEvK2YrSiqFsnP0oRMfeoLN0vBg',
'id_card_number' => '7FzH5XksJG3a8HLLsaaUV6K54y1OnPMY5',
'authenticate_type' => 'NORMAL',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->payrollCard->wesure->tokenValidations->post([
'json' => [
'sp_mchid' => '1900000109',
'sub_mchid' => '1900000109',
'token' => 'abcdefghijklmn',
'user_name' => 'LP7bT4hQXUsOZCEvK2YrSiqFsnP0oRMfeoLN0vBg',
'id_card_number' => '7FzH5XksJG3a8HLLsaaUV6K54y1OnPMY5',
'authenticate_type' => 'NORMAL',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/payroll-card/wesure/token-validations')->post([
'json' => [
'sp_mchid' => '1900000109',
'sub_mchid' => '1900000109',
'token' => 'abcdefghijklmn',
'user_name' => 'LP7bT4hQXUsOZCEvK2YrSiqFsnP0oRMfeoLN0vBg',
'id_card_number' => '7FzH5XksJG3a8HLLsaaUV6K54y1OnPMY5',
'authenticate_type' => 'NORMAL',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/payroll-card/wesure/token-validations']->post([
'json' => [
'sp_mchid' => '1900000109',
'sub_mchid' => '1900000109',
'token' => 'abcdefghijklmn',
'user_name' => 'LP7bT4hQXUsOZCEvK2YrSiqFsnP0oRMfeoLN0vBg',
'id_card_number' => '7FzH5XksJG3a8HLLsaaUV6K54y1OnPMY5',
'authenticate_type' => 'NORMAL',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
result | string | 校验结果 |
authenticate_success_time | string | 核身成功时间 |
openid | string | 用户标识 |
fail_reason | string | 校验不通过原因 |
参阅 官方文档