版本升级2.13.2

This commit is contained in:
egzosn
2020-06-01 23:12:18 +08:00
parent a41615e9a2
commit b0e83247dc
8 changed files with 32 additions and 24 deletions

View File

@@ -175,7 +175,8 @@ public class RSA{
* @param privateKey 商户私钥
* @param characterEncoding 编码格式
* @return 解密后的字符串
* @throws Exception 解密异常
* @throws GeneralSecurityException 解密异常
* @throws IOException IOException
*/
public static String decrypt(String content, String privateKey, String characterEncoding) throws GeneralSecurityException, IOException {
PrivateKey prikey = getPrivateKey(privateKey);

View File

@@ -63,7 +63,8 @@ public class RSA2 {
* @param privateKey 商户私钥
* @param characterEncoding 编码格式
* @return 解密后的字符串
* @throws Exception 解密异常
* @throws GeneralSecurityException 解密异常
* @throws IOException 解密异常
*/
public static String decrypt(String content, String privateKey, String characterEncoding) throws GeneralSecurityException, IOException {
return RSA.decrypt(content, privateKey, characterEncoding);
@@ -73,14 +74,23 @@ public class RSA2 {
/**
* 得到私钥
* @param key 密钥字符串经过base64编码
* @throws Exception 加密异常
* @throws GeneralSecurityException 加密异常
* @return 私钥
*/
public static PrivateKey getPrivateKey(String key) throws Exception {
public static PrivateKey getPrivateKey(String key) throws GeneralSecurityException {
return RSA.getPrivateKey(key);
}
/**
*
* @param content 加密文本
* @param publicKey 公钥
* @param cipherAlgorithm 算法
* @param characterEncoding 编码类型
* @return 加密后文本
* @throws GeneralSecurityException 加密异常
* @throws IOException IOException
*/
public static String encrypt(String content, String publicKey, String cipherAlgorithm, String characterEncoding ) throws GeneralSecurityException, IOException {
return Base64.encode(RSA.encrypt(content.getBytes(characterEncoding), RSA.getPublicKey(publicKey), 2048, 11, cipherAlgorithm));
}

View File

@@ -1,18 +1,12 @@
package com.egzosn.pay.wx.api;
import com.egzosn.pay.common.bean.Order;
import com.egzosn.pay.common.bean.PayOrder;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
/**
* 常量
* @author egan
* @date 2020/3/10 21:22
* <a href="mailto:zheng.zaosheng@iwhalecloud.com">郑灶生</a>
* <br/>
* email: zheng.zaosheng@iwhalecloud.com
* <pre>
* email egzosn@gmail.com
* date 2020/3/10 21:22
* </pre>
*/
public interface WxConst {
/**

View File

@@ -677,7 +677,6 @@ public class WxPayService extends BasePayService<WxPayConfigStorage> implements
* @param outNo 商户转账订单号
* @param wxTransferType 微信转账类型,.....这里没办法了只能这样写(┬_┬),请见谅 {@link com.egzosn.pay.wx.bean.WxTransferType}
* <p>
* <p>
* <a href="https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=14_3">企业付款到零钱</a>
* <a href="https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=24_3">商户企业付款到银行卡</a>
* </p>

View File

@@ -5,9 +5,9 @@ import com.egzosn.pay.common.bean.TransferOrder;
import java.math.BigDecimal;
/**
* @description: 发红包订单
* @author: 保网 faymanwang 1057438332@qq.com
* @time: 2020/5/15 12:40
* 发红包订单
* @author 保网 faymanwang 1057438332@qq.com
* 2020/5/15 12:40
*/
public class RedpackOrder extends TransferOrder {
@@ -64,6 +64,7 @@ public class RedpackOrder extends TransferOrder {
* 红包发放总人数
* 普通红包1
* 裂变:必须介于(包括)3到20之间
* @return 红包发放总人数
*/
public int getTotalNum() {
Object totalNum = getAttr("total_num");
@@ -75,6 +76,7 @@ public class RedpackOrder extends TransferOrder {
}
/**
* 红包祝福语
* @return 红包祝福语
*/
public String getWishing() {
return (String) getAttr("wishing");
@@ -88,6 +90,7 @@ public class RedpackOrder extends TransferOrder {
/**
* 活动名称
* @return 活动名称
*/
public String getActName() {
return (String) getAttr("act_name");
@@ -110,6 +113,7 @@ public class RedpackOrder extends TransferOrder {
* PRODUCT_6:保险回馈
* PRODUCT_7:彩票派奖
* PRODUCT_8:税务刮奖
* @param sceneId 红包使用场景
*/
public void setSceneId(String sceneId) {
addAttr("scene_id", sceneId);

View File

@@ -21,7 +21,7 @@ import com.egzosn.pay.common.bean.result.PayError;
/**
* 微信支付异常
* @author: egan
* @author egan
* <pre>
*
* email egzosn@gmail.com

View File

@@ -6,9 +6,9 @@ import com.egzosn.pay.common.bean.TransferType;
import java.util.Map;
/**
* @description: 红包交易类型
* 红包交易类型
* @author faymanwang
* @time: 2020/5/14 20:11
* 2020/5/14 20:11
*/
public enum WxSendredpackType implements TransferType {
/**

View File

@@ -58,7 +58,7 @@
<module>pay-java-paypal</module>
<module>pay-java-yiji</module>
<module>pay-java-baidu</module>
<module>pay-java-demo</module>
<!--<module>pay-java-demo</module>-->
</modules>