Skip to content

Commit e2be617

Browse files
authored
Merge pull request #38 from PingPlusPlus/release/2026-04-13
Release/2026 04 13
2 parents f36d6cb + 2461d32 commit e2be617

File tree

11 files changed

+104
-20
lines changed

11 files changed

+104
-20
lines changed

CHANGELOG.md

Lines changed: 74 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# ChangeLog
22

3+
## 2.5.6
4+
5+
- 更新: `RequestOptions` 新增`Ping++`验签公钥设置参数
6+
7+
## 2.5.5
8+
9+
-更新: 退款 refund 新增返回 `app` 参数.
10+
311
## 2.5.4
412

513
- 修正: 修复版本 2.5.3 中存在的 POM 依赖问题。建议用户直接升级到此版本。
@@ -30,12 +38,13 @@
3038

3139
> 本次更新有较多与旧版本不兼容的地方。
3240
33-
- 修改: 支持 JDK 8 及以上;
41+
- 修改: 支持 JDK 8 及以上;
3442
- 修改: 异常抛出修改,统一声明为 `PingppException`,实际使用可以再做具体判断;
3543
- 废弃: 原接口,支持传 `apiKey` 参数的方法,全部删除,可以用 `RequestOptions` 代替;
3644
- 新增: 每个接口最后一个参数支持 `RequestOptions`;
3745
- 新增: `PingppException` 增加 `type``code``statusCode`;
38-
- 新增: 对象增加 `getLastResponse()` 方法,可以用于获取当前这次请求的 `response` 对象,包含 `HTTP Status Code``Headers``Response Body` 等;
46+
- 新增: 对象增加 `getLastResponse()` 方法,可以用于获取当前这次请求的 `response` 对象,包含 `HTTP Status Code``Headers`
47+
`Response Body` 等;
3948
- 废弃: 取消对 `PKCS1` 格式私钥的支持,请转成 `PKCS8` 再使用;
4049

4150
---
@@ -86,163 +95,225 @@
8695
- 移除 `PingppAccount`
8796

8897
## 2.3.8 (2018-05-22)
98+
8999
#### 新增
100+
90101
- WxLiteOAuth 接口
91102
- Agreement 接口
92103

93104
#### 修改
105+
94106
- 合并部分内部类
95107
- WxpubOAuth 接口错误时增加异常
96108

97109
## 2.3.7 (2018-03-16)
110+
98111
#### 新增
112+
99113
- BalanceSettlement 接口
100114
- CardInfo 接口
101115

102116
## 2.3.5 (2018-02-27)
117+
103118
#### 修正
119+
104120
- 部分对象字段从 Integer 改成 Long
105121

106122
## 2.3.4 (2018-01-10)
123+
107124
#### 修改
125+
108126
- 移除已废弃接口
109127
- 移除 transfer、batch_transfer 取消接口
110128
- 更新示例
111129
- 移除 order user_from 字段
112130
- settle_account 字段更新
113131

114132
## 2.3.3 (2017-12-27)
133+
115134
#### 修正
135+
116136
- 修正 javadoc
117137

118138
## 2.3.2 (2017-12-21)
139+
119140
#### 修正
141+
120142
- 兼容 JDK 1.7
121143

122144
## 2.3.1 (2017-12-08)
145+
123146
#### 修正
147+
124148
- Event 解析修正
125149

126150
## 2.3.0 (2017-12-01)
151+
127152
#### 更改
153+
128154
- 合并账户系统相关接口
129155

130156
## 2.2.5 (2017-10-10)
157+
131158
#### 新增
159+
132160
- 新增重试机制
133161

134162
#### 修改
163+
135164
- 优化 SDK
136165

137166
## 2.2.4 (2017-06-19)
167+
138168
#### 修改
169+
139170
- Charge 增加字段 reversed,表示是否已撤销
140171
- 针对渠道 isv_scan, isv_qr_isv_wap 增加撤销方法,`Charge.reverse(CHARGE_ID)`
141172
- Refund 增加 extra 字段
142173

143174
## 2.2.3 (2017-03-27)
175+
144176
#### 修改
177+
145178
- BatchTransfer 增加字段
146179

147180
## 2.2.2 (2017-03-21)
181+
148182
#### 修正
183+
149184
- alipay_pc_direct/alipay_wap 渠道 credential 字段类型的修正
150185

