TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaMosPaymentPlatformUnitpayRequest req = new AlibabaMosPaymentPlatformUnitpayRequest();
AlibabaMosPaymentPlatformUnitpayRequest.TradePayParam obj1 = new AlibabaMosPaymentPlatformUnitpayRequest.TradePayParam();
obj1.setSubject("工程物业缴费");
AlibabaMosPaymentPlatformUnitpayRequest.ExtUserInfo obj2 = new AlibabaMosPaymentPlatformUnitpayRequest.ExtUserInfo();
obj2.setCertNo("2342342323");
obj2.setCertType("2329203928291010");
obj2.setMinAge("16");
obj2.setMobile("1682349823429");
obj2.setName("张三");
obj2.setFixBuyer("F");
obj2.setNeedCheckInfo("T");
obj1.setExtUserInfo(obj2);
obj1.setTimeExpire("2024-07-16 15:23:53");
obj1.setTotalAmount(10002L);
obj1.setStoreNo("E09");
obj1.setCompanyId(15L);
obj1.setExtPrams("{ \"serviceStoreNo\":\"HZ01\" }");
obj1.setAppType(2L);
obj1.setTradePayType(1L);
obj1.setBillNo("PROJECT_2024071613293848");
obj1.setTradeType(5L);
obj1.setThirdTradeType("EngPropMgmtFeePmt");
req.setTradePayParam(obj1);
AlibabaMosPaymentPlatformUnitpayResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaMosPaymentPlatformUnitpayRequest req = new AlibabaMosPaymentPlatformUnitpayRequest();
AlibabaMosPaymentPlatformUnitpayRequest.TradePayParamDomain obj1 = new AlibabaMosPaymentPlatformUnitpayRequest.TradePayParamDomain();
obj1.Subject = "工程物业缴费";
AlibabaMosPaymentPlatformUnitpayRequest.ExtUserInfoDomain obj2 = new AlibabaMosPaymentPlatformUnitpayRequest.ExtUserInfoDomain();
obj2.CertNo = "2342342323";
obj2.CertType = "2329203928291010";
obj2.MinAge = "16";
obj2.Mobile = "1682349823429";
obj2.Name = "张三";
obj2.FixBuyer = "F";
obj2.NeedCheckInfo = "T";
obj1.ExtUserInfo= obj2;
obj1.TimeExpire = "2024-07-16 15:23:53";
obj1.TotalAmount = 10002L;
obj1.StoreNo = "E09";
obj1.CompanyId = 15L;
obj1.ExtPrams = "{ \"serviceStoreNo\":\"HZ01\" }";
obj1.AppType = 2L;
obj1.TradePayType = 1L;
obj1.BillNo = "PROJECT_2024071613293848";
obj1.TradeType = 5L;
obj1.ThirdTradeType = "EngPropMgmtFeePmt";
req.TradePayParam_ = obj1;
AlibabaMosPaymentPlatformUnitpayResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaMosPaymentPlatformUnitpayRequest;
$trade_pay_param = new TradePayParam;
$trade_pay_param->subject="工程物业缴费";
$ext_user_info = new ExtUserInfo;
$ext_user_info->cert_no="2342342323";
$ext_user_info->cert_type="2329203928291010";
$ext_user_info->min_age="16";
$ext_user_info->mobile="1682349823429";
$ext_user_info->name="张三";
$ext_user_info->fix_buyer="F";
$ext_user_info->need_check_info="T";
$trade_pay_param->ext_user_info = $ext_user_info;
$trade_pay_param->time_expire="2024-07-16 15:23:53";
$trade_pay_param->total_amount="10002";
$trade_pay_param->store_no="E09";
$trade_pay_param->company_id="15";
$trade_pay_param->ext_prams="{ \"serviceStoreNo\":\"HZ01\" }";
$trade_pay_param->app_type="2";
$trade_pay_param->trade_pay_type="1";
$trade_pay_param->bill_no="PROJECT_2024071613293848";
$trade_pay_param->trade_type="5";
$trade_pay_param->third_trade_type="EngPropMgmtFeePmt";
$req->setTradePayParam(json_encode($trade_pay_param));
$resp = $c->execute($req);
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=alibaba.mos.payment.platform.unitpay' \
-d 'partner_id=apidoc' \
-d 'sign=01CB9F22EA59F678A2066C89EF70F3B3' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-06-08+01%3A56%3A00' \
-d 'v=2.0' \
-d 'trade_pay_param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaMosPaymentPlatformUnitpayRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.trade_pay_param="数据结构示例JSON格式"
try:
resp= req.getResponse()
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,"alibaba.mos.payment.platform.unitpay");
add_param(pRequest,"trade_pay_param","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,NULL);
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('alibaba.mos.payment.platform.unitpay', {
'trade_pay_param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})