用户状态查询
在停车场、高速、加油等场景下,商户需获取用户车主服务状态/需要关联车主服务。本接口,会查询用户是否开通、授权、有欠费或黑名单用户情况,并将对应的用户状态进行返回。
请求参数 | 类型 | 描述 |
---|---|---|
xml | object | 声明请求的XML 数据结构 |
appid | string | 公众账号id |
mch_id | string | 商户号 |
sign_type | string | 签名类型HMAC-SHA256 枚举值 |
trade_scene | string | 交易场景PARKING | PARKING SPACE | GAS | HIGHWAY | BRIDGE 枚举值之一 |
jump_scene | string | 跳转场景 |
openid | string | 用户标识 |
version | string | 版本号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_code | string | 返回状态码SUCCESS | FAIL 枚举值之一 |
return_msg | string | 返回信息 |
appid | string | 请求appid |
mch_id | string | 商户号 |
nonce_str | string | 随机字符串 |
sign | string | 签名 |
result_code | string | 业务结果SUCCESS | FAIL 枚举值之一 |
err_code | string | 错误代码 |
err_code_des | string | 错误代码描述 |
user_state | string | 用户状态NORMAL | PAUSED | OVERDUE | UNAUTHORIZED 枚举值之一 |
openid | string | 用户标识 |
deduct_mode | string | 发起扣费方式PROACTIVE | AUTOPAY 枚举值之一 |
path | string | 跳转路径 |
plate_number_info | string | 车牌信息 |
plate_number_info | object[] | 车牌信息列表 |
plate_number | string | 车牌号 |
channel_type | string | 车牌通道标识 |
common_use_flag | string | 常用车牌标志COMMON_USE 枚举值 |
参阅 官方文档