TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelOrderOfficialSettleCancelRequest req = new XhotelOrderOfficialSettleCancelRequest();
req.setTid(111111111111L);
req.setReason("取消结账的原因");
req.setOutId("R12333");
req.setNotifyUrl("http://www.xx.xx");
req.setOutUuid("2222");
XhotelOrderOfficialSettleCancelResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelOrderOfficialSettleCancelRequest req = new XhotelOrderOfficialSettleCancelRequest();
req.Tid = 111111111111L;
req.Reason = "取消结账的原因";
req.OutId = "R12333";
req.NotifyUrl = "http://www.xx.xx";
req.OutUuid = "2222";
XhotelOrderOfficialSettleCancelResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelOrderOfficialSettleCancelRequest;
$req->setTid("111111111111");
$req->setReason("取消结账的原因");
$req->setOutId("R12333");
$req->setNotifyUrl("http://www.xx.xx");
$req->setOutUuid("2222");
$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.order.official.settle.cancel' \
-d 'partner_id=apidoc' \
-d 'session=c2d8e370-58c1-4eb8-804c-a48707eb0c63' \
-d 'sign=FF7B4E1F2B7AC604A7934ADB6E92BB58' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-03+07%3A49%3A59' \
-d 'v=2.0' \
-d 'notify_url=http%3A%2F%2Fwww.xx.xx' \
-d 'out_id=R12333' \
-d 'out_uuid=2222' \
-d 'reason=%E5%8F%96%E6%B6%88%E7%BB%93%E8%B4%A6%E7%9A%84%E5%8E%9F%E5%9B%A0' \
-d 'tid=111111111111'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelOrderOfficialSettleCancelRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.tid=111111111111
req.reason="取消结账的原因"
req.out_id="R12333"
req.notify_url="http://www.xx.xx"
req.out_uuid="2222"
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.order.official.settle.cancel");
add_param(pRequest,"tid","111111111111");
add_param(pRequest,"reason","取消结账的原因");
add_param(pRequest,"out_id","R12333");
add_param(pRequest,"notify_url","http://www.xx.xx");
add_param(pRequest,"out_uuid","2222");
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.order.official.settle.cancel', {
'tid':'111111111111',
'reason':'取消结账的原因',
'out_id':'R12333',
'notify_url':'http://www.xx.xx',
'out_uuid':'2222'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})