Skip to content

Commit

Permalink
对应支付案例增加
Browse files Browse the repository at this point in the history
  • Loading branch information
egzosn committed Sep 29, 2018
1 parent 7c1dbb6 commit f1c31a1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pay-java-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>pay-java-parent</artifactId>
<groupId>com.egzosn</groupId>
<version>2.10.3-SNAPSHOT</version>
<version>2.11.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>war</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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("异步回调地址");
Expand Down

0 comments on commit f1c31a1

Please sign in to comment.