151186
## 2.2.1 (2017-01-13)
187+
152188
#### 新增
189+
153190
- 添加 gradle 相关文件
154191
- 添加部分测试文件
155192
- batch_transfer 更新/取消接口
156193

157194
#### 修改
195+
158196
- 更改签名私钥获取方式
159197
- Charge.list app[id] 参数改为必传
160198
- 红包去除多余的参数
161199
- batch_refund charges 字段格式修改
162200

163201
#### 修正
202+
164203
- Webhooks 解析对象 batch_refund、batch_transfer、customs 对应事件错误
165204

166205
## 2.2.0
206+
167207
#### 新增
208+
168209
- 添加 BatchRefund、BatchTransfer、Customs
169210

170211
#### 修改
212+
171213
- 签名生成规则变更
172214
- 列表查询接口换成 `list` 方法,代替 `all` 方法
173215
- 退款接口调用方式变更,直接使用 Refund 对象
174216
- Refund 对象添加 charge_order_no, transaction_no 属性
175217

176218
## 2.1.9
219+
177220
#### 修改
178-
- 添加 RateLimitException
221+
222+
- 添加 RateLimitException
179223
- 兼容 http 地址,仅为方便测试
180224

181225
## 2.1.8
226+
182227
#### 新增
228+
183229
- Identification 身份证银行卡接口
184230

185231
## 2.1.7
232+
186233
#### 修正
234+
187235
- RedEnvelope、Transfer 添加字段
188236

189237
## 2.1.6
238+
190239
#### 修正
240+
191241
- 签名内容编码问题
192242

193243
## 2.1.5
244+
194245
#### 修改
246+
195247
- 补充 RedEnvelope、Transfer 缺少字段
196248

197249
## 2.1.4
250+
198251
#### 修改
252+
199253
- 更改 content-type 为 application/json
200254

201255
## 2.1.3
256+
202257
- 兼容两种微信公众号接入方式
203258

204259
## 2.1.2
260+
205261
- 补全确实字段
206262
- 修正 Event 解析
207263
- 修正部分字符 JSON 序列化问题
208264
- 添加请求签名
209265

210266
## 2.1.1
267+
211268
- 修正 extra 类型
212269
- 兼容 jdk 1.6
213270

214271
## 2.1.0
272+
215273
- 添加应用内快捷支付对应接口
216274

217275
## 2.0.10
276+
218277
- 增加 Refund 对象 status 字段
219278

220279
## 2.0.8
280+
221281
- 增加 ChannelException
222282

223283
## 2.0.6
284+
224285
- 增加企业转账、修改红包接口
225286

226287
## 2.0.5
288+
227289
- 增加 event sdk
228290

229291
## 2.0.4
292+
230293
- 更改 sdk 目录格式,修复wx_pub渠道timeStamp 类型问题。
231294

232295
## 2.0.3
296+
233297
- 增加 apple pay ,重写 getcredential 方法。
234298

235299
## 2.0.2
300+
236301
- 增加微信红包
237302

238303
## 2.0.1
304+
239305
#### 更改
306+
240307
修改 wx credential 里的 timeStamp 类型为字符串,防止变成科学计数法
241308

242309
## 2.0.0
310+
243311
#### 更改
312+
244313
添加新渠道支持:百付宝、百付宝WAP、微信公众平台
245314

