Skip to content

Commit

Permalink
2.14.1
Browse files Browse the repository at this point in the history
  • Loading branch information
egzosn committed Feb 24, 2021
1 parent 7de62e4 commit 5e96692
Show file tree
Hide file tree
Showing 62 changed files with 107 additions and 101 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<dependency>
<groupId>com.egzosn</groupId>
<artifactId>{module-name}</artifactId>
<version>2.13.3-b1</version>
<version>2.14.1</version>
</dependency>

```
Expand Down
6 changes: 4 additions & 2 deletions pay-java-ali/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

AliPayConfigStorage aliPayConfigStorage = new AliPayConfigStorage();
aliPayConfigStorage.setPid("合作者id");
aliPayConfigStorage.setAppid("应用id");
aliPayConfigStorage.setAppId("应用id");
// aliPayConfigStorage.setAppAuthToken("ISV代商户代用,指定appAuthToken");
aliPayConfigStorage.setKeyPublic("支付宝公钥");
aliPayConfigStorage.setKeyPrivate("应用私钥");
aliPayConfigStorage.setNotifyUrl("异步回调地址");
Expand All @@ -27,7 +28,8 @@

AliPayConfigStorage aliPayConfigStorage = new AliPayConfigStorage();
aliPayConfigStorage.setPid("合作者id");
aliPayConfigStorage.setAppid("应用id");
aliPayConfigStorage.setAppId("应用id");
// aliPayConfigStorage.setAppAuthToken("ISV代商户代用,指定appAuthToken");
aliPayConfigStorage.setKeyPrivate("应用私钥");
//设置为证书方式
aliPayConfigStorage.setCertSign(true);
Expand Down
2 changes: 1 addition & 1 deletion pay-java-ali/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.13.4-SNAPSHOT</version>
<version>2.14.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pay-java-ali</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ private Map<String, Object> setExpirationTime(Map<String, Object> bizContent, Pa
*/
private Map<String, Object> getPublicParameters(TransactionType transactionType) {
Map<String, Object> orderInfo = new TreeMap<>();
orderInfo.put("app_id", payConfigStorage.getAppid());
orderInfo.put("app_id", payConfigStorage.getAppId());
orderInfo.put("method", transactionType.getMethod());
orderInfo.put("charset", payConfigStorage.getInputCharset());
orderInfo.put("timestamp", DateUtils.format(new Date()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class AntCertificationUtil {
*
* @param certContent 需要验证的目标证书或者证书链
* @param rootCertContent 可信根证书列表
* @return 是否校验成功
*/
public static boolean isTrusted(String certContent, String rootCertContent) {
X509Certificate[] certificates;
Expand Down
2 changes: 1 addition & 1 deletion pay-java-ali/src/test/java/PayTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static void main(String[] args) {

AliPayConfigStorage aliPayConfigStorage = new AliPayConfigStorage();
aliPayConfigStorage.setPid("合作者id");
aliPayConfigStorage.setAppid("应用id");
aliPayConfigStorage.setAppId("应用id");
//普通公钥方式与证书公钥方式为两者取其一的方式
keyPublic(aliPayConfigStorage);
// certKeyPublic(aliPayConfigStorage);
Expand Down
2 changes: 1 addition & 1 deletion pay-java-baidu/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.13.4-SNAPSHOT</version>
<version>2.14.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pay-java-baidu</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public Map<String, Object> getUseQueryPay() {
String appKey = payConfigStorage.getAppKey();
Map<String, Object> result = new HashMap<>();
result.put(APP_KEY, appKey);
result.put(APP_ID, payConfigStorage.getAppid());
result.put(APP_ID, payConfigStorage.getAppId());
return result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public String getBizRefundBatchId() {

/**
* 业务方退款批次id,退款业务流水唯一编号,发起部分退款时必传
* @param bizRefundBatchId 业务方退款批次id
*/
public void setBizRefundBatchId(String bizRefundBatchId) {
setRefundNo(bizRefundBatchId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class BaiduPayServiceTest {
@Test
public void orderInfo() {
BaiduPayConfigStorage configStorage = new BaiduPayConfigStorage();
configStorage.setAppid("APP ID");
configStorage.setAppId("APP ID");
configStorage.setAppKey("APP KEY");
configStorage.setDealId("DEAL ID");
configStorage.setKeyPublic("KEY PUBLIC");
Expand Down
2 changes: 1 addition & 1 deletion pay-java-common/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.13.4-SNAPSHOT</version>
<version>2.14.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* 支付基础配置存储
*
* @author: egan
* @author egan
* <pre>
* email [email protected]
* date 2017/3/5 20:33
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/**
* 支付基础服务
*
* @author: egan
* @author egan
* <pre>
* email [email protected]
* date 2017/3/5 20:36
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/**
* 回调,可用于类型转换
* @author: egan
* @author egan
* <pre>
* email [email protected]
* date 2017/3/7 18:55
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
/**
* 账单类型
* @author Egan
* @email [email protected]
* @date 2021/2/22
* <pre>
* email [email protected]
* date 2021/2/22
* </pre>
*/
public interface BillType {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package com.egzosn.pay.common.bean;

/**
* @author: egan
* @author egan
* <pre>
* email [email protected]
* date 2017/2/7 9:52
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* 签名类型
*
* @author: egan
* @author egan
* <pre>
* email [email protected]
* date 2019/12/08 13:30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import com.egzosn.pay.common.bean.PayOutMessage;

/**
* @author: egan
* @author egan
* <pre>
* email [email protected]
* date 2017/1/13 14:30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* 支付异常
* @author: egan
* @author egan
* <pre>
* email [email protected]
* date 2017/3/7 12:32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
/**
* 一个HTTP请求的客户端
*
* @author: egan
* @author egan
* <pre>
* email [email protected]
* date 2017/3/4 17:56
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* HTTP 配置
* @author: egan
* @author egan
* <pre>
* email [email protected]
* date 2017/3/3 20:48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

/**
* http请求工具
* @author: egan
* @author egan
* <code>
* email [email protected] <br>
* date 2017/3/3 21:33
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public static JSONObject toJSONObject(byte[] content) {
*/
public static <T> T toBean(String content, Class<T> clazz) {

if (null == content || "".equals(content)) {
if (StringUtils.isEmpty(content)) {
return null;
}
try (InputStream in = new ByteArrayInputStream(content.getBytes("UTF-8"))) {
Expand Down Expand Up @@ -207,9 +207,8 @@ public static Document newDocument() throws ParserConfigurationException {
* @param clazz 需要转化的类
* @param <T> 类型
* @return 对应的对象
* @throws IOException xml io转化异常
*/
public static <T> T inputStream2Bean(InputStream in, Class<T> clazz) throws IOException {
public static <T> T inputStream2Bean(InputStream in, Class<T> clazz) {
JSON json = toJSONObject(in);
return json.toJavaObject(clazz);
}
Expand All @@ -220,7 +219,7 @@ public static <T> T inputStream2Bean(InputStream in, Class<T> clazz) throws IOEx
* @return 整理完成的参数集
* @throws IOException xml io转化异常
*/
public static Map inputStream2Map(InputStream in, Map m) throws IOException {
public static Map<String, Object> inputStream2Map(InputStream in, Map<String, Object> m) throws IOException {
if (null == m) {
m = new JSONObject();
}
Expand Down Expand Up @@ -351,10 +350,10 @@ public static void map2Xml(Map<String, Object> data, Document document, org.w3c.
private static void object2Xml(Object value, Document document, org.w3c.dom.Element element) {

if (value instanceof Map) {
map2Xml((Map) value, document, element);
map2Xml((Map<String, Object>) value, document, element);
}
else if (value instanceof List) {
List vs = (List) value;
List<Object> vs = (List<Object>) value;
for (Object v : vs) {
object2Xml(v, document, element);
}
Expand Down
4 changes: 2 additions & 2 deletions pay-java-demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public enum PayType implements BasePayType {
public PayService getPayService(ApyAccount apyAccount) {
AliPayConfigStorage aliPayConfigStorage = new AliPayConfigStorage();
aliPayConfigStorage.setPid(apyAccount.getPartner());
aliPayConfigStorage.setAppid(apyAccount.getAppid());
aliPayConfigStorage.setAppId(apyAccount.getAppid());
aliPayConfigStorage.setKeyPublic(apyAccount.getPublicKey());
aliPayConfigStorage.setKeyPrivate(apyAccount.getPrivateKey());
aliPayConfigStorage.setNotifyUrl(apyAccount.getNotifyUrl());
Expand All @@ -49,7 +49,7 @@ public enum PayType implements BasePayType {
wxPayConfigStorage.setMchId(apyAccount.getPartner());
wxPayConfigStorage.setAppSecret(apyAccount.getPublicKey());
wxPayConfigStorage.setKeyPublic(apyAccount.getPublicKey());
wxPayConfigStorage.setAppid(apyAccount.getAppid());
wxPayConfigStorage.setAppId(apyAccount.getAppid());
wxPayConfigStorage.setKeyPrivate(apyAccount.getPrivateKey());
wxPayConfigStorage.setNotifyUrl(apyAccount.getNotifyUrl());
wxPayConfigStorage.setSignType(apyAccount.getSignType());
Expand Down
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.13.4-SNAPSHOT</version>
<version>2.14.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>war</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
/**
* 发起支付入口
*
* @author: egan
* @author egan
* email [email protected]
* date 2016/11/18 0:25
*/
Expand Down Expand Up @@ -81,7 +81,8 @@ private static void certKeyPublic(AliPayConfigStorage aliPayConfigStorage) {
public void init() {
AliPayConfigStorage aliPayConfigStorage = new AliPayConfigStorage();
aliPayConfigStorage.setPid("2088102169916436");
aliPayConfigStorage.setAppid("2016080400165436");
aliPayConfigStorage.setAppId("2016080400165436");
// aliPayConfigStorage.setAppAuthToken("ISV代商户代用,指定appAuthToken");
//普通公钥方式与证书公钥方式为两者取其一的方式
keyPublic(aliPayConfigStorage);
aliPayConfigStorage.setKeyPrivate("MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKroe/8h5vC4L6T+B2WdXiVwGsMvUKgb2XsKix6VY3m2wcf6tyzpNRDCNykbIwGtaeo7FshN+qZxdXHLiIam9goYncBit/8ojfLGy2gLxO/PXfzGxYGs0KsDZ+ryVPPmE34ZZ8jiJpR0ygzCFl8pN3QJPJRGTJn5+FTT9EF/9zyZAgMBAAECgYAktngcYC35u7cQXDk+jMVyiVhWYU2ULxdSpPspgLGzrZyG1saOcTIi/XVX8Spd6+B6nmLQeF/FbU3rOeuD8U2clzul2Z2YMbJ0FYay9oVZFfp5gTEFpFRTVfzqUaZQBIjJe/xHL9kQVqc5xHlE/LVA27/Kx3dbC35Y7B4EVBDYAQJBAOhsX8ZreWLKPhXiXHTyLmNKhOHJc+0tFH7Ktise/0rNspojU7o9prOatKpNylp9v6kux7migcMRdVUWWiVe+4ECQQC8PqsuEz7B0yqirQchRg1DbHjh64bw9Kj82EN1/NzOUd53tP9tg+SO97EzsibK1F7tOcuwqsa7n2aY48mQ+y0ZAkBndA2xcRcnvOOjtAz5VO8G7R12rse181HjGfG6AeMadbKg30aeaGCyIxN1loiSfNR5xsPJwibGIBg81mUrqzqBAkB+K6rkaPXJR9XtzvdWb/N3235yPkDlw7Z4MiOVM3RzvR/VMDV7m8lXoeDde2zQyeMOMYy6ztwA6WgE1bhGOnQRAkEAouUBv1sVdSBlsexX15qphOmAevzYrpufKgJIRLFWQxroXMS7FTesj+f+FmGrpPCxIde1dqJ8lqYLTyJmbzMPYw==");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* 发起支付入口
*
* @author: egan
* @author egan
* email [email protected]
* date 2016/11/18 0:25
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
/**
* 发起支付入口
*
* @author: egan
* @author egan
* email [email protected]
* date 2016/11/18 0:25
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/**
* 发起支付入口
*
* @author: egan
* @author egan
* email [email protected]
* date 2018/05/06 10:30
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/**
* 发起支付入口
*
* @author: egan
* @author egan
* email [email protected]
* date 2018/05/06 10:30
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
/**
* 银联相关
*
* @author: egan
* @author egan
* email [email protected]
* date 2016/11/18 0:25
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/**
* 发起支付入口
*
* @author: egan
* @author egan
* email [email protected]
* date 2016/11/18 0:25
*/
Expand All @@ -42,7 +42,7 @@ public class WxPayController {
@PostConstruct
public void init() {
WxPayConfigStorage wxPayConfigStorage = new WxPayConfigStorage();
wxPayConfigStorage.setAppid("公众账号ID");
wxPayConfigStorage.setAppId("公众账号ID");

wxPayConfigStorage.setMchId("合作者id(商户号)");
//以下两个参数在 服务商版模式中必填--------
Expand Down
Loading

0 comments on commit 5e96692

Please sign in to comment.