火车票代理商接口——确认出票是否成功
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
agent_id | Number | 必须 | 123 | 代理商id | |
dep_date | String | 必须 | 2013-08-08 11:11:11 | 出发时间 | |
fail_msg | String | 必须 | 1 | 记录失败原因,传数字,1、票已售完,出票失败全额退款,2、票价变动,出票失败全额退款,3、乘车人已购买相同车票,出票失败全额退款, 4、出票超时,出票失败全额退款,5、乘车人证件未通过铁路局审核,需到售票窗口办理, 6、发车时间变动,出票失败全额退款,7、车次信息错误,出票失败全额退款,8、12306故障,出票失败全额退款, 0、出票失败全额退款 | |
main_order_id | Number | 必须 | 123456 | 主订单id | |
status | Boolean | 必须 | true | 是否成功 | |
tickets | String [] | 必须 | 192252240672409;10000;1;7排8座;G102;亚里士多德;身份证;1234567891234567;123456;10 |
|
火车票id;单价;坐席;座次号;车次;乘车人姓名;证件类型;证件号码;保单号;保单价格特别注意:票价、保险价格必须到分,例如10元,输入为1000. |
ticket_12306_id | String | 必须 | 123456 | 12306成功出票id | |
ticket_num | Number | 必须 | 1 | 订单中包含的票数量 | |
alipay_trade_no | String | 可选 | 2013092511001001990049119607 | 支付宝交易流水号 | |
can_change | Boolean | 可选 | false |
|
是否支持在线退改签 |
sub_order_id | String | 可选 | 123434 | 错误的子订单号123434,123432 | |
order_type | Number | 可选 | 0 | 订单类型0 代购 1直购 3抢票 | |
alipay_account | String | 可选 | abc@gmail.com | 支付宝账号 | |
arrive_date | String | 可选 | 2013-08-08 11:11:11 | 到达时间 | |
from_station_name | String | 可选 | 北京南 | 出发站 | |
to_station_name | String | 可选 | 徐州东 | 到达站 | |
boarding_gates | String | 可选 | 13 | 检票口 | |
expect_delivery_time | String | 可选 | 2018-06-21 10:00:00 | 送票上门预计派送时间 | |
extend_params | String | 可选 | {"multiCanChange":"true;false"} | 扩展字段 | |
ticket_info_list | OrderTicketInfo [] | 可选 |
|
票信息列表 | |
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
is_success | Boolean | false | 是否成功 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); TrainAgentBookticketConfirmVtwoRequest req = new TrainAgentBookticketConfirmVtwoRequest(); req.setAgentId(123L); req.setDepDate( "2013-08-08 11:11:11" ); req.setFailMsg( "1" ); req.setMainOrderId(123456L); req.setStatus( true ); req.setTickets( "192252240672409;10000;1;7排8座;G102;亚里士多德;身份证;1234567891234567;123456;10" ); req.setTicket12306Id( "123456" ); req.setTicketNum(1L); req.setAlipayTradeNo( "2013092511001001990049119607" ); req.setCanChange( false ); req.setSubOrderId( "123434" ); req.setOrderType(0L); req.setAlipayAccount( "abc@gmail.com" ); req.setArriveDate( "2013-08-08 11:11:11" ); req.setFromStationName( "北京南" ); req.setToStationName( "徐州东" ); req.setBoardingGates( "13" ); req.setExpectDeliveryTime( "2018-06-21 10:00:00" ); req.setExtendParams( "{\"multiCanChange\":\"true;false\"}" ); List<TrainAgentBookticketConfirmVtwoRequest.OrderTicketInfo> list2 = new ArrayList<TrainAgentBookticketConfirmVtwoRequest.OrderTicketInfo>(); TrainAgentBookticketConfirmVtwoRequest.OrderTicketInfo obj3 = new TrainAgentBookticketConfirmVtwoRequest.OrderTicketInfo(); list2.add(obj3); obj3.setTtpSubOrderId(123L); obj3.setRealTicketPrice(100L); obj3.setRealSeat(1L); obj3.setSeatNum( "0_13_89" ); obj3.setTrainNo( "K124" ); obj3.setPassengerName( "张三" ); obj3.setCertType( "1" ); obj3.setCertificateNum( "123456" ); obj3.setInsurancePayPrice(100L); obj3.setVipCustomResult(1L); obj3.setTicketNo( "E1234" ); List<TrainAgentBookticketConfirmVtwoRequest.VipCustomTicketConfirmItem> list6 = new ArrayList<TrainAgentBookticketConfirmVtwoRequest.VipCustomTicketConfirmItem>(); TrainAgentBookticketConfirmVtwoRequest.VipCustomTicketConfirmItem obj7 = new TrainAgentBookticketConfirmVtwoRequest.VipCustomTicketConfirmItem(); list6.add(obj7); obj7.setCustomType( "\"carriage\"" ); list4.setVipCustomResultList(list6); req.setTicketInfoList(list2); TrainAgentBookticketConfirmVtwoResponse rsp = client.execute(req, sessionKey); System.out.println(rsp.getBody()); |
1 2 3 | < train_agent_bookticket_confirm_vtwo_response > < is_success >false</ is_success > </ train_agent_bookticket_confirm_vtwo_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|---|---|
isv.service-error | 系统未知错误 | 请重试 |
isv.invalid-parameter:orderid | 主订单id不存在 | 请查找原因,输入正确订单号 |
isv.invalid-check-parameter:params | 出票成功时,校验参数失败,请检查参数重试 | 检查参数重新上传 |
isv.trade-had-closed | 订单关闭 | 不用重新调用 |
isv.invalid-parameter:orderId is exists | 已调用过出票确认订单 | 不需要重试,如果还没显示出票成功,请联系技术人员 |
isv.SYSTEM_ERROR | 系统异常 | 重试 |
isv.invalid-check-parameter | 参数校验出错 | 请检查入参 |
isv.user-cancel-order | 用户关单 | 关单处理 |
isv.vip-custom-fail | 定制票出票结果不符合要求 | 核实定制信息重新回填出票信息 |