TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TrainAgentRefundVtwoRequest req = new TrainAgentRefundVtwoRequest();
TrainAgentRefundVtwoRequest.RefundCallbackRQ obj1 = new TrainAgentRefundVtwoRequest.RefundCallbackRQ();
obj1.setResultCode("200");
obj1.setResultMsg("成功");
obj1.setSuccess(true);
obj1.setFliggyRequestId("qsa1232");
obj1.setFliggyOrderId("abc2024061802");
obj1.setAgentChangeApplyId("NO1802578604520501248");
obj1.setFliggyChangeApplyId("abc2024061802");
obj1.setAgentRefundApplyId("NO1802578604520501248");
obj1.setFliggyRefundApplyId("abc2024061802");
obj1.setRefundType("online");
obj1.setRefundFee("4");
obj1.setRefundHandingFee("2");
obj1.setRefundTime("2025-01-01 11:00:00");
List<TrainAgentRefundVtwoRequest.BaguaTicketDTO> list3 = new ArrayList<TrainAgentRefundVtwoRequest.BaguaTicketDTO>();
TrainAgentRefundVtwoRequest.BaguaTicketDTO obj4 = new TrainAgentRefundVtwoRequest.BaguaTicketDTO();
list3.add(obj4);
obj4.setAgentPassengerId("1667");
obj4.setAgentSubOrderId("NT1802578604520501249");
obj4.setFliggySubOrderId("abc202406110928");
obj4.setAgentChangeSubOrderId("NT1802578604520501249");
obj4.setFliggyChangeSubOrderId("abc202406110928");
obj4.setPassengerName("xxx");
obj4.setPassengerType("1");
obj4.setCertIdNo("xxx");
obj4.setCertIdType("1");
obj4.setTicketNo("EG35547255105013A");
obj4.setRefundPrice("4");
obj4.setHadInvoice(0L);
obj1.setTickets(list3);
obj1.setAgentOrderId("NO1802578604520501248");
req.setParam(obj1);
TrainAgentRefundVtwoResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TrainAgentRefundVtwoRequest req = new TrainAgentRefundVtwoRequest();
TrainAgentRefundVtwoRequest.RefundCallbackRQDomain obj1 = new TrainAgentRefundVtwoRequest.RefundCallbackRQDomain();
obj1.ResultCode = "200";
obj1.ResultMsg = "成功";
obj1.Success = true;
obj1.FliggyRequestId = "qsa1232";
obj1.FliggyOrderId = "abc2024061802";
obj1.AgentChangeApplyId = "NO1802578604520501248";
obj1.FliggyChangeApplyId = "abc2024061802";
obj1.AgentRefundApplyId = "NO1802578604520501248";
obj1.FliggyRefundApplyId = "abc2024061802";
obj1.RefundType = "online";
obj1.RefundFee = "4";
obj1.RefundHandingFee = "2";
obj1.RefundTime = "2025-01-01 11:00:00";
List<TrainAgentRefundVtwoRequest.BaguaTicketDTODomain> list3 = new List<TrainAgentRefundVtwoRequest.BaguaTicketDTODomain>();
TrainAgentRefundVtwoRequest.BaguaTicketDTODomain obj4 = new TrainAgentRefundVtwoRequest.BaguaTicketDTODomain();
list3.Add(obj4);
obj4.AgentPassengerId = "1667";
obj4.AgentSubOrderId = "NT1802578604520501249";
obj4.FliggySubOrderId = "abc202406110928";
obj4.AgentChangeSubOrderId = "NT1802578604520501249";
obj4.FliggyChangeSubOrderId = "abc202406110928";
obj4.PassengerName = "xxx";
obj4.PassengerType = "1";
obj4.CertIdNo = "xxx";
obj4.CertIdType = "1";
obj4.TicketNo = "EG35547255105013A";
obj4.RefundPrice = "4";
obj4.HadInvoice = 0L;
obj1.Tickets= list3;
obj1.AgentOrderId = "NO1802578604520501248";
req.Param_ = obj1;
TrainAgentRefundVtwoResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TrainAgentRefundVtwoRequest;
$param = new RefundCallbackRQ;
$param->result_code="200";
$param->result_msg="成功";
$param->success="true";
$param->fliggy_request_id="qsa1232";
$param->fliggy_order_id="abc2024061802";
$param->agent_change_apply_id="NO1802578604520501248";
$param->fliggy_change_apply_id="abc2024061802";
$param->agent_refund_apply_id="NO1802578604520501248";
$param->fliggy_refund_apply_id="abc2024061802";
$param->refund_type="online";
$param->refund_fee="4";
$param->refund_handing_fee="2";
$param->refund_time="2025-01-01 11:00:00";
$tickets = new BaguaTicketDTO;
$tickets->agent_passenger_id="1667";
$tickets->agent_sub_order_id="NT1802578604520501249";
$tickets->fliggy_sub_order_id="abc202406110928";
$tickets->agent_change_sub_order_id="NT1802578604520501249";
$tickets->fliggy_change_sub_order_id="abc202406110928";
$tickets->passenger_name="xxx";
$tickets->passenger_type="1";
$tickets->cert_id_no="xxx";
$tickets->cert_id_type="1";
$tickets->ticket_no="EG35547255105013A";
$tickets->refund_price="4";
$tickets->had_invoice="0";
$param->tickets = $tickets;
$param->agent_order_id="NO1802578604520501248";
$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.vtwo' \
-d 'partner_id=apidoc' \
-d 'session=da999dd8-872e-48a8-b245-fcde15e8c151' \
-d 'sign=834E85555BD9C20A38C9A97868E93A23' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-08-29+03%3A53%3A57' \
-d 'v=2.0' \
-d 'param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TrainAgentRefundVtwoRequest(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.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.vtwo', {
'param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})