diff --git a/CHANGELOG.md b/CHANGELOG.md
index 364d6e6..d36bfe4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# ChangeLog
+## 2.5.6
+
+- 更新: `RequestOptions` 新增`Ping++`验签公钥设置参数
+
+## 2.5.5
+
+-更新: 退款 refund 新增返回 `app` 参数.
+
## 2.5.4
- 修正: 修复版本 2.5.3 中存在的 POM 依赖问题。建议用户直接升级到此版本。
@@ -30,12 +38,13 @@
> 本次更新有较多与旧版本不兼容的地方。
-- 修改: 支持 JDK 8 及以上;
+- 修改: 支持 JDK 8 及以上;
- 修改: 异常抛出修改,统一声明为 `PingppException`,实际使用可以再做具体判断;
- 废弃: 原接口,支持传 `apiKey` 参数的方法,全部删除,可以用 `RequestOptions` 代替;
- 新增: 每个接口最后一个参数支持 `RequestOptions`;
- 新增: `PingppException` 增加 `type`、`code`、`statusCode`;
-- 新增: 对象增加 `getLastResponse()` 方法,可以用于获取当前这次请求的 `response` 对象,包含 `HTTP Status Code`、`Headers`、`Response Body` 等;
+- 新增: 对象增加 `getLastResponse()` 方法,可以用于获取当前这次请求的 `response` 对象,包含 `HTTP Status Code`、`Headers`、
+ `Response Body` 等;
- 废弃: 取消对 `PKCS1` 格式私钥的支持,请转成 `PKCS8` 再使用;
---
@@ -86,25 +95,34 @@
- 移除 `PingppAccount`
## 2.3.8 (2018-05-22)
+
#### 新增
+
- WxLiteOAuth 接口
- Agreement 接口
#### 修改
+
- 合并部分内部类
- WxpubOAuth 接口错误时增加异常
## 2.3.7 (2018-03-16)
+
#### 新增
+
- BalanceSettlement 接口
- CardInfo 接口
## 2.3.5 (2018-02-27)
+
#### 修正
+
- 部分对象字段从 Integer 改成 Long
## 2.3.4 (2018-01-10)
+
#### 修改
+
- 移除已废弃接口
- 移除 transfer、batch_transfer 取消接口
- 更新示例
@@ -112,137 +130,190 @@
- settle_account 字段更新
## 2.3.3 (2017-12-27)
+
#### 修正
+
- 修正 javadoc
## 2.3.2 (2017-12-21)
+
#### 修正
+
- 兼容 JDK 1.7
## 2.3.1 (2017-12-08)
+
#### 修正
+
- Event 解析修正
## 2.3.0 (2017-12-01)
+
#### 更改
+
- 合并账户系统相关接口
## 2.2.5 (2017-10-10)
+
#### 新增
+
- 新增重试机制
#### 修改
+
- 优化 SDK
## 2.2.4 (2017-06-19)
+
#### 修改
+
- Charge 增加字段 reversed,表示是否已撤销
- 针对渠道 isv_scan, isv_qr_isv_wap 增加撤销方法,`Charge.reverse(CHARGE_ID)`
- Refund 增加 extra 字段
## 2.2.3 (2017-03-27)
+
#### 修改
+
- BatchTransfer 增加字段
## 2.2.2 (2017-03-21)
+
#### 修正
+
- alipay_pc_direct/alipay_wap 渠道 credential 字段类型的修正
## 2.2.1 (2017-01-13)
+
#### 新增
+
- 添加 gradle 相关文件
- 添加部分测试文件
- batch_transfer 更新/取消接口
#### 修改
+
- 更改签名私钥获取方式
- Charge.list app[id] 参数改为必传
- 红包去除多余的参数
- batch_refund charges 字段格式修改
#### 修正
+
- Webhooks 解析对象 batch_refund、batch_transfer、customs 对应事件错误
## 2.2.0
+
#### 新增
+
- 添加 BatchRefund、BatchTransfer、Customs
#### 修改
+
- 签名生成规则变更
- 列表查询接口换成 `list` 方法,代替 `all` 方法
- 退款接口调用方式变更,直接使用 Refund 对象
- Refund 对象添加 charge_order_no, transaction_no 属性
## 2.1.9
+
#### 修改
-- 添加 RateLimitException
+
+- 添加 RateLimitException
- 兼容 http 地址,仅为方便测试
## 2.1.8
+
#### 新增
+
- Identification 身份证银行卡接口
## 2.1.7
+
#### 修正
+
- RedEnvelope、Transfer 添加字段
## 2.1.6
+
#### 修正
+
- 签名内容编码问题
## 2.1.5
+
#### 修改
+
- 补充 RedEnvelope、Transfer 缺少字段
## 2.1.4
+
#### 修改
+
- 更改 content-type 为 application/json
## 2.1.3
+
- 兼容两种微信公众号接入方式
## 2.1.2
+
- 补全确实字段
- 修正 Event 解析
- 修正部分字符 JSON 序列化问题
- 添加请求签名
## 2.1.1
+
- 修正 extra 类型
- 兼容 jdk 1.6
## 2.1.0
+
- 添加应用内快捷支付对应接口
## 2.0.10
+
- 增加 Refund 对象 status 字段
## 2.0.8
+
- 增加 ChannelException
## 2.0.6
+
- 增加企业转账、修改红包接口
## 2.0.5
+
- 增加 event sdk
## 2.0.4
+
- 更改 sdk 目录格式,修复wx_pub渠道timeStamp 类型问题。
## 2.0.3
+
- 增加 apple pay ,重写 getcredential 方法。
## 2.0.2
+
- 增加微信红包
## 2.0.1
+
#### 更改
+
修改 wx credential 里的 timeStamp 类型为字符串,防止变成科学计数法
## 2.0.0
+
#### 更改
+
添加新渠道支持:百付宝、百付宝WAP、微信公众平台
## 1.0.4
+
#### 更改:
+
添加 `Expanding` 机制
diff --git a/README.md b/README.md
index 6d090fe..1a8a82c 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@ mavenCentral
com.pingxx
pingpp-java
- 2.5.4
+ 2.5.6
jar
```
@@ -56,7 +56,7 @@ repositories {
安装 Ping++ SDK
```
-implementation 'com.pingxx:pingpp-java:2.5.4'
+implementation 'com.pingxx:pingpp-java:2.5.6'
```
## 初始化
diff --git a/VERSION b/VERSION
index d21aa93..1b03fe6 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.5.4
\ No newline at end of file
+2.5.6
\ No newline at end of file
diff --git a/example/build.gradle b/example/build.gradle
index d82583f..495f667 100644
--- a/example/build.gradle
+++ b/example/build.gradle
@@ -7,7 +7,7 @@ dependencies {
// 方法 1. 本地文件系统依赖
// implementation fileTree(dir: 'lib', includes: ['*jar'])
// 方法 2. 仓库依赖
- // implementation 'com.pingxx:pingpp-java:2.5.4'
+ // implementation 'com.pingxx:pingpp-java:2.5.6'
// 方法 3.模块依赖
implementation project(':pingpp-sdk')
}
diff --git a/example/src/main/resources/pingpp_public_key.pem b/example/src/main/resources/pingpp_public_key.pem
index 2cf7987..c0f5d19 100644
--- a/example/src/main/resources/pingpp_public_key.pem
+++ b/example/src/main/resources/pingpp_public_key.pem
@@ -1,9 +1,6 @@
-----BEGIN PUBLIC KEY-----
-MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoXV1qdwYGq6lac+EIVxx
-1/wGcjjy5InO08QBvUGDQMKAWjg/UvnNmnTZJvxUu18UVtwoHIls24EHZ96im3k0
-DPn43aSGyR417g9rqUL2N1H/0dCNcT8LY8sZL/sw/IV//IQcZYv/8EO6+7SClw+G
-Jpib84QfmDgUPbQC0dhl1R1Q8e8RoE/+70yX6OY22kRr14KjRZiVQ0UMZS5KaPwS
-FJ1egyNDCLFoLyhRQMV5vDxMdpIvxZuGW+3aTZkW8v/ISXWmSFpI/dlpxHp0+h6p
-sdai2RzXYuyzbeOPyQEZkyGfR6BX2Gv/l80nEFNup7uNmAt/be9IdpSZlxpF4HlI
-8wIDAQAB
------END PUBLIC KEY-----
+MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCJqcTaGUab0vBZSkGNE1AaGiY
+RcbPd7QdCQuM8EpbEpEQGr9/NjbJHCLd3eaUmYM0vy34Wux+VHnw4ckiDfBuW6/Z
+fIo5GBRCI/nZLOnWcOX98ZAXYnn/VVJXuBtHtHL8DWEbYmMp+Gl4k1rFSuQKk52k
+YLXeFJZJV8CBV5jA+wIDAQAB
+-----END PUBLIC KEY-----
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index f0ced99..68566cb 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
+distributionUrl=https\://mirrors.aliyun.com/macports/distfiles/gradle/gradle-8.6-all.zip
diff --git a/pingpp-sdk/pom.xml b/pingpp-sdk/pom.xml
index f881d71..ab60a11 100644
--- a/pingpp-sdk/pom.xml
+++ b/pingpp-sdk/pom.xml
@@ -5,7 +5,7 @@
com.pingxx
pingpp-java
- 2.5.5
+ 2.5.6
jar
pingpp-java
diff --git a/pingpp-sdk/src/main/java/com/pingplusplus/Pingpp.java b/pingpp-sdk/src/main/java/com/pingplusplus/Pingpp.java
index 986c5b7..444f8b4 100644
--- a/pingpp-sdk/src/main/java/com/pingplusplus/Pingpp.java
+++ b/pingpp-sdk/src/main/java/com/pingplusplus/Pingpp.java
@@ -17,7 +17,7 @@ public abstract class Pingpp {
/**
* version
*/
- public static final String VERSION = "2.5.3";
+ public static final String VERSION = "2.5.6";
/**
* api key
*/
diff --git a/pingpp-sdk/src/main/java/com/pingplusplus/net/RequestOptions.java b/pingpp-sdk/src/main/java/com/pingplusplus/net/RequestOptions.java
index 91f14bd..7a2b165 100644
--- a/pingpp-sdk/src/main/java/com/pingplusplus/net/RequestOptions.java
+++ b/pingpp-sdk/src/main/java/com/pingplusplus/net/RequestOptions.java
@@ -88,12 +88,23 @@ public static final class RequestOptionsBuilder {
private int readTimeout;
private int maxNetworkRetries;
private String acceptLanguage;
+
+ public String getVerifyPublicKey() {
+ return verifyPublicKey;
+ }
+
+ public RequestOptionsBuilder setVerifyPublicKey(String verifyPublicKey) {
+ this.verifyPublicKey = normalizePublicVerifyKey(verifyPublicKey);
+ return this;
+ }
+
private String verifyPublicKey;
public RequestOptionsBuilder() {
this.apiKey = Pingpp.apiKey;
this.appId = Pingpp.appId;
this.privateKey = Pingpp.privateKey;
+ this.verifyPublicKey = Pingpp.verifyPublicKey;
this.connectTimeout = Pingpp.getConnectTimeout();
this.readTimeout = Pingpp.getReadTimeout();
this.maxNetworkRetries = Pingpp.getMaxNetworkRetries();
@@ -132,6 +143,11 @@ public RequestOptionsBuilder setPrivateKey(String privateKey) {
return this;
}
+ public RequestOptionsBuilder clearVerifyPublicKey() {
+ this.verifyPublicKey = null;
+ return this;
+ }
+
public RequestOptionsBuilder clearAppId() {
this.appId = null;
return this;
diff --git a/pingpp-sdk/src/test/java/com/pingplusplus/PingppTest.java b/pingpp-sdk/src/test/java/com/pingplusplus/PingppTest.java
index 949bbac..368100a 100644
--- a/pingpp-sdk/src/test/java/com/pingplusplus/PingppTest.java
+++ b/pingpp-sdk/src/test/java/com/pingplusplus/PingppTest.java
@@ -74,7 +74,7 @@ public class PingppTest {
}
@Test public void testVerifyVersions() {
- assertEquals("Pingpp.VERSION should match", "2.5.0", Pingpp.VERSION);
+ assertEquals("Pingpp.VERSION should match", "2.5.6", Pingpp.VERSION);
}
@Test public void testCreateCharge() {
diff --git a/pom.xml b/pom.xml
index 62f8f65..71f3e19 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
com.pingxx
pingpp-java-parent
- 2.5.4
+ 2.5.6
pom
A Java SDK for Ping++ Payment API.