diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index 744b9d558..058128651 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -4389,7 +4389,7 @@ - + diff --git a/config/allinPay.properties b/config/allinPay.properties index 3bf64522a..d65daff48 100644 --- a/config/allinPay.properties +++ b/config/allinPay.properties @@ -1,35 +1,56 @@ +#ޣڣ޹˾SZ #̻ͨ () (ʽ) -allinPayMerchantId=200604000011645 +SZ_allinPayMerchantId=200604000011645 #ͨû() (ʽ) -allinPayUsername=20060400001164504 +SZ_allinPayUsername=20060400001164504 #ͨû () (ʽ) -allinPayUserpass=111111 +SZ_allinPayUserpass=111111 #ͨ˽Կ () (ʽ) -allinPayPfxpass=rzdp +SZ_allinPayPfxpass=rzdp #ͨԿ ()(ʽ) -allinPayPathcer=20060400001164504.cer +SZ_allinPayPathcer=20060400001164504.cer #̻ͨ˽Կ·() (ʽ) -allinPayPathpfx=allinpay.p12 +SZ_allinPayPathpfx=allinpay.p12 #ͨտҵ() -allinBusinessCode=19900 +SZ_allinBusinessCode=19900 + +#ޣڣ޹˾TJ +#̻ͨ () (ʽ) +TJ_allinPayMerchantId=200604000011645 + +#ͨû() (ʽ) +TJ_allinPayUsername=20060400001164504 + +#ͨû () (ʽ) +TJ_allinPayUserpass=111111 + +#ͨ˽Կ () (ʽ) +TJ_allinPayPfxpass=rzdp + +#ͨԿ ()(ʽ) +TJ_allinPayPathcer=20060400001164504.cer + +#̻ͨ˽Կ·() (ʽ) +TJ_allinPayPathpfx=allinpay.p12 + +#ͨտҵ() +TJ_allinBusinessCode=19900 + + + +# #ͨԽӿڵַ() allinPayUrl=https://test.allinpaygd.com/aipg/ProcessServlet #ͨԽӿڵַ(ʽ) #allinPayUrl=https://tlt.allinpay.com/aipg/ProcessServle - -#ŷurl() -sendMessageUrl=http://127.0.0.1:8081/apzl_leasing/allinpay/sign?method=allinPaySign&con= -#ŷurl(ʽ) -#sendMessageUrl=https://erp.zjmileasing.com/allinpay/sign?method=allinPaySign&con= - #ͨļַ filePath=/data/files/tmp/allinpay/allinpay_{uuid}_{YYYYMMDD}.txt diff --git a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentQueryRun.java b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentQueryRun.java index 11a13ccf3..1cd326b79 100644 --- a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentQueryRun.java +++ b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentQueryRun.java @@ -46,7 +46,6 @@ public class AllinpayPaymentQueryRun implements Runnable{ private Logger logger = Logger.getLogger(this.getClass()); public AllinpayPaymentQueryRun() { - this.allinpay = new AllinpayProperties(); } /** @@ -71,13 +70,17 @@ public class AllinpayPaymentQueryRun implements Runnable{ } while (size > start) { logger.info("ʼ" + start + "" + (start + maxCount) + "ѭ"); - boLOEDs = bomLCP.createQuery("O.STATUS='ڴ' ").setFirstResult(start).setMaxResults(maxCount).getResultList(true); + boLOEDs = bomLCP.createQuery("O.STATUS='ڴ' ").setFirstResult(start).setMaxResults(maxCount).getResultList(true); + if (boLOEDs == null || boLOEDs.size() == 0) { logger.error("ûҪѯ֧ͨϢ>>>>>>>>>>:"); break; } for (BizObject boLCP : boLOEDs) { try { + BizObject object = JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.LB_PROJECT_INFO").createQuery("O.id=:id").setParameter("id", boLCP.getAttribute("PROJECT_ID").toString()).getSingleResult(false); + + allinpay = new AllinpayProperties(object.getAttribute("subjectid").toString()); String quertSn= boLCP.getAttribute("REQ_SN").toString(); String num = boLCP.getAttribute("NUM").toString(); localFilePath = boLCP.getAttribute("FULLPATH").toString(); diff --git a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentRun.java b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentRun.java index aef7803cc..9fa70a23b 100644 --- a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentRun.java +++ b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentRun.java @@ -36,7 +36,6 @@ public class AllinpayPaymentRun implements Runnable { private Logger logger = Logger.getLogger(this.getClass()); public AllinpayPaymentRun(List> list) { - this.allinpay = new AllinpayProperties(); this.list=list; } @@ -58,6 +57,10 @@ public class AllinpayPaymentRun implements Runnable { String time = DateAssistant.getTodayNow(); for (Map map : list) { try { + + BizObject object = JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.LB_PROJECT_INFO").createQuery("O.id=:id").setParameter("id", map.get("PROJECT_ID")).getSingleResult(false); + allinpay = new AllinpayProperties(object.getAttribute("subjectid").toString()); + BizObject result = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_TLSIGN").createQuery("O.PROJECT_ID=:projectId and SIGN_STATUS='sign_status2'").setParameter("projectId", map.get("PROJECT_ID")).getSingleResult(false); logger.info(">>>>>>>>>>>ͨЭ֧>>>>>>>>PROJECT_ID=" + map.get("PROJECT_ID")); diff --git a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayServiceImpl.java b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayServiceImpl.java index b74d748d5..99f074be7 100644 --- a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayServiceImpl.java +++ b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayServiceImpl.java @@ -25,13 +25,15 @@ public class AllinpayServiceImpl implements AllinpayService { String phoneNumber = ""; String accNumber = ""; String certId = ""; - String sql = "SELECT ca.account customername,ca.mobile phonenumber,ca.acc_number accNumber,ca.certid certId FROM lb_project_info lpi LEFT JOIN customer_account ca ON ca.project_id=lpi.ID WHERE lpi.id=:Id"; + String subjectid = ""; + String sql = "SELECT lpi.subjectid,ca.account customername,ca.mobile phonenumber,ca.acc_number accNumber,ca.certid certId FROM lb_project_info lpi LEFT JOIN customer_account ca ON ca.project_id=lpi.ID WHERE lpi.id=:Id"; Transaction Sqlca = Transaction.createTransaction("als"); SqlObject sqlObject = new SqlObject(sql); sqlObject.setParameter("Id", projectId); ASResultSet resultSet = allinpayDao.getASResultSet(Sqlca,sqlObject); try { while (resultSet.next()) { + subjectid = resultSet.getString("subjectid"); userName = resultSet.getString("customername"); phoneNumber = resultSet.getString("phonenumber"); accNumber = resultSet.getString("accNumber"); @@ -67,6 +69,7 @@ public class AllinpayServiceImpl implements AllinpayService { map.put("accNumber", accNumber); map.put("phoneNumber", phoneNumber); map.put("certId", certId); + map.put("subjectid", subjectid); return map; } @@ -79,13 +82,15 @@ public class AllinpayServiceImpl implements AllinpayService { public Map allinPaySigning(String projectId) throws Exception { Map map = new HashMap(); String phoneNumber = ""; - String sql = "SELECT ca.mobile phonenumber FROM lb_project_info lpi LEFT JOIN customer_account ca ON ca.project_id=lpi.ID WHERE lpi.id=:Id"; + String subjectid = ""; + String sql = "SELECT lpi.subjectid,ca.mobile phonenumber FROM lb_project_info lpi LEFT JOIN customer_account ca ON ca.project_id=lpi.ID WHERE lpi.id=:Id"; Transaction Sqlca = Transaction.createTransaction("als"); SqlObject sqlObject = new SqlObject(sql); sqlObject.setParameter("Id", projectId); ASResultSet resultSet = allinpayDao.getASResultSet(Sqlca,sqlObject); try { while (resultSet.next()) { + subjectid = resultSet.getString("subjectid"); phoneNumber = resultSet.getString("phonenumber"); } } catch (SQLException e) { @@ -112,6 +117,7 @@ public class AllinpayServiceImpl implements AllinpayService { throw new Exception("ΪգϵҵԱ"); } map.put("phoneNumber", phoneNumber); + map.put("subjectid", subjectid); return map; } diff --git a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpaySignService.java b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpaySignService.java index 3c0cb1be2..49ead258d 100644 --- a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpaySignService.java +++ b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpaySignService.java @@ -21,18 +21,20 @@ import com.tenwa.lease.app.allinpay.util.AllinpayProperties; * ͨЭǩԼѯ */ public class AllinpaySignService { - public String contractNumber; + public String projectId; public String accountNo; public Logger logger = Logger.getLogger(this.getClass()); @SuppressWarnings({ "unchecked" }) public String allinPayQuery(JBOTransaction tx) throws Exception { - AllinpayProperties allinpay = new AllinpayProperties(); - String message = contractNumber; + BizObject object = JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.LB_PROJECT_INFO", tx).createQuery("O.id=:id").setParameter("id", projectId).getSingleResult(false); + + AllinpayProperties allinpay = new AllinpayProperties(object.getAttribute("subjectid").toString()); + String message = projectId; try { BizObjectManager bomLCT = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_TLSIGN", tx); - List boLCTs = bomLCT.createQuery("O.CONTRACT_NUMBER=:contractNumber").setParameter("contractNumber", contractNumber).getResultList(true); + List boLCTs = bomLCT.createQuery("O.PROJECT_ID=:projectId").setParameter("projectId", projectId).getResultList(true); BizObject boLCT; if(boLCTs==null||boLCTs.size()==0) { message = "success"; @@ -81,18 +83,18 @@ public class AllinpaySignService { } catch (Exception e1) { e1.printStackTrace(); } - message=contractNumber; + message=projectId; e.printStackTrace(); } return message; } - public String getContractNumber() { - return contractNumber; + public String getProjectId() { + return projectId; } - public void setContractNumber(String contractNumber) { - this.contractNumber = contractNumber; + public void setProjectId(String projectId) { + this.projectId = projectId; } public String getAccountNo() { diff --git a/src/com/tenwa/lease/app/allinpay/servlet/AllinpayServlet.java b/src/com/tenwa/lease/app/allinpay/servlet/AllinpayServlet.java index f489b0bb3..99d4ceb19 100644 --- a/src/com/tenwa/lease/app/allinpay/servlet/AllinpayServlet.java +++ b/src/com/tenwa/lease/app/allinpay/servlet/AllinpayServlet.java @@ -5,7 +5,6 @@ import java.sql.SQLException; import java.util.HashMap; import java.util.Map; -import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; @@ -35,7 +34,7 @@ public class AllinpayServlet extends BaseServlet { private static final long serialVersionUID = 1L; - private AllinpayProperties factory = new AllinpayProperties(); + private AllinpayProperties factory ; private AllinpayService allinpayService = new AllinpayServiceImpl(); @@ -48,6 +47,8 @@ public class AllinpayServlet extends BaseServlet { String projectId = request.getParameter("projectId"); Map xmlMap = allinpayService.allinPaySendMessages(projectId); String phoneNumber = xmlMap.get("phoneNumber"); + String subjectid = xmlMap.get("subjectid"); + factory = new AllinpayProperties(subjectid); Map map = factory.allinPaySendMessages(xmlMap); @@ -113,6 +114,8 @@ public class AllinpayServlet extends BaseServlet { String projectId = request.getParameter("projectId"); Map messageMap = allinpayService.allinPaySigning(projectId); String phoneNumber = messageMap.get("phoneNumber"); + String subjectid = messageMap.get("subjectid"); + factory = new AllinpayProperties(subjectid); String time = DateAssistant.getTodayNow(); Cookie[] cookies = request.getCookies(); diff --git a/src/com/tenwa/lease/app/allinpay/util/AllinpayProperties.java b/src/com/tenwa/lease/app/allinpay/util/AllinpayProperties.java index 37f5d3487..c3082b356 100644 --- a/src/com/tenwa/lease/app/allinpay/util/AllinpayProperties.java +++ b/src/com/tenwa/lease/app/allinpay/util/AllinpayProperties.java @@ -1,15 +1,11 @@ package com.tenwa.lease.app.allinpay.util; -import java.security.Provider; -import java.text.SimpleDateFormat; -import java.util.Date; import java.util.HashMap; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.allinpay.util.AIPGSignature; import com.allinpay.util.DemoUtil; import com.allinpay.util.HttpUtil; import com.allinpay.xml.XmlParser; @@ -20,10 +16,45 @@ import com.allinpay.xstruct.quickpay.FAGRCEXT; import com.allinpay.xstruct.quickpay.FASTTRX; import com.allinpay.xstruct.stdagr.QAGRINFO; import com.allinpay.xstruct.trans.qry.TransQueryReq; +import com.tenwa.util.MultiSubjectUtil; public class AllinpayProperties { private static final Logger logger = LoggerFactory.getLogger(AllinpayProperties.class); + + private String allinPayMerchantId; + + private String allinPayUsername; + + private String allinPayUserpass; + + private String allinPayPfxpass; + + private String allinPayPathpfx; + + private String allinBusinessCode; + + private String allinPayUrl; + + public AllinpayProperties(String channel) { + logger.info("ͨ"+channel); + if(channel.equals(MultiSubjectUtil.SZSUBJECTID)) { + this.allinPayMerchantId=ConfigConstant.SZ_allinPayMerchantId; + this.allinPayUsername=ConfigConstant.SZ_allinPayUsername; + this.allinPayUserpass=ConfigConstant.SZ_allinPayUserpass; + this.allinPayPfxpass=ConfigConstant.SZ_allinPayPfxpass; + this.allinPayPathpfx=ConfigConstant.SZ_allinPayPathpfx; + this.allinBusinessCode=ConfigConstant.SZ_allinBusinessCode; + }else if(channel.equals(MultiSubjectUtil.TJSUBJECTID)) { + this.allinPayMerchantId=ConfigConstant.TJ_allinPayMerchantId; + this.allinPayUsername=ConfigConstant.TJ_allinPayUsername; + this.allinPayUserpass=ConfigConstant.TJ_allinPayUserpass; + this.allinPayPfxpass=ConfigConstant.TJ_allinPayPfxpass; + this.allinPayPathpfx=ConfigConstant.TJ_allinPayPathpfx; + this.allinBusinessCode=ConfigConstant.TJ_allinBusinessCode; + } + this.allinPayUrl=ConfigConstant.allinPayUrl; + } /** * ͨǩԼ @@ -36,20 +67,20 @@ public class AllinpayProperties { Map map = new HashMap<>(); map.put("message", "error"); try { - InfoReq infoReq = DemoUtil.makeReq("310002", ConfigConstant.allinPayMerchantId, ConfigConstant.allinPayUsername, ConfigConstant.allinPayUserpass); + InfoReq infoReq = DemoUtil.makeReq("310002", allinPayMerchantId, allinPayUsername, allinPayUserpass); FAGRCEXT fagrcext = new FAGRCEXT(); fagrcext.setSRCREQSN(mapXml.get("reqSn")); fagrcext.setVERCODE(mapXml.get("verCode")); - fagrcext.setMERCHANT_ID(ConfigConstant.allinPayMerchantId); + fagrcext.setMERCHANT_ID(allinPayMerchantId); AipgReq aipgReq = new AipgReq(); aipgReq.setINFO(infoReq); aipgReq.addTrx(fagrcext); String xml = XmlParser.toXml(aipgReq); String path = Thread.currentThread().getContextClassLoader().getResource("/").getPath(); - String signedXml = DemoUtil.buildSignedXml(xml, path + ConfigConstant.allinPayPathpfx, ConfigConstant.allinPayPfxpass); - String url = ConfigConstant.allinPayUrl + "?MERCHANT_ID=" + ConfigConstant.allinPayMerchantId + "&REQ_SN=" + infoReq.getREQ_SN(); + String signedXml = DemoUtil.buildSignedXml(xml, path + allinPayPathpfx, allinPayPfxpass); + String url = allinPayUrl + "?MERCHANT_ID=" + allinPayMerchantId + "&REQ_SN=" + infoReq.getREQ_SN(); String requestContent = signedXml + url; map.put("request", requestContent); logger.info("ͨ>>>>>>>>>>>" + signedXml); @@ -79,7 +110,7 @@ public class AllinpayProperties { Map map = new HashMap<>(); map.put("message", "error"); try { - InfoReq infoReq = DemoUtil.makeReq("310001", ConfigConstant.allinPayMerchantId, ConfigConstant.allinPayUsername, ConfigConstant.allinPayUserpass); + InfoReq infoReq = DemoUtil.makeReq("310001", allinPayMerchantId, allinPayUsername, allinPayUserpass); FAGRA fagra = new FAGRA(); fagra.setACCOUNT_NAME(mapXml.get("userName")); @@ -90,14 +121,14 @@ public class AllinpayProperties { fagra.setID_TYPE("0"); fagra.setACCOUNT_TYPE("00"); - fagra.setMERCHANT_ID(ConfigConstant.allinPayMerchantId); + fagra.setMERCHANT_ID(allinPayMerchantId); AipgReq aipgReq = new AipgReq(); aipgReq.setINFO(infoReq); aipgReq.addTrx(fagra); String xml = XmlParser.toXml(aipgReq); String path = Thread.currentThread().getContextClassLoader().getResource("/").getPath(); - String signedXml = DemoUtil.buildSignedXml(xml, path + ConfigConstant.allinPayPathpfx, ConfigConstant.allinPayPfxpass); - String url = ConfigConstant.allinPayUrl + "?MERCHANT_ID=" + ConfigConstant.allinPayMerchantId + "&REQ_SN=" + infoReq.getREQ_SN(); + String signedXml = DemoUtil.buildSignedXml(xml, path + allinPayPathpfx, allinPayPfxpass); + String url = allinPayUrl + "?MERCHANT_ID=" + allinPayMerchantId + "&REQ_SN=" + infoReq.getREQ_SN(); String requestContent = signedXml + url; map.put("request", requestContent); logger.info("ͨ>>>>>>>>>>>" + signedXml); @@ -127,11 +158,11 @@ public class AllinpayProperties { Map map = new HashMap<>(); map.put("message", "error"); try { - InfoReq infoReq = DemoUtil.makeReq("340009", ConfigConstant.allinPayMerchantId, ConfigConstant.allinPayUsername, ConfigConstant.allinPayUserpass); + InfoReq infoReq = DemoUtil.makeReq("340009", allinPayMerchantId, allinPayUsername, allinPayUserpass); QAGRINFO qagrInfo = new QAGRINFO(); qagrInfo.setACCOUNT_NO(mapXml.get("accountNo")); - qagrInfo.setMERCHANT_ID(ConfigConstant.allinPayMerchantId); + qagrInfo.setMERCHANT_ID(allinPayMerchantId); qagrInfo.setAGRTYPE("01"); qagrInfo.setQUERY_MODE("3"); @@ -140,8 +171,8 @@ public class AllinpayProperties { aipgReq.addTrx(qagrInfo); String xml = XmlParser.toXml(aipgReq); String path = Thread.currentThread().getContextClassLoader().getResource("/").getPath(); - String signedXml = DemoUtil.buildSignedXml(xml, path + ConfigConstant.allinPayPathpfx, ConfigConstant.allinPayPfxpass); - String url = ConfigConstant.allinPayUrl + "?MERCHANT_ID=" + ConfigConstant.allinPayMerchantId + "&REQ_SN=" + infoReq.getREQ_SN(); + String signedXml = DemoUtil.buildSignedXml(xml, path + allinPayPathpfx, allinPayPfxpass); + String url = allinPayUrl + "?MERCHANT_ID=" + allinPayMerchantId + "&REQ_SN=" + infoReq.getREQ_SN(); String requestContent = signedXml + url; map.put("request", requestContent); logger.info("ͨ>>>>>>>>>>>" + signedXml); @@ -170,11 +201,11 @@ public class AllinpayProperties { Map map = new HashMap<>(); map.put("message", "error"); try { - InfoReq infoReq = DemoUtil.makeReq("310011", ConfigConstant.allinPayMerchantId, ConfigConstant.allinPayUsername, ConfigConstant.allinPayUserpass); + InfoReq infoReq = DemoUtil.makeReq("310011", allinPayMerchantId, allinPayUsername, allinPayUserpass); FASTTRX ft = new FASTTRX(); - ft.setMERCHANT_ID(ConfigConstant.allinPayMerchantId); - ft.setBUSINESS_CODE(ConfigConstant.allinBusinessCode);// Ϊ19900 ǻΪ10702 + ft.setMERCHANT_ID(allinPayMerchantId); + ft.setBUSINESS_CODE(allinBusinessCode);// Ϊ19900 ǻΪ10702 ft.setSUBMIT_TIME(DemoUtil.getNow()); ft.setAGRMNO(mapXml.get("AGRMNO").toString());//֧Э ft.setACCOUNT_NAME(mapXml.get("ACCOUNT_NAME"));//˻ @@ -187,8 +218,8 @@ public class AllinpayProperties { aipgReq.addTrx(ft); String xml = XmlParser.toXml(aipgReq); String path = Thread.currentThread().getContextClassLoader().getResource("/").getPath(); - String signedXml = DemoUtil.buildSignedXml(xml, path + ConfigConstant.allinPayPathpfx, ConfigConstant.allinPayPfxpass); - String url = ConfigConstant.allinPayUrl + "?MERCHANT_ID=" + ConfigConstant.allinPayMerchantId + "&REQ_SN=" + infoReq.getREQ_SN(); + String signedXml = DemoUtil.buildSignedXml(xml, path + allinPayPathpfx, allinPayPfxpass); + String url = allinPayUrl + "?MERCHANT_ID=" + allinPayMerchantId + "&REQ_SN=" + infoReq.getREQ_SN(); String requestContent = signedXml + url; map.put("request", requestContent); String reqSn = infoReq.getREQ_SN(); @@ -219,19 +250,19 @@ public class AllinpayProperties { Map map = new HashMap<>(); map.put("message", "error"); try { - InfoReq infoReq = DemoUtil.makeReq("200004", ConfigConstant.allinPayMerchantId, ConfigConstant.allinPayUsername, ConfigConstant.allinPayUserpass); + InfoReq infoReq = DemoUtil.makeReq("200004", allinPayMerchantId, allinPayUsername, allinPayUserpass); TransQueryReq queryReq = new TransQueryReq(); queryReq.setQUERY_SN(mapXml.get("quertSn"));//֧ʱˮ - queryReq.setMERCHANT_ID(ConfigConstant.allinPayMerchantId); + queryReq.setMERCHANT_ID(allinPayMerchantId); AipgReq aipgReq = new AipgReq(); aipgReq.setINFO(infoReq); aipgReq.addTrx(queryReq); String xml = XmlParser.toXml(aipgReq); String path = Thread.currentThread().getContextClassLoader().getResource("/").getPath(); - String signedXml = DemoUtil.buildSignedXml(xml, path + ConfigConstant.allinPayPathpfx, ConfigConstant.allinPayPfxpass); - String url = ConfigConstant.allinPayUrl + "?MERCHANT_ID=" + ConfigConstant.allinPayMerchantId + "&REQ_SN=" + infoReq.getREQ_SN(); + String signedXml = DemoUtil.buildSignedXml(xml, path + allinPayPathpfx, allinPayPfxpass); + String url = allinPayUrl + "?MERCHANT_ID=" + allinPayMerchantId + "&REQ_SN=" + infoReq.getREQ_SN(); String requestContent = signedXml + url; map.put("request", requestContent); logger.info("ͨ>>>>>>>>>>>" + signedXml); @@ -249,40 +280,4 @@ public class AllinpayProperties { return map; } - /** - * ͨ۶ļ - * - * @param settdayҪѯڣʽ20180911ֻܲѯ40֮ڵ - * @return - */ - public Map allinReconciliationFileDownload(String settday) { - logger.info("ʼͨۼ򵥶˽ӿ"); - Map map = new HashMap<>(); - map.put("message", "error"); - Provider prvd = null; - String url = ConfigConstant.allinUrlFileGet; - String reqtime = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()); - String contfee = "1"; - String sign = ""; - contfee = settday + "|" + reqtime + "|" + ConfigConstant.allinPayMerchantId; - String fileSt = ""; - try { - AIPGSignature signature = new AIPGSignature(prvd); - String path = Thread.currentThread().getContextClassLoader().getResource("/").getPath(); - sign = signature.signMsg(contfee, path + ConfigConstant.allinPayPathpfx, ConfigConstant.allinPayPfxpass); - url = url.replaceAll("@xxx", settday).replaceAll("@yyy", reqtime).replaceAll("@zzz", ConfigConstant.allinPayMerchantId) - .replaceAll("@sss", sign); - logger.info("ַͨ>>>>>>>>>>>" + url); - fileSt = HttpUtil.post("", url); - map.put("msg",fileSt); - map.put("message","success"); - } catch (Exception e) { - logger.error("ͨۼ򵥶˽ӿʧܣϵͳ쳣ͨ쳣:" + e.getMessage()); - e.printStackTrace(); - map.put("msg", e.getMessage()); - return map; - } - logger.info("ͨۼ򵥶˽ӿ"); - return map; - } } diff --git a/src/com/tenwa/lease/app/allinpay/util/ConfigConstant.java b/src/com/tenwa/lease/app/allinpay/util/ConfigConstant.java index b048c6b42..eddf73e36 100644 --- a/src/com/tenwa/lease/app/allinpay/util/ConfigConstant.java +++ b/src/com/tenwa/lease/app/allinpay/util/ConfigConstant.java @@ -11,35 +11,52 @@ public class ConfigConstant { private static final Logger logger = LoggerFactory.getLogger(ConfigConstant.class); // ̻ͨ - public final static String allinPayMerchantId; + public final static String SZ_allinPayMerchantId; // ͨû - public final static String allinPayUsername; + public final static String SZ_allinPayUsername; // ͨû - public final static String allinPayUserpass; + public final static String SZ_allinPayUserpass; // ͨ˽Կ - public final static String allinPayPfxpass; + public final static String SZ_allinPayPfxpass; // ͨԿ - public final static String allinPayPathcer; + public final static String SZ_allinPayPathcer; // ̻ͨ˽Կ· - public final static String allinPayPathpfx; + public final static String SZ_allinPayPathpfx; + + // ͨտҵ + public final static String SZ_allinBusinessCode; + + + // ̻ͨ + public final static String TJ_allinPayMerchantId; + + // ͨû + public final static String TJ_allinPayUsername; + + // ͨû + public final static String TJ_allinPayUserpass; + + // ͨ˽Կ + public final static String TJ_allinPayPfxpass; + + // ͨԿ + public final static String TJ_allinPayPathcer; + + // ̻ͨ˽Կ· + public final static String TJ_allinPayPathpfx; + + // ͨտҵ + public final static String TJ_allinBusinessCode; + // ͨԽӿڵַ public final static String allinPayUrl; - // ͨļĽӿڵַ - public final static String allinUrlFileGet; - - // ͨտҵ - public final static String allinBusinessCode; - - //ûurl - public final static String sendMessageUrl; - //ûurl public final static String filePath; @@ -51,16 +68,23 @@ public class ConfigConstant { e.printStackTrace(); } logger.info("ͨļ:" + prop.toString()); - allinPayMerchantId = prop.getProperty("allinPayMerchantId"); - allinPayUsername = prop.getProperty("allinPayUsername"); - allinPayUserpass = prop.getProperty("allinPayUserpass"); - allinPayPfxpass = prop.getProperty("allinPayPfxpass"); - allinPayPathcer = prop.getProperty("allinPayPathcer"); - allinPayPathpfx = prop.getProperty("allinPayPathpfx"); + SZ_allinPayMerchantId = prop.getProperty("SZ_allinPayMerchantId"); + SZ_allinPayUsername = prop.getProperty("SZ_allinPayUsername"); + SZ_allinPayUserpass = prop.getProperty("SZ_allinPayUserpass"); + SZ_allinPayPfxpass = prop.getProperty("SZ_allinPayPfxpass"); + SZ_allinPayPathcer = prop.getProperty("SZ_allinPayPathcer"); + SZ_allinPayPathpfx = prop.getProperty("SZ_allinPayPathpfx"); + SZ_allinBusinessCode = prop.getProperty("SZ_allinBusinessCode"); + + TJ_allinPayMerchantId = prop.getProperty("TJ_allinPayMerchantId"); + TJ_allinPayUsername = prop.getProperty("TJ_allinPayUsername"); + TJ_allinPayUserpass = prop.getProperty("TJ_allinPayUserpass"); + TJ_allinPayPfxpass = prop.getProperty("TJ_allinPayPfxpass"); + TJ_allinPayPathcer = prop.getProperty("TJ_allinPayPathcer"); + TJ_allinPayPathpfx = prop.getProperty("TJ_allinPayPathpfx"); + TJ_allinBusinessCode = prop.getProperty("TJ_allinBusinessCode"); + allinPayUrl = prop.getProperty("allinPayUrl"); - allinUrlFileGet = prop.getProperty("allinUrlFileGet"); - allinBusinessCode = prop.getProperty("allinBusinessCode"); - sendMessageUrl = prop.getProperty("sendMessageUrl"); filePath = prop.getProperty("filePath"); } diff --git a/src_jbo/jbo/app/tenwa/calc/LC_CARD_PAYMENT.java b/src_jbo/jbo/app/tenwa/calc/LC_CARD_PAYMENT.java index e4e67f116..b81d9ad38 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_CARD_PAYMENT.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_CARD_PAYMENT.java @@ -18,9 +18,9 @@ public interface LC_CARD_PAYMENT{ */ public static final String ID = "ID"; /** - * ͬ STRING(20)
+ * ĿID STRING(20)
*/ - public static final String CONTRACT_NUMBER = "CONTRACT_NUMBER"; + public static final String PROJECT_ID = "PROJECT_ID"; /** * ۿ״̬ STRING(20)
*/