预开通用户ETC指定卡扣费
该接口用于在开通ETC自动扣费前上传一些必要的信息。
| 请求参数 | 类型 | 描述 |
|---|---|---|
| json | object | 声明请求的JSON数据结构 |
| sp_appid | string | 服务商appid |
| sub_appid | string | 子商户appid |
| sub_mchid | string | 特约商户号 |
| openid | string | 用户标识 |
| plan_id | string | ETC授权扣费模板ID |
| etc_device_id | string | ETC设备号 |
| plate_number | string | 车牌号 |
| identify | object | 实名信息 |
| encrypted_real_name | string | 姓名 |
| encrypted_credential_id | string | 证件号码 |
| credential_type | string | 证件类型 |
| bank_card_no | string | 用户开通ETC时绑定的银行卡 |
| headers | object | 声明请求的头参数 |
| Wechatpay-Serial | string | 微信支付公钥ID/平台证书序列号 |
php
$instance->v3->vehicle->etc->preopen->postAsync([
'json' => [
'sp_appid' => '10000098',
'sub_appid' => 'wxcbda96de0b165489',
'sub_mchid' => '1510770601',
'openid' => 'ot35_4gNgXsUuh2sQY0lT9N08AU0',
'plan_id' => '97619',
'etc_device_id' => 'xxxxxxx',
'plate_number' => '藏ZZZZZZ',
'identify' => [
'encrypted_real_name' => 'LOX6jBeRlK/TErW6DqEM8JFHX4iL3Rlj2vqaEqktvw1KVjgmQ==',
'encrypted_credential_id' => 't85SAX3GxVYqGQm2Q8cfeFd1dWy40j4s7XpIds8Glw83HG3vN9Q==',
'credential_type' => 'ID_CARD',
],
'bank_card_no' => 'K/TErW6DqEM8JFHX4iL3Rlj2vqaEqktvw1KVjgmQ==',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/vehicle/etc/preopen')->postAsync([
'json' => [
'sp_appid' => '10000098',
'sub_appid' => 'wxcbda96de0b165489',
'sub_mchid' => '1510770601',
'openid' => 'ot35_4gNgXsUuh2sQY0lT9N08AU0',
'plan_id' => '97619',
'etc_device_id' => 'xxxxxxx',
'plate_number' => '藏ZZZZZZ',
'identify' => [
'encrypted_real_name' => 'LOX6jBeRlK/TErW6DqEM8JFHX4iL3Rlj2vqaEqktvw1KVjgmQ==',
'encrypted_credential_id' => 't85SAX3GxVYqGQm2Q8cfeFd1dWy40j4s7XpIds8Glw83HG3vN9Q==',
'credential_type' => 'ID_CARD',
],
'bank_card_no' => 'K/TErW6DqEM8JFHX4iL3Rlj2vqaEqktvw1KVjgmQ==',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/vehicle/etc/preopen']->postAsync([
'json' => [
'sp_appid' => '10000098',
'sub_appid' => 'wxcbda96de0b165489',
'sub_mchid' => '1510770601',
'openid' => 'ot35_4gNgXsUuh2sQY0lT9N08AU0',
'plan_id' => '97619',
'etc_device_id' => 'xxxxxxx',
'plate_number' => '藏ZZZZZZ',
'identify' => [
'encrypted_real_name' => 'LOX6jBeRlK/TErW6DqEM8JFHX4iL3Rlj2vqaEqktvw1KVjgmQ==',
'encrypted_credential_id' => 't85SAX3GxVYqGQm2Q8cfeFd1dWy40j4s7XpIds8Glw83HG3vN9Q==',
'credential_type' => 'ID_CARD',
],
'bank_card_no' => 'K/TErW6DqEM8JFHX4iL3Rlj2vqaEqktvw1KVjgmQ==',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->vehicle->etc->preopen->post([
'json' => [
'sp_appid' => '10000098',
'sub_appid' => 'wxcbda96de0b165489',
'sub_mchid' => '1510770601',
'openid' => 'ot35_4gNgXsUuh2sQY0lT9N08AU0',
'plan_id' => '97619',
'etc_device_id' => 'xxxxxxx',
'plate_number' => '藏ZZZZZZ',
'identify' => [
'encrypted_real_name' => 'LOX6jBeRlK/TErW6DqEM8JFHX4iL3Rlj2vqaEqktvw1KVjgmQ==',
'encrypted_credential_id' => 't85SAX3GxVYqGQm2Q8cfeFd1dWy40j4s7XpIds8Glw83HG3vN9Q==',
'credential_type' => 'ID_CARD',
],
'bank_card_no' => 'K/TErW6DqEM8JFHX4iL3Rlj2vqaEqktvw1KVjgmQ==',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/vehicle/etc/preopen')->post([
'json' => [
'sp_appid' => '10000098',
'sub_appid' => 'wxcbda96de0b165489',
'sub_mchid' => '1510770601',
'openid' => 'ot35_4gNgXsUuh2sQY0lT9N08AU0',
'plan_id' => '97619',
'etc_device_id' => 'xxxxxxx',
'plate_number' => '藏ZZZZZZ',
'identify' => [
'encrypted_real_name' => 'LOX6jBeRlK/TErW6DqEM8JFHX4iL3Rlj2vqaEqktvw1KVjgmQ==',
'encrypted_credential_id' => 't85SAX3GxVYqGQm2Q8cfeFd1dWy40j4s7XpIds8Glw83HG3vN9Q==',
'credential_type' => 'ID_CARD',
],
'bank_card_no' => 'K/TErW6DqEM8JFHX4iL3Rlj2vqaEqktvw1KVjgmQ==',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/vehicle/etc/preopen']->post([
'json' => [
'sp_appid' => '10000098',
'sub_appid' => 'wxcbda96de0b165489',
'sub_mchid' => '1510770601',
'openid' => 'ot35_4gNgXsUuh2sQY0lT9N08AU0',
'plan_id' => '97619',
'etc_device_id' => 'xxxxxxx',
'plate_number' => '藏ZZZZZZ',
'identify' => [
'encrypted_real_name' => 'LOX6jBeRlK/TErW6DqEM8JFHX4iL3Rlj2vqaEqktvw1KVjgmQ==',
'encrypted_credential_id' => 't85SAX3GxVYqGQm2Q8cfeFd1dWy40j4s7XpIds8Glw83HG3vN9Q==',
'credential_type' => 'ID_CARD',
],
'bank_card_no' => 'K/TErW6DqEM8JFHX4iL3Rlj2vqaEqktvw1KVjgmQ==',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 |
|---|---|---|
| preopen_id | string | 预开通ID |
参阅 官方文档