TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TrainAgentRefundStandaloneVtwoRequest req = new TrainAgentRefundStandaloneVtwoRequest();
TrainAgentRefundStandaloneVtwoRequest.StandaloneRefundRQ obj1 = new TrainAgentRefundStandaloneVtwoRequest.StandaloneRefundRQ();
obj1.setAgentOrderId("NO1802578604520501248");
obj1.setFliggyOrderId("232323232");
obj1.setRefundPrice(500L);
List<TrainAgentRefundStandaloneVtwoRequest.BaguaTicketDTO> list3 = new ArrayList<TrainAgentRefundStandaloneVtwoRequest.BaguaTicketDTO>();
TrainAgentRefundStandaloneVtwoRequest.BaguaTicketDTO obj4 = new TrainAgentRefundStandaloneVtwoRequest.BaguaTicketDTO();
list3.add(obj4);
obj4.setPassengerName("张三");
obj4.setPassengerType("1");
obj4.setCertIdNo("122121212121212");
obj4.setCertIdType("1");
obj4.setRefundPrice("500");
obj4.setFliggySubOrderId("23232323");
obj4.setAgentSubOrderId("NT23232323");
obj4.setAgentChangeSubOrderId("CT32343434");
obj1.setTickets(list3);
obj1.setFliggyChangeApplyId("2323232323");
obj1.setAgentChangeApplyId("CO23232323");
obj1.setStandaloneRefundType(1L);
req.setParam(obj1);
TrainAgentRefundStandaloneVtwoResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TrainAgentRefundStandaloneVtwoRequest req = new TrainAgentRefundStandaloneVtwoRequest();
TrainAgentRefundStandaloneVtwoRequest.StandaloneRefundRQDomain obj1 = new TrainAgentRefundStandaloneVtwoRequest.StandaloneRefundRQDomain();
obj1.AgentOrderId = "NO1802578604520501248";
obj1.FliggyOrderId = "232323232";
obj1.RefundPrice = 500L;
List<TrainAgentRefundStandaloneVtwoRequest.BaguaTicketDTODomain> list3 = new List<TrainAgentRefundStandaloneVtwoRequest.BaguaTicketDTODomain>();
TrainAgentRefundStandaloneVtwoRequest.BaguaTicketDTODomain obj4 = new TrainAgentRefundStandaloneVtwoRequest.BaguaTicketDTODomain();
list3.Add(obj4);
obj4.PassengerName = "张三";
obj4.PassengerType = "1";
obj4.CertIdNo = "122121212121212";
obj4.CertIdType = "1";
obj4.RefundPrice = "500";
obj4.FliggySubOrderId = "23232323";
obj4.AgentSubOrderId = "NT23232323";
obj4.AgentChangeSubOrderId = "CT32343434";
obj1.Tickets= list3;
obj1.FliggyChangeApplyId = "2323232323";
obj1.AgentChangeApplyId = "CO23232323";
obj1.StandaloneRefundType = 1L;
req.Param_ = obj1;
TrainAgentRefundStandaloneVtwoResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TrainAgentRefundStandaloneVtwoRequest;
$param = new StandaloneRefundRQ;
$param->agent_order_id="NO1802578604520501248";
$param->fliggy_order_id="232323232";
$param->refund_price="500";
$tickets = new BaguaTicketDTO;
$tickets->passenger_name="张三";
$tickets->passenger_type="1";
$tickets->cert_id_no="122121212121212";
$tickets->cert_id_type="1";
$tickets->refund_price="500";
$tickets->fliggy_sub_order_id="23232323";
$tickets->agent_sub_order_id="NT23232323";
$tickets->agent_change_sub_order_id="CT32343434";
$param->tickets = $tickets;
$param->fliggy_change_apply_id="2323232323";
$param->agent_change_apply_id="CO23232323";
$param->standalone_refund_type="1";
$req->setParam(json_encode($param));
$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.train.agent.refund.standalone.vtwo' \
-d 'partner_id=apidoc' \
-d 'session=1902fc86-a78f-4588-a3ff-fdfef8a849fe' \
-d 'sign=F591C8A818BE01174A52986B5C42C035' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-10-14+11%3A57%3A14' \
-d 'v=2.0' \
-d 'param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TrainAgentRefundStandaloneVtwoRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param="数据结构示例JSON格式"
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.train.agent.refund.standalone.vtwo");
add_param(pRequest,"param","数据结构JSON示例");
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.train.agent.refund.standalone.vtwo', {
'param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})