246315
## 1.0.4
316+
247317
#### 更改:
318+
248319
添加 `Expanding` 机制

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ mavenCentral
3838
<dependency>
3939
<groupId>com.pingxx</groupId>
4040
<artifactId>pingpp-java</artifactId>
41-
<version>2.5.4</version>
41+
<version>2.5.6</version>
4242
<type>jar</type>
4343
</dependency>
4444
```
@@ -56,7 +56,7 @@ repositories {
5656
安装 Ping++ SDK
5757

5858
```
59-
implementation 'com.pingxx:pingpp-java:2.5.4'
59+
implementation 'com.pingxx:pingpp-java:2.5.6'
6060
```
6161

6262
## 初始化

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.5.4
1+
2.5.6

example/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dependencies {
77
// 方法 1. 本地文件系统依赖
88
// implementation fileTree(dir: 'lib', includes: ['*jar'])
99
// 方法 2. 仓库依赖
10-
// implementation 'com.pingxx:pingpp-java:2.5.4'
10+
// implementation 'com.pingxx:pingpp-java:2.5.6'
1111
// 方法 3.模块依赖
1212
implementation project(':pingpp-sdk')
1313
}
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
-----BEGIN PUBLIC KEY-----
2-
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoXV1qdwYGq6lac+EIVxx
3-
1/wGcjjy5InO08QBvUGDQMKAWjg/UvnNmnTZJvxUu18UVtwoHIls24EHZ96im3k0
4-
DPn43aSGyR417g9rqUL2N1H/0dCNcT8LY8sZL/sw/IV//IQcZYv/8EO6+7SClw+G
5-
Jpib84QfmDgUPbQC0dhl1R1Q8e8RoE/+70yX6OY22kRr14KjRZiVQ0UMZS5KaPwS
6-
FJ1egyNDCLFoLyhRQMV5vDxMdpIvxZuGW+3aTZkW8v/ISXWmSFpI/dlpxHp0+h6p
7-
sdai2RzXYuyzbeOPyQEZkyGfR6BX2Gv/l80nEFNup7uNmAt/be9IdpSZlxpF4HlI
8-
8wIDAQAB
9-
-----END PUBLIC KEY-----
2+
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCJqcTaGUab0vBZSkGNE1AaGiY
3+
RcbPd7QdCQuM8EpbEpEQGr9/NjbJHCLd3eaUmYM0vy34Wux+VHnw4ckiDfBuW6/Z
4+
fIo5GBRCI/nZLOnWcOX98ZAXYnn/VVJXuBtHtHL8DWEbYmMp+Gl4k1rFSuQKk52k
5+
YLXeFJZJV8CBV5jA+wIDAQAB
6+
-----END PUBLIC KEY-----

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
6+
distributionUrl=https\://mirrors.aliyun.com/macports/distfiles/gradle/gradle-8.6-all.zip

pingpp-sdk/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.pingxx</groupId>
77
<artifactId>pingpp-java</artifactId>
8-
<version>2.5.5</version>
8+
<version>2.5.6</version>
99
<packaging>jar</packaging>
1010

1111
<name>pingpp-java</name>

pingpp-sdk/src/main/java/com/pingplusplus/Pingpp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public abstract class Pingpp {
1717
/**
1818
* version
1919
*/
20-
public static final String VERSION = "2.5.3";
20+
public static final String VERSION = "2.5.6";
2121
/**
2222
* api key
2323
*/

pingpp-sdk/src/main/java/com/pingplusplus/net/RequestOptions.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,23 @@ public static final class RequestOptionsBuilder {
8888
private int readTimeout;
8989
private int maxNetworkRetries;
9090
private String acceptLanguage;
91+
92+
public String getVerifyPublicKey() {
93+
return verifyPublicKey;
94+
}
95+
96+
public RequestOptionsBuilder setVerifyPublicKey(String verifyPublicKey) {
97+
this.verifyPublicKey = normalizePublicVerifyKey(verifyPublicKey);
98+
return this;
99+
}
100+
91101
private String verifyPublicKey;
92102

93103
public RequestOptionsBuilder() {
94104
this.apiKey = Pingpp.apiKey;
95105
this.appId = Pingpp.appId;
96106
this.privateKey = Pingpp.privateKey;
107+
this.verifyPublicKey = Pingpp.verifyPublicKey;
97108
this.connectTimeout = Pingpp.getConnectTimeout();
98109
this.readTimeout = Pingpp.getReadTimeout();
99110
this.maxNetworkRetries = Pingpp.getMaxNetworkRetries();
@@ -132,6 +143,11 @@ public RequestOptionsBuilder setPrivateKey(String privateKey) {
132143
return this;
133144
}
134145

146+
public RequestOptionsBuilder clearVerifyPublicKey() {
147+
this.verifyPublicKey = null;
148+
return this;
149+
}
150+
135151
public RequestOptionsBuilder clearAppId() {
136152
this.appId = null;
137153
return this;

pingpp-sdk/src/test/java/com/pingplusplus/PingppTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public class PingppTest {
7474
}
7575

7676
@Test public void testVerifyVersions() {
77-
assertEquals("Pingpp.VERSION should match", "2.5.0", Pingpp.VERSION);
77+
assertEquals("Pingpp.VERSION should match", "2.5.6", Pingpp.VERSION);
7878
}
7979

8080
@Test public void testCreateCharge() {

0 commit comments

Comments
 (0)