TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelOrderAlipayfaceCancelsettleRequest req = new XhotelOrderAlipayfaceCancelsettleRequest();
req.setTid(100100100L);
req.setReason("\"价格输入有误\"");
req.setOutId("R12345678");
XhotelOrderAlipayfaceCancelsettleResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelOrderAlipayfaceCancelsettleRequest req = new XhotelOrderAlipayfaceCancelsettleRequest();
req.Tid = 100100100L;
req.Reason = "\"价格输入有误\"";
req.OutId = "R12345678";
XhotelOrderAlipayfaceCancelsettleResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelOrderAlipayfaceCancelsettleRequest;
$req->setTid("100100100");
$req->setReason("\"价格输入有误\"");
$req->setOutId("R12345678");
$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.alipayface.cancelsettle' \
-d 'partner_id=apidoc' \
-d 'session=a27ee269-ddb5-485f-94a3-18171eaf9aa1' \
-d 'sign=596D7EBE430943F30057798835D552DA' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+19%3A49%3A46' \
-d 'v=2.0' \
-d 'out_id=R12345678' \
-d 'reason=%5C%22%E4%BB%B7%E6%A0%BC%E8%BE%93%E5%85%A5%E6%9C%89%E8%AF%AF%5C%22' \
-d 'tid=100100100'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelOrderAlipayfaceCancelsettleRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.tid=100100100
req.reason="\"价格输入有误\""
req.out_id="R12345678"
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.alipayface.cancelsettle");
add_param(pRequest,"tid","100100100");
add_param(pRequest,"reason","\"价格输入有误\"");
add_param(pRequest,"out_id","R12345678");
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.alipayface.cancelsettle', {
'tid':'100100100',
'reason':'\"价格输入有误\"',
'out_id':'R12345678'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})