Skip to content

用户状态查询

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

请求参数类型描述
xmlobject声明请求的XML数据结构
appidstring公众账号id
mch_idstring商户号
sign_typestring签名类型
HMAC-SHA256 枚举值
trade_scenestring交易场景
PARKING | PARKING SPACE | GAS | HIGHWAY | BRIDGE 枚举值之一
jump_scenestring跳转场景
openidstring用户标识
versionstring版本号
3.0 枚举值
php
$instance->v2->vehicle->pay->querystate->postAsync([
  'xml' => [
    'appid'        => 'wxcbda96de0b165486',
    'mch_id'       => '10000098',
    '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/pay/querystate')->postAsync([
  'xml' => [
    'appid'        => 'wxcbda96de0b165486',
    'mch_id'       => '10000098',
    '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/pay/querystate']->postAsync([
  'xml' => [
    'appid'        => 'wxcbda96de0b165486',
    'mch_id'       => '10000098',
    '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->pay->querystate->post([
  'xml' => [
    'appid'        => 'wxcbda96de0b165486',
    'mch_id'       => '10000098',
    '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/pay/querystate')->post([
  'xml' => [
    'appid'        => 'wxcbda96de0b165486',
    'mch_id'       => '10000098',
    '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/pay/querystate']->post([
  'xml' => [
    'appid'        => 'wxcbda96de0b165486',
    'mch_id'       => '10000098',
    '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返回状态码
SUCCESS | FAIL 枚举值之一
return_msgstring返回信息
appidstring请求appid
mch_idstring商户号
nonce_strstring随机字符串
signstring签名
result_codestring业务结果
SUCCESS | FAIL 枚举值之一
err_codestring错误代码
err_code_desstring错误代码描述
user_statestring用户状态
NORMAL | PAUSED | OVERDUE | UNAUTHORIZED 枚举值之一
openidstring用户标识
deduct_modestring发起扣费方式
PROACTIVE | AUTOPAY 枚举值之一
pathstring跳转路径
plate_number_infostring车牌信息
plate_number_infoobject[]车牌信息列表
plate_numberstring车牌号
channel_typestring车牌通道标识
common_use_flagstring常用车牌标志
COMMON_USE 枚举值

参阅 官方文档

Published on the GitHub by TheNorthMemory