Skip to content

Commit 039430c

Browse files
committed
#279 统一下单接口参数对象WxPayUnifiedOrderRequest增加fingerprint属性
1 parent 39e3383 commit 039430c

File tree

1 file changed

+29
-12
lines changed

1 file changed

+29
-12
lines changed

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayUnifiedOrderRequest.java

+29-12
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,16 @@ public class WxPayUnifiedOrderRequest extends WxPayBaseRequest {
299299
*/
300300
@XStreamAlias("scene_info")
301301
private String sceneInfo;
302+
/**
303+
* <pre>
304+
* 字段名:浏览器指纹
305+
* 变量名:fingerprint
306+
* 是否必填:否
307+
* 详细参考 https://pay.weixin.qq.com/wiki/doc/api/H5.php?chapter=15_7&index=6
308+
* </pre>
309+
*/
310+
@XStreamAlias("fingerprint")
311+
private String fingerprint;
302312

303313
public WxPayUnifiedOrderRequest() {
304314
}
@@ -328,6 +338,7 @@ private WxPayUnifiedOrderRequest(Builder builder) {
328338
setOpenid(builder.openid);
329339
setSubOpenid(builder.subOpenid);
330340
setSceneInfo(builder.sceneInfo);
341+
fingerprint = builder.fingerprint;
331342
}
332343

333344
public static Builder newBuilder() {
@@ -518,14 +529,14 @@ public void checkAndSign(WxPayConfig config) throws WxPayException {
518529
}
519530

520531
public static final class Builder {
521-
private String deviceInfo;
522532
private String appid;
523-
private String body;
524533
private String mchId;
525534
private String subAppId;
526535
private String subMchId;
527536
private String nonceStr;
528537
private String sign;
538+
private String deviceInfo;
539+
private String body;
529540
private String detail;
530541
private String attach;
531542
private String outTradeNo;
@@ -542,25 +553,16 @@ public static final class Builder {
542553
private String openid;
543554
private String subOpenid;
544555
private String sceneInfo;
556+
private String fingerprint;
545557

546558
private Builder() {
547559
}
548560

549-
public Builder deviceInfo(String deviceInfo) {
550-
this.deviceInfo = deviceInfo;
551-
return this;
552-
}
553-
554561
public Builder appid(String appid) {
555562
this.appid = appid;
556563
return this;
557564
}
558565

559-
public Builder body(String body) {
560-
this.body = body;
561-
return this;
562-
}
563-
564566
public Builder mchId(String mchId) {
565567
this.mchId = mchId;
566568
return this;
@@ -586,6 +588,16 @@ public Builder sign(String sign) {
586588
return this;
587589
}
588590

591+
public Builder deviceInfo(String deviceInfo) {
592+
this.deviceInfo = deviceInfo;
593+
return this;
594+
}
595+
596+
public Builder body(String body) {
597+
this.body = body;
598+
return this;
599+
}
600+
589601
public Builder detail(String detail) {
590602
this.detail = detail;
591603
return this;
@@ -666,6 +678,11 @@ public Builder sceneInfo(String sceneInfo) {
666678
return this;
667679
}
668680

681+
public Builder fingerprint(String fingerprint) {
682+
this.fingerprint = fingerprint;
683+
return this;
684+
}
685+
669686
public WxPayUnifiedOrderRequest build() {
670687
return new WxPayUnifiedOrderRequest(this);
671688
}

0 commit comments

Comments
 (0)