Skip to content

用户入场通知

在停车场场景下,如用户已加入车主平台,则进行入场通知;如用户已经欠费,会发送用户欠费入场通知。本接口,会查询用户是否有欠费或黑名单用户情况,并将对应的用户状态进行返回。

请求参数类型描述
xmlobject声明请求的XML数据结构
appidstring公众账号id
mch_idstring商户号
sub_appidstring子商户公众账号id
sub_mch_idstring子商户号
sign_typestring签名类型
versionstring版本号
trade_scenestring交易场景
scene_infostring场景信息
start_timestring入场时间
plate_numberstring车牌号
notify_urlstring回调通知URL
car_typestring车辆类型
parking_namestring停车场名称
free_timestring免费时长
openidstring用户标识
sub_openidstring用户子标识
space_numberstring车位编号
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' => '{"scene_info":{"start_time":"20170926114339","plate_number":"CB1000sdfasd","free_time":"1200","car_type":"大型车","parking_name":"欢乐海岸停车场"}}',
    'start_time' => '20170826104339',
    'plate_number' => '粤B888888',
    'notify_url' => 'https://weixin.qq.com',
    'car_type' => '小型车',
    'parking_name' => '欢乐海岸停车场',
    'free_time' => '1200',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'sub_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'space_number' => 'D6666',
  ],
])
->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' => '{"scene_info":{"start_time":"20170926114339","plate_number":"CB1000sdfasd","free_time":"1200","car_type":"大型车","parking_name":"欢乐海岸停车场"}}',
    'start_time' => '20170826104339',
    'plate_number' => '粤B888888',
    'notify_url' => 'https://weixin.qq.com',
    'car_type' => '小型车',
    'parking_name' => '欢乐海岸停车场',
    'free_time' => '1200',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'sub_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'space_number' => 'D6666',
  ],
])
->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' => '{"scene_info":{"start_time":"20170926114339","plate_number":"CB1000sdfasd","free_time":"1200","car_type":"大型车","parking_name":"欢乐海岸停车场"}}',
    'start_time' => '20170826104339',
    'plate_number' => '粤B888888',
    'notify_url' => 'https://weixin.qq.com',
    'car_type' => '小型车',
    'parking_name' => '欢乐海岸停车场',
    'free_time' => '1200',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'sub_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'space_number' => 'D6666',
  ],
])
->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' => '{"scene_info":{"start_time":"20170926114339","plate_number":"CB1000sdfasd","free_time":"1200","car_type":"大型车","parking_name":"欢乐海岸停车场"}}',
    'start_time' => '20170826104339',
    'plate_number' => '粤B888888',
    'notify_url' => 'https://weixin.qq.com',
    'car_type' => '小型车',
    'parking_name' => '欢乐海岸停车场',
    'free_time' => '1200',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'sub_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'space_number' => 'D6666',
  ],
]);
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' => '{"scene_info":{"start_time":"20170926114339","plate_number":"CB1000sdfasd","free_time":"1200","car_type":"大型车","parking_name":"欢乐海岸停车场"}}',
    'start_time' => '20170826104339',
    'plate_number' => '粤B888888',
    'notify_url' => 'https://weixin.qq.com',
    'car_type' => '小型车',
    'parking_name' => '欢乐海岸停车场',
    'free_time' => '1200',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'sub_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'space_number' => 'D6666',
  ],
]);
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' => '{"scene_info":{"start_time":"20170926114339","plate_number":"CB1000sdfasd","free_time":"1200","car_type":"大型车","parking_name":"欢乐海岸停车场"}}',
    'start_time' => '20170826104339',
    'plate_number' => '粤B888888',
    'notify_url' => 'https://weixin.qq.com',
    'car_type' => '小型车',
    'parking_name' => '欢乐海岸停车场',
    'free_time' => '1200',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'sub_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'space_number' => 'D6666',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典类型描述
return_codestring返回状态码
return_msgstring返回信息
appidstring公众账号id
mch_idstring商户号
sub_appidstring子商户公众账号id
sub_mch_idstring子商户号
nonce_strstring随机字符串
signstring签名
result_codestring业务结果
err_codestring错误代码
err_code_desstring错误代码描述
user_statestring用户状态
deduct_modestring发起扣费方式

参阅 官方文档

Published on the GitHub by TheNorthMemory