TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripRefundticketRefundapplyRequest req = new AlitripRefundticketRefundapplyRequest();
req.setChannelName("feiye");
req.setRefundTicketType("Voluntary");
req.setPassword("7b1e6dd7e98f6e84f246cb4783880449");
req.setTicketNumbers("781-8511813918,781-8511813919");
req.setRefundFee(100L);
req.setOrderId(123L);
req.setRefundTicketDetail("改变行程");
List<AlitripRefundticketRefundapplyRequest.RefundVoucherInfoDO> list2 = new ArrayList<AlitripRefundticketRefundapplyRequest.RefundVoucherInfoDO>();
AlitripRefundticketRefundapplyRequest.RefundVoucherInfoDO obj3 = new AlitripRefundticketRefundapplyRequest.RefundVoucherInfoDO();
list2.add(obj3);
obj3.setFileName("延误证明.jpg");
obj3.setFileId("TB1pOvUXXXXXXatXpXXXXXXXXXX");
req.setVoucherInfos(list2);
req.setRefundReasonType(1L);
AlitripRefundticketRefundapplyResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripRefundticketRefundapplyRequest req = new AlitripRefundticketRefundapplyRequest();
req.ChannelName = "feiye";
req.RefundTicketType = "Voluntary";
req.Password = "7b1e6dd7e98f6e84f246cb4783880449";
req.TicketNumbers = "781-8511813918,781-8511813919";
req.RefundFee = 100L;
req.OrderId = 123L;
req.RefundTicketDetail = "改变行程";
List<AlitripRefundticketRefundapplyRequest.RefundVoucherInfoDODomain> list2 = new List<AlitripRefundticketRefundapplyRequest.RefundVoucherInfoDODomain>();
AlitripRefundticketRefundapplyRequest.RefundVoucherInfoDODomain obj3 = new AlitripRefundticketRefundapplyRequest.RefundVoucherInfoDODomain();
list2.Add(obj3);
obj3.FileName = "延误证明.jpg";
obj3.FileId = "TB1pOvUXXXXXXatXpXXXXXXXXXX";
req.VoucherInfos_ = list2;
req.RefundReasonType = 1L;
AlitripRefundticketRefundapplyResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripRefundticketRefundapplyRequest;
$req->setChannelName("feiye");
$req->setRefundTicketType("Voluntary");
$req->setPassword("7b1e6dd7e98f6e84f246cb4783880449");
$req->setTicketNumbers("781-8511813918,781-8511813919");
$req->setRefundFee("100");
$req->setOrderId("123");
$req->setRefundTicketDetail("改变行程");
$voucher_infos = new RefundVoucherInfoDO;
$voucher_infos->file_name="延误证明.jpg";
$voucher_infos->file_id="TB1pOvUXXXXXXatXpXXXXXXXXXX";
$req->setVoucherInfos(json_encode($voucher_infos));
$req->setRefundReasonType("1");
$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.alitrip.refundticket.refundapply' \
-d 'partner_id=apidoc' \
-d 'session=b1a7d01d-20f7-4464-8411-06a518660f87' \
-d 'sign=46E1F0C140464DEF703A428A9673BF40' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-30+13%3A01%3A46' \
-d 'v=2.0' \
-d 'channel_name=feiye' \
-d 'order_id=123' \
-d 'password=7b1e6dd7e98f6e84f246cb4783880449' \
-d 'refund_fee=100' \
-d 'refund_reason_type=1' \
-d 'refund_ticket_detail=%E6%94%B9%E5%8F%98%E8%A1%8C%E7%A8%8B' \
-d 'refund_ticket_type=Voluntary' \
-d 'ticket_numbers=781-8511813918%2C781-8511813919' \
-d 'voucher_infos=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripRefundticketRefundapplyRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.channel_name="feiye"
req.refund_ticket_type="Voluntary"
req.password="7b1e6dd7e98f6e84f246cb4783880449"
req.ticket_numbers="781-8511813918,781-8511813919"
req.refund_fee=100
req.order_id=123
req.refund_ticket_detail="改变行程"
req.voucher_infos=""
req.refund_reason_type=1
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.alitrip.refundticket.refundapply");
add_param(pRequest,"channel_name","feiye");
add_param(pRequest,"refund_ticket_type","Voluntary");
add_param(pRequest,"password","7b1e6dd7e98f6e84f246cb4783880449");
add_param(pRequest,"ticket_numbers","781-8511813918,781-8511813919");
add_param(pRequest,"refund_fee","100");
add_param(pRequest,"order_id","123");
add_param(pRequest,"refund_ticket_detail","改变行程");
add_param(pRequest,"voucher_infos","数据结构JSON示例");
add_param(pRequest,"refund_reason_type","1");
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.alitrip.refundticket.refundapply', {
'channel_name':'feiye',
'refund_ticket_type':'Voluntary',
'password':'7b1e6dd7e98f6e84f246cb4783880449',
'ticket_numbers':'781-8511813918,781-8511813919',
'refund_fee':'100',
'order_id':'123',
'refund_ticket_detail':'改变行程',
'voucher_infos':'数据结构JSON示例',
'refund_reason_type':'1'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})