TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripIeBuyerOrderBookpayRequest req = new AlitripIeBuyerOrderBookpayRequest();
AlitripIeBuyerOrderBookpayRequest.BookPayOrderRq obj1 = new AlitripIeBuyerOrderBookpayRequest.BookPayOrderRq();
obj1.setAgentName("南方航空旗舰店");
AlitripIeBuyerOrderBookpayRequest.ContactsParam obj2 = new AlitripIeBuyerOrderBookpayRequest.ContactsParam();
obj2.setEmail("guohui.gh@alibaba-inc.com");
obj2.setName("hantie");
obj2.setPhone("15388888888");
obj2.setPhoneCountryCode("086");
obj1.setContactsParam(obj2);
AlitripIeBuyerOrderBookpayRequest.ItemParam obj3 = new AlitripIeBuyerOrderBookpayRequest.ItemParam();
obj3.setAdultTax(66600L);
obj3.setAdultTicketPrice(88800L);
obj3.setChildTax(33300L);
obj3.setChildTicketPrice(55500L);
List<AlitripIeBuyerOrderBookpayRequest.ItineraryParam> list5 = new ArrayList<AlitripIeBuyerOrderBookpayRequest.ItineraryParam>();
AlitripIeBuyerOrderBookpayRequest.ItineraryParam obj6 = new AlitripIeBuyerOrderBookpayRequest.ItineraryParam();
list5.add(obj6);
List<AlitripIeBuyerOrderBookpayRequest.FlightSegmentParam> list9 = new ArrayList<AlitripIeBuyerOrderBookpayRequest.FlightSegmentParam>();
AlitripIeBuyerOrderBookpayRequest.FlightSegmentParam obj10 = new AlitripIeBuyerOrderBookpayRequest.FlightSegmentParam();
list9.add(obj10);
obj10.setArrAirportCode("HKG");
obj10.setArrTerminal("T1");
obj10.setArrTime(StringUtils.parseDateTime("2016-12-22 10:55:00"));
obj10.setCabinClassCode("Y");
obj10.setCabinCode("S");
obj10.setDepAirportCode("PEK");
obj10.setDepTerminal("T3");
obj10.setDepTime(StringUtils.parseDateTime("2016-12-22 06:50:00"));
obj10.setElapsedMinute(100L);
obj10.setEquipType("332");
obj10.setMainSegment(true);
obj10.setMarketingAirline("HX");
obj10.setMarketingFlightNumber("HX305");
obj10.setOperatingAirLine("CA101");
obj10.setOperatingFlightNumber("CA");
obj10.setSegmentRph(1L);
list7.setFlightSegmentParams(list9);
obj6.setItineraryRph(1L);
obj3.setItineraryParams(list5);
obj3.setTripType(1L);
obj1.setItemParam(obj3);
obj1.setOutOrderId("99999999");
List<AlitripIeBuyerOrderBookpayRequest.PassengerParam> list12 = new ArrayList<AlitripIeBuyerOrderBookpayRequest.PassengerParam>();
AlitripIeBuyerOrderBookpayRequest.PassengerParam obj13 = new AlitripIeBuyerOrderBookpayRequest.PassengerParam();
list12.add(obj13);
obj13.setBirthDate(StringUtils.parseDateTime("1980-01-29 00:00:00"));
obj13.setCertType(0L);
obj13.setDocHolderNationalityName("中国大陆");
obj13.setDocId("123123123");
obj13.setDocIssueCountryName("中国大陆");
obj13.setEffectiveDate(StringUtils.parseDateTime("2017-05-03 00:00:00"));
obj13.setGender(1L);
obj13.setName("hant/tie");
obj13.setPassengerType(0L);
obj1.setPassengerParams(list12);
req.setBookPayOrderParam(obj1);
AlitripIeBuyerOrderBookpayResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripIeBuyerOrderBookpayRequest req = new AlitripIeBuyerOrderBookpayRequest();
AlitripIeBuyerOrderBookpayRequest.BookPayOrderRqDomain obj1 = new AlitripIeBuyerOrderBookpayRequest.BookPayOrderRqDomain();
obj1.AgentName = "南方航空旗舰店";
AlitripIeBuyerOrderBookpayRequest.ContactsParamDomain obj2 = new AlitripIeBuyerOrderBookpayRequest.ContactsParamDomain();
obj2.Email = "guohui.gh@alibaba-inc.com";
obj2.Name = "hantie";
obj2.Phone = "15388888888";
obj2.PhoneCountryCode = "086";
obj1.ContactsParam= obj2;
AlitripIeBuyerOrderBookpayRequest.ItemParamDomain obj3 = new AlitripIeBuyerOrderBookpayRequest.ItemParamDomain();
obj3.AdultTax = 66600L;
obj3.AdultTicketPrice = 88800L;
obj3.ChildTax = 33300L;
obj3.ChildTicketPrice = 55500L;
List<AlitripIeBuyerOrderBookpayRequest.ItineraryParamDomain> list5 = new List<AlitripIeBuyerOrderBookpayRequest.ItineraryParamDomain>();
AlitripIeBuyerOrderBookpayRequest.ItineraryParamDomain obj6 = new AlitripIeBuyerOrderBookpayRequest.ItineraryParamDomain();
list5.Add(obj6);
List<AlitripIeBuyerOrderBookpayRequest.FlightSegmentParamDomain> list8 = new List<AlitripIeBuyerOrderBookpayRequest.FlightSegmentParamDomain>();
AlitripIeBuyerOrderBookpayRequest.FlightSegmentParamDomain obj9 = new AlitripIeBuyerOrderBookpayRequest.FlightSegmentParamDomain();
list8.Add(obj9);
obj9.ArrAirportCode = "HKG";
obj9.ArrTerminal = "T1";
obj9.ArrTime = DateTime.Parse(2016-12-22 10:55:00");
obj9.CabinClassCode = "Y";
obj9.CabinCode = "S";
obj9.DepAirportCode = "PEK";
obj9.DepTerminal = "T3";
obj9.DepTime = DateTime.Parse(2016-12-22 06:50:00");
obj9.ElapsedMinute = 100L;
obj9.EquipType = "332";
obj9.MainSegment = true;
obj9.MarketingAirline = "HX";
obj9.MarketingFlightNumber = "HX305";
obj9.OperatingAirLine = "CA101";
obj9.OperatingFlightNumber = "CA";
obj9.SegmentRph = 1L;
obj6.FlightSegmentParams= list8;
obj6.ItineraryRph = 1L;
obj3.ItineraryParams= list5;
obj3.TripType = 1L;
obj1.ItemParam= obj3;
obj1.OutOrderId = "99999999";
List<AlitripIeBuyerOrderBookpayRequest.PassengerParamDomain> list11 = new List<AlitripIeBuyerOrderBookpayRequest.PassengerParamDomain>();
AlitripIeBuyerOrderBookpayRequest.PassengerParamDomain obj12 = new AlitripIeBuyerOrderBookpayRequest.PassengerParamDomain();
list11.Add(obj12);
obj12.BirthDate = DateTime.Parse(1980-01-29 00:00:00");
obj12.CertType = 0L;
obj12.DocHolderNationalityName = "中国大陆";
obj12.DocId = "123123123";
obj12.DocIssueCountryName = "中国大陆";
obj12.EffectiveDate = DateTime.Parse(2017-05-03 00:00:00");
obj12.Gender = 1L;
obj12.Name = "hant/tie";
obj12.PassengerType = 0L;
obj1.PassengerParams= list11;
req.BookPayOrderParam_ = obj1;
AlitripIeBuyerOrderBookpayResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripIeBuyerOrderBookpayRequest;
$book_pay_order_param = new BookPayOrderRq;
$book_pay_order_param->agent_name="南方航空旗舰店";
$contacts_param = new ContactsParam;
$contacts_param->email="guohui.gh@alibaba-inc.com";
$contacts_param->name="hantie";
$contacts_param->phone="15388888888";
$contacts_param->phone_country_code="086";
$book_pay_order_param->contacts_param = $contacts_param;
$item_param = new ItemParam;
$item_param->adult_tax="66600";
$item_param->adult_ticket_price="88800";
$item_param->child_tax="33300";
$item_param->child_ticket_price="55500";
$itinerary_params = new ItineraryParam;
$flight_segment_params = new FlightSegmentParam;
$flight_segment_params->arr_airport_code="HKG";
$flight_segment_params->arr_terminal="T1";
$flight_segment_params->arr_time="2016-12-22 10:55:00";
$flight_segment_params->cabin_class_code="Y";
$flight_segment_params->cabin_code="S";
$flight_segment_params->dep_airport_code="PEK";
$flight_segment_params->dep_terminal="T3";
$flight_segment_params->dep_time="2016-12-22 06:50:00";
$flight_segment_params->elapsed_minute="100";
$flight_segment_params->equip_type="332";
$flight_segment_params->main_segment="true";
$flight_segment_params->marketing_airline="HX";
$flight_segment_params->marketing_flight_number="HX305";
$flight_segment_params->operating_air_line="CA101";
$flight_segment_params->operating_flight_number="CA";
$flight_segment_params->segment_rph="1";
$itinerary_params->flight_segment_params = $flight_segment_params;
$itinerary_params->itinerary_rph="1";
$item_param->itinerary_params = $itinerary_params;
$item_param->trip_type="1";
$book_pay_order_param->item_param = $item_param;
$book_pay_order_param->out_order_id="99999999";
$passenger_params = new PassengerParam;
$passenger_params->birth_date="1980-01-29 00:00:00";
$passenger_params->cert_type="0";
$passenger_params->doc_holder_nationality_name="中国大陆";
$passenger_params->doc_id="123123123";
$passenger_params->doc_issue_country_name="中国大陆";
$passenger_params->effective_date="2017-05-03 00:00:00";
$passenger_params->gender="1";
$passenger_params->name="hant/tie";
$passenger_params->passenger_type="0";
$book_pay_order_param->passenger_params = $passenger_params;
$req->setBookPayOrderParam(json_encode($book_pay_order_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=alitrip.ie.buyer.order.bookpay' \
-d 'partner_id=apidoc' \
-d 'session=a2c39535-4728-459b-9feb-6c002084d5d4' \
-d 'sign=95EEC336488D609A89101AA461BC0D6C' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+22%3A02%3A39' \
-d 'v=2.0' \
-d 'book_pay_order_param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripIeBuyerOrderBookpayRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.book_pay_order_param=""
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,"alitrip.ie.buyer.order.bookpay");
add_param(pRequest,"book_pay_order_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('alitrip.ie.buyer.order.bookpay', {
'book_pay_order_param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})