Merge branch 'develop' of https://git.oschina.net/egzosn/pay-java-parent into develop-Actinia

# Conflicts:
#	README.md
#	pay-java-union/src/main/java/com/egzosn/pay/union/api/UnionPayConfigStorage.java
This commit is contained in:
Actinia-517
2017-12-05 16:28:21 +08:00
35 changed files with 1568 additions and 384 deletions

View File

@@ -2,6 +2,8 @@ package com.egzosn.pay.common.util;
import com.alibaba.fastjson.JSONObject;
import com.egzosn.pay.common.bean.result.PayException;
import com.egzosn.pay.common.exception.PayErrorException;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.JDOMException;
@@ -38,9 +40,9 @@ public class XML {
try (InputStream in = new ByteArrayInputStream(content.getBytes("UTF-8"))){
return (JSONObject) inputStream2Map(in, null);
} catch (IOException e) {
e.printStackTrace();
throw new PayErrorException(new PayException("IOException", e.getMessage()));
}
return null;
}
@@ -58,9 +60,8 @@ public class XML {
try {
return (JSONObject)inputStream2Map(in, null);
} catch (IOException e) {
e.printStackTrace();
throw new PayErrorException(new PayException("IOException", e.getMessage()));
}
return null;
}
@@ -95,7 +96,7 @@ public class XML {
m.put(k, v);
}
} catch (JDOMException e) {
e.printStackTrace();
throw new PayErrorException(new PayException("JDOMException", e.getMessage()));
}
return m;
}

View File

@@ -39,6 +39,7 @@ public enum SignUtils {
* @param characterEncoding 编码格式
* @return 签名结果
*/
@Override
public boolean verify(String text, String sign, String key, String characterEncoding) {
return com.egzosn.pay.common.util.sign.encrypt.MD5.verify(text, sign, key, characterEncoding);
}