Skip to content

用户状态查询

在停车场、高速、加油等场景下,商户需获取用户车主服务状态/需要关联车主服务。本接口,会查询用户是否开通、授权、有欠费或黑名单用户情况,并将对应的用户状态进行返回。

请求参数类型描述
xmlobject声明请求的XML数据结构
appidstring公众账号id
sub_appidstring子商户公众账号id
mch_idstring商户号
sub_mch_idstring子商户号
sign_typestring签名类型
trade_scenestring交易场景
jump_scenestring跳转场景
openidstring用户标识
versionstring版本号
php
$instance->v2->vehicle->partnerpay->querystate->postAsync([
  'xml' => [
    'appid' => 'wxcbda96de0b165486',
    'sub_appid' => 'wxcbda96de0b165489',
    'mch_id' => '10000098',
    'sub_mch_id' => '1900000109',
    'sign_type' => 'HMAC-SHA256',
    'trade_scene' => 'PARKING',
    'jump_scene' => 'H5',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'version' => '3.0',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/vehicle/partnerpay/querystate')->postAsync([
  'xml' => [
    'appid' => 'wxcbda96de0b165486',
    'sub_appid' => 'wxcbda96de0b165489',
    'mch_id' => '10000098',
    'sub_mch_id' => '1900000109',
    'sign_type' => 'HMAC-SHA256',
    'trade_scene' => 'PARKING',
    'jump_scene' => 'H5',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'version' => '3.0',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/vehicle/partnerpay/querystate']->postAsync([
  'xml' => [
    'appid' => 'wxcbda96de0b165486',
    'sub_appid' => 'wxcbda96de0b165489',
    'mch_id' => '10000098',
    'sub_mch_id' => '1900000109',
    'sign_type' => 'HMAC-SHA256',
    'trade_scene' => 'PARKING',
    'jump_scene' => 'H5',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'version' => '3.0',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->vehicle->partnerpay->querystate->post([
  'xml' => [
    'appid' => 'wxcbda96de0b165486',
    'sub_appid' => 'wxcbda96de0b165489',
    'mch_id' => '10000098',
    'sub_mch_id' => '1900000109',
    'sign_type' => 'HMAC-SHA256',
    'trade_scene' => 'PARKING',
    'jump_scene' => 'H5',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'version' => '3.0',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/vehicle/partnerpay/querystate')->post([
  'xml' => [
    'appid' => 'wxcbda96de0b165486',
    'sub_appid' => 'wxcbda96de0b165489',
    'mch_id' => '10000098',
    'sub_mch_id' => '1900000109',
    'sign_type' => 'HMAC-SHA256',
    'trade_scene' => 'PARKING',
    'jump_scene' => 'H5',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'version' => '3.0',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/vehicle/partnerpay/querystate']->post([
  'xml' => [
    'appid' => 'wxcbda96de0b165486',
    'sub_appid' => 'wxcbda96de0b165489',
    'mch_id' => '10000098',
    'sub_mch_id' => '1900000109',
    'sign_type' => 'HMAC-SHA256',
    'trade_scene' => 'PARKING',
    'jump_scene' => 'H5',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'version' => '3.0',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典类型描述
return_codestring返回状态码
return_msgstring返回信息
appidstring请求appid
sub_appidstring子商户公众账号id
mch_idstring商户号
sub_mch_idstring子商户号
nonce_strstring随机字符串
signstring签名
result_codestring业务结果
err_codestring错误代码
err_code_desstring错误代码描述
user_statestring用户状态
openidstring用户标识
deduct_modestring发起扣费方式
sub_openidstring用户子标识
pathstring跳转路径
plate_number_infostring车牌信息
plate_numberstring车牌号
channel_typestring车牌通道标识
common_use_flagstring常用车牌标志

参阅 官方文档

Published on the GitHub by TheNorthMemory