AlipayClient alipayClient = new DefaultAlipayClient(
SetAlipayFactory.URL, SetAlipayFactory.APPID,
SetAlipayFactory.RSA_PRIVATE_KEY,
SetAlipayFactory.FORMAT, SetAlipayFactory.CHARSET,
SetAlipayFactory.ALIPAY_PUBLIC_KEY,
SetAlipayFactory.SIGNTYPE);
AlipayTradeCreateRequest request = new AlipayTradeCreateRequest();
//refluxInfo参数
Map<String, Object> refluxInfoMap = new HashMap<String, Object>();
Map<String, Object> sceneDataMap = new HashMap<String, Object>();
refluxInfoMap.put("scene_code", "parking_fee_order");
refluxInfoMap.put("channel", "common_park_provider");
sceneDataMap.put("license_plate", car_number);
sceneDataMap.put("start_time", arrivingTimeStamp);
sceneDataMap.put("parking_lot_id", parking_id);
refluxInfoMap.put("scene_data", sceneDataMap);
JSONObject jsonObj=new JSONObject();
jsonObj.putAll(refluxInfoMap);
String refluxInfoString=jsonObj.toString();
//extendParams参数
Map<String, Object> extendParamsMap = new HashMap<String, Object>();
extendParamsMap.put("sys_service_provider_id", SetAlipayFactory.seller_id);
extendParamsMap.put("industry_reflux_info", refluxInfoString);
//bizContent参数
Map<String, Object> bizContentMap = new HashMap<String, Object>();
bizContentMap.put("out_trade_no", out_trade_no);
bizContentMap.put("subject",subject);
bizContentMap.put("total_amount",total_amount);
bizContentMap.put("timeout_express",timeout_express);
bizContentMap.put("buyer_id",uid);
bizContentMap.put("extend_params", extendParamsMap);
JSONObject jsonbizContent=new JSONObject();
jsonbizContent.putAll(bizContentMap);
request.setBizContent(jsonbizContent.toString());
request.putOtherTextParam("app_auth_token", SetAlipayFactory.app_auth_token);
// 设置异步通知地址
request.setNotifyUrl(SetAlipayFactory.notify_url);
// 设置同步地址
request.setReturnUrl(SetAlipayFactory.return_url);
//统一收单交易创建接口
AlipayTradeCreateResponse response = alipayClient.execute(request);
if(response.isSuccess()){
} else {
}