用户入场通知
在停车场场景下,如用户已加入车主平台,则进行入场通知;如用户已经欠费,会发送用户欠费入场通知。本接口,会查询用户是否有欠费或黑名单用户情况,并将对应的用户状态进行返回。
| 请求参数 | 类型 | 描述 |
|---|---|---|
| xml | object | 声明请求的XML数据结构 |
| appid | string | 公众账号id |
| mch_id | string | 商户号 |
| sub_appid | string | 子商户公众账号id |
| sub_mch_id | string | 子商户号 |
| sign_type | string | 签名类型HMAC-SHA256 枚举值 |
| version | string | 版本号3.0 枚举值 |
| trade_scene | string | 交易场景PARKING | PARKING SPACE 枚举值之一 |
| scene_info | string | 场景信息JSON格式字符串 |
| scene_info | object | 场景PARKING信息 |
| start_time | string | 入场时间 |
| notify_url | string | 回调通知URL |
| plate_number | string | 车牌号 |
| car_type | string | 车辆类型 |
| parking_name | string | 停车场名称 |
| free_time | string | 免费时长 |
| scene_info | object | 场景PARKING SPACE信息 |
| start_time | string | 入场时间 |
| car_type | string | 车辆类型 |
| parking_name | string | 停车场名称 |
| free_time | string | 免费时长 |
| openid | string | 用户标识 |
| sub_openid | string | 用户子标识 |
| space_number | string | 车位编号 |
php
$instance->v2->vehicle->partnerpay->notification->postAsync([
'xml' => [
'appid' => 'wxcbda96de0b165486',
'mch_id' => '10000098',
'sub_appid' => 'wxcbda96de0b165489',
'sub_mch_id' => '1900000109',
'sign_type' => 'HMAC-SHA256',
'version' => '3.0',
'trade_scene' => 'PARKING',
'scene_info' => \json_encode([
'scene_info' => [
'start_time' => '20170826104339',
'notify_url' => 'https://weixin.qq.com',
'plate_number' => '粤B888888',
'car_type' => '小型车',
'parking_name' => '欢乐海岸停车场',
'free_time' => '1200',
],
]),
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();php
$instance->chain('v2/vehicle/partnerpay/notification')->postAsync([
'xml' => [
'appid' => 'wxcbda96de0b165486',
'mch_id' => '10000098',
'sub_appid' => 'wxcbda96de0b165489',
'sub_mch_id' => '1900000109',
'sign_type' => 'HMAC-SHA256',
'version' => '3.0',
'trade_scene' => 'PARKING',
'scene_info' => \json_encode([
'scene_info' => [
'start_time' => '20170826104339',
'notify_url' => 'https://weixin.qq.com',
'plate_number' => '粤B888888',
'car_type' => '小型车',
'parking_name' => '欢乐海岸停车场',
'free_time' => '1200',
],
]),
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();php
$instance['v2/vehicle/partnerpay/notification']->postAsync([
'xml' => [
'appid' => 'wxcbda96de0b165486',
'mch_id' => '10000098',
'sub_appid' => 'wxcbda96de0b165489',
'sub_mch_id' => '1900000109',
'sign_type' => 'HMAC-SHA256',
'version' => '3.0',
'trade_scene' => 'PARKING',
'scene_info' => \json_encode([
'scene_info' => [
'start_time' => '20170826104339',
'notify_url' => 'https://weixin.qq.com',
'plate_number' => '粤B888888',
'car_type' => '小型车',
'parking_name' => '欢乐海岸停车场',
'free_time' => '1200',
],
]),
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();php
$response = $instance->v2->vehicle->partnerpay->notification->post([
'xml' => [
'appid' => 'wxcbda96de0b165486',
'mch_id' => '10000098',
'sub_appid' => 'wxcbda96de0b165489',
'sub_mch_id' => '1900000109',
'sign_type' => 'HMAC-SHA256',
'version' => '3.0',
'trade_scene' => 'PARKING',
'scene_info' => \json_encode([
'scene_info' => [
'start_time' => '20170826104339',
'notify_url' => 'https://weixin.qq.com',
'plate_number' => '粤B888888',
'car_type' => '小型车',
'parking_name' => '欢乐海岸停车场',
'free_time' => '1200',
],
]),
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));php
$response = $instance->chain('v2/vehicle/partnerpay/notification')->post([
'xml' => [
'appid' => 'wxcbda96de0b165486',
'mch_id' => '10000098',
'sub_appid' => 'wxcbda96de0b165489',
'sub_mch_id' => '1900000109',
'sign_type' => 'HMAC-SHA256',
'version' => '3.0',
'trade_scene' => 'PARKING',
'scene_info' => \json_encode([
'scene_info' => [
'start_time' => '20170826104339',
'notify_url' => 'https://weixin.qq.com',
'plate_number' => '粤B888888',
'car_type' => '小型车',
'parking_name' => '欢乐海岸停车场',
'free_time' => '1200',
],
]),
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));php
$response = $instance['v2/vehicle/partnerpay/notification']->post([
'xml' => [
'appid' => 'wxcbda96de0b165486',
'mch_id' => '10000098',
'sub_appid' => 'wxcbda96de0b165489',
'sub_mch_id' => '1900000109',
'sign_type' => 'HMAC-SHA256',
'version' => '3.0',
'trade_scene' => 'PARKING',
'scene_info' => \json_encode([
'scene_info' => [
'start_time' => '20170826104339',
'notify_url' => 'https://weixin.qq.com',
'plate_number' => '粤B888888',
'car_type' => '小型车',
'parking_name' => '欢乐海岸停车场',
'free_time' => '1200',
],
]),
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));| 返回字典 | 类型 | 描述 |
|---|---|---|
| return_code | string | 返回状态码SUCCESS | FAIL 枚举值之一 |
| return_msg | string | 返回信息 |
| appid | string | 公众账号id |
| mch_id | string | 商户号 |
| sub_appid | string | 子商户公众账号id |
| sub_mch_id | string | 子商户号 |
| nonce_str | string | 随机字符串 |
| sign | string | 签名 |
| result_code | string | 业务结果SUCCESS | FAIL 枚举值之一 |
| err_code | string | 错误代码 |
| err_code_des | string | 错误代码描述 |
| user_state | string | 用户状态NORMAL | BLOCK 枚举值之一 |
| deduct_mode | string | 发起扣费方式PROACTIVE | AUTOPAY 枚举值之一 |
参阅 官方文档