TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripTravelHotelticketOrderRefundRequest req = new AlitripTravelHotelticketOrderRefundRequest();
req.setOrderId("334134");
req.setFailMsg("订单已核销");
req.setStatus(1L);
req.setFliggyOrderId("TB1234");
AlitripTravelHotelticketOrderRefundResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripTravelHotelticketOrderRefundRequest req = new AlitripTravelHotelticketOrderRefundRequest();
req.OrderId = "334134";
req.FailMsg = "订单已核销";
req.Status = 1L;
req.FliggyOrderId = "TB1234";
AlitripTravelHotelticketOrderRefundResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripTravelHotelticketOrderRefundRequest;
$req->setOrderId("334134");
$req->setFailMsg("订单已核销");
$req->setStatus("1");
$req->setFliggyOrderId("TB1234");
$resp = $c->execute($req);
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=alitrip.travel.hotelticket.order.refund' \
-d 'partner_id=apidoc' \
-d 'sign=C42A84E90C6CEBC2D0609ADCE2E15D4F' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-12-05+03%3A10%3A04' \
-d 'v=2.0' \
-d 'fail_msg=%E8%AE%A2%E5%8D%95%E5%B7%B2%E6%A0%B8%E9%94%80' \
-d 'fliggy_order_id=TB1234' \
-d 'order_id=334134' \
-d 'status=1'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripTravelHotelticketOrderRefundRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.order_id="334134"
req.fail_msg="订单已核销"
req.status=1
req.fliggy_order_id="TB1234"
try:
resp= req.getResponse()
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,"alitrip.travel.hotelticket.order.refund");
add_param(pRequest,"order_id","334134");
add_param(pRequest,"fail_msg","订单已核销");
add_param(pRequest,"status","1");
add_param(pRequest,"fliggy_order_id","TB1234");
pResponse = top_execute(pClient,pRequest,NULL);
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('alitrip.travel.hotelticket.order.refund', {
'order_id':'334134',
'fail_msg':'订单已核销',
'status':'1',
'fliggy_order_id':'TB1234'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})