TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripBtripFlightDistributionOrderPayRequest req = new AlitripBtripFlightDistributionOrderPayRequest();
AlitripBtripFlightDistributionOrderPayRequest.BtripFlightPayOrderRq obj1 = new AlitripBtripFlightDistributionOrderPayRequest.BtripFlightPayOrderRq();
obj1.setCorpPayPrice(5000L);
obj1.setDisOrderId("test0001");
obj1.setExtra("");
obj1.setOrderId(112345234234L);
obj1.setPersonalPayPrice(200L);
obj1.setSubChannel("corp2034925");
obj1.setTotalPayPrice(5200L);
req.setParamBtripFlightPayOrderRq(obj1);
AlitripBtripFlightDistributionOrderPayResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripBtripFlightDistributionOrderPayRequest req = new AlitripBtripFlightDistributionOrderPayRequest();
AlitripBtripFlightDistributionOrderPayRequest.BtripFlightPayOrderRqDomain obj1 = new AlitripBtripFlightDistributionOrderPayRequest.BtripFlightPayOrderRqDomain();
obj1.CorpPayPrice = 5000L;
obj1.DisOrderId = "test0001";
obj1.Extra = "";
obj1.OrderId = 112345234234L;
obj1.PersonalPayPrice = 200L;
obj1.SubChannel = "corp2034925";
obj1.TotalPayPrice = 5200L;
req.ParamBtripFlightPayOrderRq_ = obj1;
AlitripBtripFlightDistributionOrderPayResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripBtripFlightDistributionOrderPayRequest;
$param_btrip_flight_pay_order_rq = new BtripFlightPayOrderRq;
$param_btrip_flight_pay_order_rq->corp_pay_price="5000";
$param_btrip_flight_pay_order_rq->dis_order_id="test0001";
$param_btrip_flight_pay_order_rq->extra="";
$param_btrip_flight_pay_order_rq->order_id="112345234234";
$param_btrip_flight_pay_order_rq->personal_pay_price="200";
$param_btrip_flight_pay_order_rq->sub_channel="corp2034925";
$param_btrip_flight_pay_order_rq->total_pay_price="5200";
$req->setParamBtripFlightPayOrderRq(json_encode($param_btrip_flight_pay_order_rq));
$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.flight.distribution.order.pay' \
-d 'partner_id=apidoc' \
-d 'session=35ed9fde-f159-481c-8c0d-2f44a98793b6' \
-d 'sign=1F216895EEDB01080216967FBBD726CC' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-12-04+01%3A16%3A39' \
-d 'v=2.0' \
-d 'param_btrip_flight_pay_order_rq=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripBtripFlightDistributionOrderPayRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_btrip_flight_pay_order_rq=""
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.flight.distribution.order.pay");
add_param(pRequest,"param_btrip_flight_pay_order_rq","数据结构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.flight.distribution.order.pay', {
'param_btrip_flight_pay_order_rq':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})