TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelOrderAlipayfaceCancelsettleMockRequest req = new XhotelOrderAlipayfaceCancelsettleMockRequest();
req.setTid(100100100L);
req.setReason("\"价格输入有误\"");
req.setOutId("R12345678");
XhotelOrderAlipayfaceCancelsettleMockResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelOrderAlipayfaceCancelsettleMockRequest req = new XhotelOrderAlipayfaceCancelsettleMockRequest();
req.Tid = 100100100L;
req.Reason = "\"价格输入有误\"";
req.OutId = "R12345678";
XhotelOrderAlipayfaceCancelsettleMockResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelOrderAlipayfaceCancelsettleMockRequest;
$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.mock' \
-d 'partner_id=apidoc' \
-d 'session=f48c407e-a2ad-4b9e-b5be-3ba20f047d7d' \
-d 'sign=8D969B6F7BAF1DD84FBD975D78F7A35B' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-12-27+09%3A20%3A37' \
-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.XhotelOrderAlipayfaceCancelsettleMockRequest(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.mock");
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.mock', {
'tid':'100100100',
'reason':'\"价格输入有误\"',
'out_id':'R12345678'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})