TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelConfirmRequest req = new XhotelConfirmRequest();
req.setHid(100000L);
req.setConfirm(1L);
req.setOuterId("\"121\"");
req.setVendor("ChinaOnline");
XhotelConfirmResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelConfirmRequest req = new XhotelConfirmRequest();
req.Hid = 100000L;
req.Confirm = 1L;
req.OuterId = "\"121\"";
req.Vendor = "ChinaOnline";
XhotelConfirmResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelConfirmRequest;
$req->setHid("100000");
$req->setConfirm("1");
$req->setOuterId("\"121\"");
$req->setVendor("ChinaOnline");
$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.xhotel.confirm' \
-d 'partner_id=apidoc' \
-d 'session=9461289d-de78-4948-b4a3-457e308e07fb' \
-d 'sign=B6AF1D641737519A7F65E8BD0996A4B8' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-12-27+08%3A39%3A26' \
-d 'v=2.0' \
-d 'confirm=1' \
-d 'hid=100000' \
-d 'outer_id=%5C%22121%5C%22' \
-d 'vendor=ChinaOnline'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelConfirmRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.hid=100000
req.confirm=1
req.outer_id="\"121\""
req.vendor="ChinaOnline"
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.xhotel.confirm");
add_param(pRequest,"hid","100000");
add_param(pRequest,"confirm","1");
add_param(pRequest,"outer_id","\"121\"");
add_param(pRequest,"vendor","ChinaOnline");
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.xhotel.confirm', {
'hid':'100000',
'confirm':'1',
'outer_id':'\"121\"',
'vendor':'ChinaOnline'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})