Skip to content

身份信息校验

该接口用于商户上传用户身份信息,微信支付会重新校验返回订购人和支付人身份信息校验结果,用于商户纠正报关订单里的信息。

请求参数类型描述
base_uristring声明接入点https://apihk.mch.weixin.qq.com/(香港接入)
jsonobject声明请求的JSON数据结构
appidstring机构APPID
mchidstring商户号
out_trade_nostring商户订单号
transaction_idstring微信订单号
sub_order_nostring商户子订单号
customsstring海关
merchant_customs_nostring商户海关备案号
certificate_typestring证件类型
certificate_idstring证件号
certificate_namestring证件姓名
headersobject声明请求的头参数
Wechatpay-Serialstring平台公钥ID/平台公钥证书序列号
php
$instance->v3->global->customs->verifyCertificate->postAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'json' => [
    'appid'               => 'wxd678efh567hg6787',
    'mchid'               => '1230000109',
    'out_trade_no'        => '20150806125346',
    'transaction_id'      => '1000320306201511078440737890',
    'sub_order_no'        => '20150806125346',
    'customs'             => 'SHANGHAI_ZS',
    'merchant_customs_no' => '123456',
    'certificate_type'    => 'IDCARD',
    'certificate_id'      => 'Rsa::encrypt(0101211X, WechatpayPlatformCertificateInstance, OPENSSL_PKCS1_PADDING)',
    'certificate_name'    => 'Rsa::encrypt(张三, WechatpayPlatformCertificateInstance, OPENSSL_PKCS1_PADDING)',
  ],
  '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/global/customs/verify-certificate')->postAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'json' => [
    'appid'               => 'wxd678efh567hg6787',
    'mchid'               => '1230000109',
    'out_trade_no'        => '20150806125346',
    'transaction_id'      => '1000320306201511078440737890',
    'sub_order_no'        => '20150806125346',
    'customs'             => 'SHANGHAI_ZS',
    'merchant_customs_no' => '123456',
    'certificate_type'    => 'IDCARD',
    'certificate_id'      => 'Rsa::encrypt(0101211X, WechatpayPlatformCertificateInstance, OPENSSL_PKCS1_PADDING)',
    'certificate_name'    => 'Rsa::encrypt(张三, WechatpayPlatformCertificateInstance, OPENSSL_PKCS1_PADDING)',
  ],
  '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/global/customs/verify-certificate']->postAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'json' => [
    'appid'               => 'wxd678efh567hg6787',
    'mchid'               => '1230000109',
    'out_trade_no'        => '20150806125346',
    'transaction_id'      => '1000320306201511078440737890',
    'sub_order_no'        => '20150806125346',
    'customs'             => 'SHANGHAI_ZS',
    'merchant_customs_no' => '123456',
    'certificate_type'    => 'IDCARD',
    'certificate_id'      => 'Rsa::encrypt(0101211X, WechatpayPlatformCertificateInstance, OPENSSL_PKCS1_PADDING)',
    'certificate_name'    => 'Rsa::encrypt(张三, WechatpayPlatformCertificateInstance, OPENSSL_PKCS1_PADDING)',
  ],
  '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->global->customs->verifyCertificate->post([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'json' => [
    'appid'               => 'wxd678efh567hg6787',
    'mchid'               => '1230000109',
    'out_trade_no'        => '20150806125346',
    'transaction_id'      => '1000320306201511078440737890',
    'sub_order_no'        => '20150806125346',
    'customs'             => 'SHANGHAI_ZS',
    'merchant_customs_no' => '123456',
    'certificate_type'    => 'IDCARD',
    'certificate_id'      => 'Rsa::encrypt(0101211X, WechatpayPlatformCertificateInstance, OPENSSL_PKCS1_PADDING)',
    'certificate_name'    => 'Rsa::encrypt(张三, WechatpayPlatformCertificateInstance, OPENSSL_PKCS1_PADDING)',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/global/customs/verify-certificate')->post([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'json' => [
    'appid'               => 'wxd678efh567hg6787',
    'mchid'               => '1230000109',
    'out_trade_no'        => '20150806125346',
    'transaction_id'      => '1000320306201511078440737890',
    'sub_order_no'        => '20150806125346',
    'customs'             => 'SHANGHAI_ZS',
    'merchant_customs_no' => '123456',
    'certificate_type'    => 'IDCARD',
    'certificate_id'      => 'Rsa::encrypt(0101211X, WechatpayPlatformCertificateInstance, OPENSSL_PKCS1_PADDING)',
    'certificate_name'    => 'Rsa::encrypt(张三, WechatpayPlatformCertificateInstance, OPENSSL_PKCS1_PADDING)',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/global/customs/verify-certificate']->post([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'json' => [
    'appid'               => 'wxd678efh567hg6787',
    'mchid'               => '1230000109',
    'out_trade_no'        => '20150806125346',
    'transaction_id'      => '1000320306201511078440737890',
    'sub_order_no'        => '20150806125346',
    'customs'             => 'SHANGHAI_ZS',
    'merchant_customs_no' => '123456',
    'certificate_type'    => 'IDCARD',
    'certificate_id'      => 'Rsa::encrypt(0101211X, WechatpayPlatformCertificateInstance, OPENSSL_PKCS1_PADDING)',
    'certificate_name'    => 'Rsa::encrypt(张三, WechatpayPlatformCertificateInstance, OPENSSL_PKCS1_PADDING)',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
appidstring机构APPID
mchidstring商户号
out_trade_nostring商户订单号
transaction_idstring微信订单号
certificate_check_resultstring身份核验结果

参阅 官方文档

Published on the GitHub by TheNorthMemory