TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripTravelHotelticketOrderVerifyRequest req = new AlitripTravelHotelticketOrderVerifyRequest();
req.setExtendParamsString("{\"example\": \"例子\"}");
req.setOrderId("3452345345");
AlitripTravelHotelticketOrderVerifyRequest.HotelTicketVerifyVoucherDTO obj1 = new AlitripTravelHotelticketOrderVerifyRequest.HotelTicketVerifyVoucherDTO();
obj1.setCode("1341243");
obj1.setUseDate("2022-05-02 15:05:05");
obj1.setCertificateId("112341234134");
obj1.setType(1L);
obj1.setUsageNums(1L);
obj1.setBizType(1L);
req.setVouchers(obj1);
req.setFliggyOrderId("TB1234");
AlitripTravelHotelticketOrderVerifyResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripTravelHotelticketOrderVerifyRequest req = new AlitripTravelHotelticketOrderVerifyRequest();
req.ExtendParams = "{\"example\": \"例子\"}";
req.OrderId = "3452345345";
AlitripTravelHotelticketOrderVerifyRequest.HotelTicketVerifyVoucherDTODomain obj1 = new AlitripTravelHotelticketOrderVerifyRequest.HotelTicketVerifyVoucherDTODomain();
obj1.Code = "1341243";
obj1.UseDate = "2022-05-02 15:05:05";
obj1.CertificateId = "112341234134";
obj1.Type = 1L;
obj1.UsageNums = 1L;
obj1.BizType = 1L;
req.Vouchers_ = obj1;
req.FliggyOrderId = "TB1234";
AlitripTravelHotelticketOrderVerifyResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripTravelHotelticketOrderVerifyRequest;
$req->setExtendParams("{\"example\": \"例子\"}");
$req->setOrderId("3452345345");
$vouchers = new HotelTicketVerifyVoucherDTO;
$vouchers->code="1341243";
$vouchers->use_date="2022-05-02 15:05:05";
$vouchers->certificate_id="112341234134";
$vouchers->type="1";
$vouchers->usage_nums="1";
$vouchers->biz_type="1";
$req->setVouchers(json_encode($vouchers));
$req->setFliggyOrderId("TB1234");
$resp = $c->execute($req);
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.travel.hotelticket.order.verify' \
-d 'partner_id=apidoc' \
-d 'sign=40C2D4EDC14A7A5E08E49B436CB8F90A' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-12-05+03%3A19%3A20' \
-d 'v=2.0' \
-d 'extend_params=%7B%5C%22example%5C%22%3A+%5C%22%E4%BE%8B%E5%AD%90%5C%22%7D' \
-d 'fliggy_order_id=TB1234' \
-d 'order_id=3452345345' \
-d 'vouchers=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripTravelHotelticketOrderVerifyRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.extend_params="{\"example\": \"例子\"}"
req.order_id="3452345345"
req.vouchers="数据结构示例JSON格式"
req.fliggy_order_id="TB1234"
try:
resp= req.getResponse()
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.travel.hotelticket.order.verify");
add_param(pRequest,"extend_params","{\"example\": \"例子\"}");
add_param(pRequest,"order_id","3452345345");
add_param(pRequest,"vouchers","数据结构JSON示例");
add_param(pRequest,"fliggy_order_id","TB1234");
pResponse = top_execute(pClient,pRequest,NULL);
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.travel.hotelticket.order.verify', {
'extend_params':'{\"example\": \"例子\"}',
'order_id':'3452345345',
'vouchers':'数据结构JSON示例',
'fliggy_order_id':'TB1234'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})