TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelOrderUpdateRequest req = new XhotelOrderUpdateRequest();
req.setTid(100100100L);
req.setOptType(1L);
req.setSyncToHotel("Y");
req.setRefundFee(1000L);
req.setReasonType(6L);
req.setInvoiceAmount(1000L);
req.setConfirmCode("25705251");
req.setHotelReverseReasonCode(3300001L);
req.setHotelReverseReasonDesc("房屋装修/长租/自主");
req.setHotelReverseReasonDetail("\"\"");
XhotelOrderUpdateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelOrderUpdateRequest req = new XhotelOrderUpdateRequest();
req.Tid = 100100100L;
req.OptType = 1L;
req.SyncToHotel = "Y";
req.RefundFee = 1000L;
req.ReasonType = 6L;
req.InvoiceAmount = 1000L;
req.ConfirmCode = "25705251";
req.HotelReverseReasonCode = 3300001L;
req.HotelReverseReasonDesc = "房屋装修/长租/自主";
req.HotelReverseReasonDetail = "\"\"";
XhotelOrderUpdateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelOrderUpdateRequest;
$req->setTid("100100100");
$req->setOptType("1");
$req->setSyncToHotel("Y");
$req->setRefundFee("1000");
$req->setReasonType("6");
$req->setInvoiceAmount("1000");
$req->setConfirmCode("25705251");
$req->setHotelReverseReasonCode("3300001");
$req->setHotelReverseReasonDesc("房屋装修/长租/自主");
$req->setHotelReverseReasonDetail("\"\"");
$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.update' \
-d 'partner_id=apidoc' \
-d 'session=75e114b9-418f-43a6-bc91-2a2073fcfa37' \
-d 'sign=07B93056AD840E817D5E7A9DAC476C79' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+23%3A47%3A13' \
-d 'v=2.0' \
-d 'confirm_code=25705251' \
-d 'hotel_reverse_reason_code=3300001' \
-d 'hotel_reverse_reason_desc=%E6%88%BF%E5%B1%8B%E8%A3%85%E4%BF%AE%2F%E9%95%BF%E7%A7%9F%2F%E8%87%AA%E4%B8%BB' \
-d 'hotel_reverse_reason_detail=%5C%22%5C%22' \
-d 'invoice_amount=1000' \
-d 'opt_type=1' \
-d 'reason_type=6' \
-d 'refund_fee=1000' \
-d 'sync_to_hotel=Y' \
-d 'tid=100100100'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelOrderUpdateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.tid=100100100
req.opt_type=1
req.sync_to_hotel="Y"
req.refund_fee=1000
req.reason_type=6
req.invoice_amount=1000
req.confirm_code="25705251"
req.hotel_reverse_reason_code=3300001
req.hotel_reverse_reason_desc="房屋装修/长租/自主"
req.hotel_reverse_reason_detail="\"\""
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.update");
add_param(pRequest,"tid","100100100");
add_param(pRequest,"opt_type","1");
add_param(pRequest,"sync_to_hotel","Y");
add_param(pRequest,"refund_fee","1000");
add_param(pRequest,"reason_type","6");
add_param(pRequest,"invoice_amount","1000");
add_param(pRequest,"confirm_code","25705251");
add_param(pRequest,"hotel_reverse_reason_code","3300001");
add_param(pRequest,"hotel_reverse_reason_desc","房屋装修/长租/自主");
add_param(pRequest,"hotel_reverse_reason_detail","\"\"");
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.update', {
'tid':'100100100',
'opt_type':'1',
'sync_to_hotel':'Y',
'refund_fee':'1000',
'reason_type':'6',
'invoice_amount':'1000',
'confirm_code':'25705251',
'hotel_reverse_reason_code':'3300001',
'hotel_reverse_reason_desc':'房屋装修/长租/自主',
'hotel_reverse_reason_detail':'\"\"'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})