TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
VmarketEticketBeforeconsumeRequest req = new VmarketEticketBeforeconsumeRequest();
req.setOrderId(1231223333L);
req.setVerifyCode("abc");
req.setToken("ca2bf41f1910a9c359370ebf87caeafd");
req.setCodemerchantId(2054573190L);
req.setPosid("1111111111");
req.setMobile("1234");
VmarketEticketBeforeconsumeResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
VmarketEticketBeforeconsumeRequest req = new VmarketEticketBeforeconsumeRequest();
req.OrderId = 1231223333L;
req.VerifyCode = "abc";
req.Token = "ca2bf41f1910a9c359370ebf87caeafd";
req.CodemerchantId = 2054573190L;
req.Posid = "1111111111";
req.Mobile = "1234";
VmarketEticketBeforeconsumeResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new VmarketEticketBeforeconsumeRequest;
$req->setOrderId("1231223333");
$req->setVerifyCode("abc");
$req->setToken("ca2bf41f1910a9c359370ebf87caeafd");
$req->setCodemerchantId("2054573190");
$req->setPosid("1111111111");
$req->setMobile("1234");
$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.vmarket.eticket.beforeconsume' \
-d 'partner_id=apidoc' \
-d 'session=4fba2b72-ff83-4d5e-bccf-9933c2f82c35' \
-d 'sign=E57144B6820B47E07152C205AD91F197' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-27+14%3A19%3A27' \
-d 'v=2.0' \
-d 'codemerchant_id=2054573190' \
-d 'mobile=1234' \
-d 'order_id=1231223333' \
-d 'posid=1111111111' \
-d 'token=ca2bf41f1910a9c359370ebf87caeafd' \
-d 'verify_code=abc'
# -*- coding: utf-8 -*-
import top.api
req=top.api.VmarketEticketBeforeconsumeRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.order_id=1231223333
req.verify_code="abc"
req.token="ca2bf41f1910a9c359370ebf87caeafd"
req.codemerchant_id=2054573190
req.posid="1111111111"
req.mobile="1234"
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.vmarket.eticket.beforeconsume");
add_param(pRequest,"order_id","1231223333");
add_param(pRequest,"verify_code","abc");
add_param(pRequest,"token","ca2bf41f1910a9c359370ebf87caeafd");
add_param(pRequest,"codemerchant_id","2054573190");
add_param(pRequest,"posid","1111111111");
add_param(pRequest,"mobile","1234");
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.vmarket.eticket.beforeconsume', {
'order_id':'1231223333',
'verify_code':'abc',
'token':'ca2bf41f1910a9c359370ebf87caeafd',
'codemerchant_id':'2054573190',
'posid':'1111111111',
'mobile':'1234'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})