TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelOrderAlipayfaceUpdateMockRequest req = new XhotelOrderAlipayfaceUpdateMockRequest();
req.setTid(100100100L);
req.setOptType(1L);
req.setReasonType(1L);
req.setReasonText("无房");
req.setOutRoomNumber("2022");
req.setCheckinDate("2014-12-10");
req.setCheckoutDate("2014-12-13");
req.setRooms(1L);
req.setOutId("R12345678");
XhotelOrderAlipayfaceUpdateMockResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelOrderAlipayfaceUpdateMockRequest req = new XhotelOrderAlipayfaceUpdateMockRequest();
req.Tid = 100100100L;
req.OptType = 1L;
req.ReasonType = 1L;
req.ReasonText = "无房";
req.OutRoomNumber = "2022";
req.CheckinDate = "2014-12-10";
req.CheckoutDate = "2014-12-13";
req.Rooms = 1L;
req.OutId = "R12345678";
XhotelOrderAlipayfaceUpdateMockResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelOrderAlipayfaceUpdateMockRequest;
$req->setTid("100100100");
$req->setOptType("1");
$req->setReasonType("1");
$req->setReasonText("无房");
$req->setOutRoomNumber("2022");
$req->setCheckinDate("2014-12-10");
$req->setCheckoutDate("2014-12-13");
$req->setRooms("1");
$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.update.mock' \
-d 'partner_id=apidoc' \
-d 'session=7160677b-8765-4d3b-91f8-a8c68b163e4a' \
-d 'sign=1A6C9A27F029A121CAFBBC01E7048DD3' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-12-27+09%3A24%3A31' \
-d 'v=2.0' \
-d 'checkin_date=2014-12-10' \
-d 'checkout_date=2014-12-13' \
-d 'opt_type=1' \
-d 'out_id=R12345678' \
-d 'out_room_number=2022' \
-d 'reason_text=%E6%97%A0%E6%88%BF' \
-d 'reason_type=1' \
-d 'rooms=1' \
-d 'tid=100100100'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelOrderAlipayfaceUpdateMockRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.tid=100100100
req.opt_type=1
req.reason_type=1
req.reason_text="无房"
req.out_room_number="2022"
req.checkin_date="2014-12-10"
req.checkout_date="2014-12-13"
req.rooms=1
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.update.mock");
add_param(pRequest,"tid","100100100");
add_param(pRequest,"opt_type","1");
add_param(pRequest,"reason_type","1");
add_param(pRequest,"reason_text","无房");
add_param(pRequest,"out_room_number","2022");
add_param(pRequest,"checkin_date","2014-12-10");
add_param(pRequest,"checkout_date","2014-12-13");
add_param(pRequest,"rooms","1");
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.update.mock', {
'tid':'100100100',
'opt_type':'1',
'reason_type':'1',
'reason_text':'无房',
'out_room_number':'2022',
'checkin_date':'2014-12-10',
'checkout_date':'2014-12-13',
'rooms':'1',
'out_id':'R12345678'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})