TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TrainAgentOrderConfirmRequest req = new TrainAgentOrderConfirmRequest();
TrainAgentOrderConfirmRequest.BookTicketConfirmRQ obj1 = new TrainAgentOrderConfirmRequest.BookTicketConfirmRQ();
List<TrainAgentOrderConfirmRequest.TicketDTO> list3 = new ArrayList<TrainAgentOrderConfirmRequest.TicketDTO>();
TrainAgentOrderConfirmRequest.TicketDTO obj4 = new TrainAgentOrderConfirmRequest.TicketDTO();
list3.add(obj4);
obj4.setTtpOrderId(1234L);
obj4.setSubOrderId(12345L);
obj4.setSequenceNo("E12434343");
obj4.setSeatNo("05");
obj4.setCoachNo("04");
obj4.setBatchNo("1");
obj4.setTicketTypeCode("1");
obj4.setTtpSubOrderId(43535354L);
obj4.setRealSeatTypeCode("1");
obj4.setRealTicketPrice(12100L);
obj1.setTickets(list3);
obj1.setTtpOrderId(1234L);
obj1.setVipSettlementModeCode(0L);
obj1.setAliPayTradeNo("453534534");
obj1.setAliPayAccount("545353@qq.com");
obj1.setCanChange(false);
obj1.setFlatMsg("04检票口");
req.setParam(obj1);
TrainAgentOrderConfirmResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TrainAgentOrderConfirmRequest req = new TrainAgentOrderConfirmRequest();
TrainAgentOrderConfirmRequest.BookTicketConfirmRQDomain obj1 = new TrainAgentOrderConfirmRequest.BookTicketConfirmRQDomain();
List<TrainAgentOrderConfirmRequest.TicketDTODomain> list3 = new List<TrainAgentOrderConfirmRequest.TicketDTODomain>();
TrainAgentOrderConfirmRequest.TicketDTODomain obj4 = new TrainAgentOrderConfirmRequest.TicketDTODomain();
list3.Add(obj4);
obj4.TtpOrderId = 1234L;
obj4.SubOrderId = 12345L;
obj4.SequenceNo = "E12434343";
obj4.SeatNo = "05";
obj4.CoachNo = "04";
obj4.BatchNo = "1";
obj4.TicketTypeCode = "1";
obj4.TtpSubOrderId = 43535354L;
obj4.RealSeatTypeCode = "1";
obj4.RealTicketPrice = 12100L;
obj1.Tickets= list3;
obj1.TtpOrderId = 1234L;
obj1.VipSettlementModeCode = 0L;
obj1.AliPayTradeNo = "453534534";
obj1.AliPayAccount = "545353@qq.com";
obj1.CanChange = false;
obj1.FlatMsg = "04检票口";
req.Param_ = obj1;
TrainAgentOrderConfirmResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TrainAgentOrderConfirmRequest;
$param = new BookTicketConfirmRQ;
$tickets = new TicketDTO;
$tickets->ttp_order_id="1234";
$tickets->sub_order_id="12345";
$tickets->sequence_no="E12434343";
$tickets->seat_no="05";
$tickets->coach_no="04";
$tickets->batch_no="1";
$tickets->ticket_type_code="1";
$tickets->ttp_sub_order_id="43535354";
$tickets->real_seat_type_code="1";
$tickets->real_ticket_price="12100";
$param->tickets = $tickets;
$param->ttp_order_id="1234";
$param->vip_settlement_mode_code="0";
$param->ali_pay_trade_no="453534534";
$param->ali_pay_account="545353@qq.com";
$param->can_change="false";
$param->flat_msg="04检票口";
$req->setParam(json_encode($param));
$resp = $c->execute($req, $sessionKey);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=taobao.train.agent.order.confirm' \
-d 'partner_id=apidoc' \
-d 'session=4dcc58f4-c2ff-4413-a9ef-0beed1968781' \
-d 'sign=DF6E3EB32D7EAEB820D4FC44E299E5E1' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+16%3A54%3A02' \
-d 'v=2.0' \
-d 'param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TrainAgentOrderConfirmRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param="数据结构示例JSON格式"
try:
resp= req.getResponse(sessionkey)
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"taobao.train.agent.order.confirm");
add_param(pRequest,"param","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,sessionKey);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('taobao.train.agent.order.confirm', {
'param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})