TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripBtripSupplychainTrainCallbackOfflineRefundRequest req = new AlitripBtripSupplychainTrainCallbackOfflineRefundRequest();
AlitripBtripSupplychainTrainCallbackOfflineRefundRequest.OfflineRefundCallBackParam obj1 = new AlitripBtripSupplychainTrainCallbackOfflineRefundRequest.OfflineRefundCallBackParam();
obj1.setSupplierOrderId("987654321");
obj1.setTicketNo("EW123212");
obj1.setOrderId("123456789");
List<AlitripBtripSupplychainTrainCallbackOfflineRefundRequest.OfflineRefundInfo> list3 = new ArrayList<AlitripBtripSupplychainTrainCallbackOfflineRefundRequest.OfflineRefundInfo>();
AlitripBtripSupplychainTrainCallbackOfflineRefundRequest.OfflineRefundInfo obj4 = new AlitripBtripSupplychainTrainCallbackOfflineRefundRequest.OfflineRefundInfo();
list3.add(obj4);
obj4.setPassengerName("张三");
obj4.setRefundType("0");
obj4.setPassengerIdNo("432524100010191212");
obj4.setPassengerIdType("0");
obj4.setPassengerId("123412");
obj4.setPassengerTicketNo("EW1212121221");
obj4.setRefundPrice("1000");
obj4.setTrainId("123456");
obj1.setOfflineRefundInfos(list3);
obj1.setRefundTotalPrice("1000");
obj1.setOfflineRefundId("134213");
obj1.setOfflineRefundType("1");
req.setOfflineRefundCallBackParam(obj1);
AlitripBtripSupplychainTrainCallbackOfflineRefundResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripBtripSupplychainTrainCallbackOfflineRefundRequest req = new AlitripBtripSupplychainTrainCallbackOfflineRefundRequest();
AlitripBtripSupplychainTrainCallbackOfflineRefundRequest.OfflineRefundCallBackParamDomain obj1 = new AlitripBtripSupplychainTrainCallbackOfflineRefundRequest.OfflineRefundCallBackParamDomain();
obj1.SupplierOrderId = "987654321";
obj1.TicketNo = "EW123212";
obj1.OrderId = "123456789";
List<AlitripBtripSupplychainTrainCallbackOfflineRefundRequest.OfflineRefundInfoDomain> list3 = new List<AlitripBtripSupplychainTrainCallbackOfflineRefundRequest.OfflineRefundInfoDomain>();
AlitripBtripSupplychainTrainCallbackOfflineRefundRequest.OfflineRefundInfoDomain obj4 = new AlitripBtripSupplychainTrainCallbackOfflineRefundRequest.OfflineRefundInfoDomain();
list3.Add(obj4);
obj4.PassengerName = "张三";
obj4.RefundType = "0";
obj4.PassengerIdNo = "432524100010191212";
obj4.PassengerIdType = "0";
obj4.PassengerId = "123412";
obj4.PassengerTicketNo = "EW1212121221";
obj4.RefundPrice = "1000";
obj4.TrainId = "123456";
obj1.OfflineRefundInfos= list3;
obj1.RefundTotalPrice = "1000";
obj1.OfflineRefundId = "134213";
obj1.OfflineRefundType = "1";
req.OfflineRefundCallBackParam_ = obj1;
AlitripBtripSupplychainTrainCallbackOfflineRefundResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripBtripSupplychainTrainCallbackOfflineRefundRequest;
$offline_refund_call_back_param = new OfflineRefundCallBackParam;
$offline_refund_call_back_param->supplier_order_id="987654321";
$offline_refund_call_back_param->ticket_no="EW123212";
$offline_refund_call_back_param->order_id="123456789";
$offline_refund_infos = new OfflineRefundInfo;
$offline_refund_infos->passenger_name="张三";
$offline_refund_infos->refund_type="0";
$offline_refund_infos->passenger_id_no="432524100010191212";
$offline_refund_infos->passenger_id_type="0";
$offline_refund_infos->passenger_id="123412";
$offline_refund_infos->passenger_ticket_no="EW1212121221";
$offline_refund_infos->refund_price="1000";
$offline_refund_infos->train_id="123456";
$offline_refund_call_back_param->offline_refund_infos = $offline_refund_infos;
$offline_refund_call_back_param->refund_total_price="1000";
$offline_refund_call_back_param->offline_refund_id="134213";
$offline_refund_call_back_param->offline_refund_type="1";
$req->setOfflineRefundCallBackParam(json_encode($offline_refund_call_back_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=alitrip.btrip.supplychain.train.callback.offline.refund' \
-d 'partner_id=apidoc' \
-d 'session=93c0d0ad-68d7-4be7-9c52-a9a3f66c130b' \
-d 'sign=90DB2F1A62D585B77B6B8BD0A5CAC81B' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+19%3A33%3A40' \
-d 'v=2.0' \
-d 'offline_refund_call_back_param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripBtripSupplychainTrainCallbackOfflineRefundRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.offline_refund_call_back_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,"alitrip.btrip.supplychain.train.callback.offline.refund");
add_param(pRequest,"offline_refund_call_back_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('alitrip.btrip.supplychain.train.callback.offline.refund', {
'offline_refund_call_back_param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})