From f1c31a1d33a43d48abba4e47ff64a1cf667b2584 Mon Sep 17 00:00:00 2001 From: egan Date: Sat, 29 Sep 2018 18:07:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E5=BA=94=E6=94=AF=E4=BB=98=E6=A1=88?= =?UTF-8?q?=E4=BE=8B=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pay-java-demo/pom.xml | 2 +- .../pay/demo/controller/UnionPayController.java | 14 ++++++++++++-- .../pay/demo/controller/WxPayController.java | 7 ++++++- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/pay-java-demo/pom.xml b/pay-java-demo/pom.xml index db9fec0a..c9087ce1 100644 --- a/pay-java-demo/pom.xml +++ b/pay-java-demo/pom.xml @@ -5,7 +5,7 @@ pay-java-parent com.egzosn - 2.10.3-SNAPSHOT + 2.11.1-SNAPSHOT 4.0.0 war diff --git a/pay-java-demo/src/main/java/com/egzosn/pay/demo/controller/UnionPayController.java b/pay-java-demo/src/main/java/com/egzosn/pay/demo/controller/UnionPayController.java index 3a79ac39..bfbeebf5 100644 --- a/pay-java-demo/src/main/java/com/egzosn/pay/demo/controller/UnionPayController.java +++ b/pay-java-demo/src/main/java/com/egzosn/pay/demo/controller/UnionPayController.java @@ -45,9 +45,19 @@ public void init() { //设置CertSign必须在设置证书前 unionPayConfigStorage.setCertSign(true); //公钥,验签证书链格式: 中级证书路径;根证书路径 - unionPayConfigStorage.setKeyPublic("D:/certs/acp_test_middle.cer;D:/certs/acp_test_root.cer"); +// unionPayConfigStorage.setKeyPublic("D:/certs/acp_test_middle.cer;D:/certs/acp_test_root.cer"); + //中级证书路径 + unionPayConfigStorage.setAcpMiddleCert("D:/certs/acp_test_middle.cer"); + //根证书路径 + unionPayConfigStorage.setAcpRootCert("D:/certs/acp_test_root.cer"); + //私钥, 私钥证书格式: 私钥证书路径;私钥证书对应的密码 - unionPayConfigStorage.setKeyPrivate("D:/certs/acp_test_sign.pfx;000000"); +// unionPayConfigStorage.setKeyPrivate("D:/certs/acp_test_sign.pfx;000000"); + // 私钥证书路径 + unionPayConfigStorage.setKeyPrivateCert("D:/certs/acp_test_sign.pfx"); + //私钥证书对应的密码 + unionPayConfigStorage.setKeyPrivateCertPwd("000000"); + unionPayConfigStorage.setNotifyUrl("http://www.pay.egzosn.com/payBack.json"); // 无需同步回调可不填 app填这个就可以 unionPayConfigStorage.setReturnUrl("http://www.pay.egzosn.com/payBack.json"); diff --git a/pay-java-demo/src/main/java/com/egzosn/pay/demo/controller/WxPayController.java b/pay-java-demo/src/main/java/com/egzosn/pay/demo/controller/WxPayController.java index 591e030c..a991a83e 100644 --- a/pay-java-demo/src/main/java/com/egzosn/pay/demo/controller/WxPayController.java +++ b/pay-java-demo/src/main/java/com/egzosn/pay/demo/controller/WxPayController.java @@ -48,8 +48,13 @@ public class WxPayController { @PostConstruct public void init() { WxPayConfigStorage wxPayConfigStorage = new WxPayConfigStorage(); + wxPayConfigStorage.setAppid("公众账号ID"); + wxPayConfigStorage.setMchId("合作者id(商户号)"); - wxPayConfigStorage.setAppid("应用id"); + //以下两个参数在 服务商版模式中必填-------- +// wxPayConfigStorage.setSubAppid("子商户公众账号ID "); +// wxPayConfigStorage.setSubMchId("微信支付分配的子商户号 "); + //----------------------------------------------- wxPayConfigStorage.setKeyPublic("转账公钥,转账时必填"); wxPayConfigStorage.setSecretKey("密钥"); wxPayConfigStorage.setNotifyUrl("异步回调地址");