8000 new:电商收付通商户、平台提现 · Dream2Land/WxJava@00bc965 · GitHub
[go: up one dir, main page]

Skip to content

Commit 00bc965

Browse files
author
曾浩
committed
new:电商收付通商户、平台提现
1 parent 9b20c74 commit 00bc965

File tree

8 files changed

+339
-9
lines changed

8 files changed

+339
-9
lines changed

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/CombineTransactionsResult.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public class CombineTransactionsResult implements Serializable {
6969
* </pre>
7070
*/
7171
@SerializedName(value = "scene_info")
72-
private CombineTransactionsNotifyResult.SceneInfo sceneInfo;
72+
private CombineTransactionsResult.SceneInfo sceneInfo;
7373

7474
/**
7575
* <pre>
@@ -83,7 +83,7 @@ public class CombineTransactionsResult implements Serializable {
8383
* </pre>
8484
*/
8585
@SerializedName(value = "sub_orders")
86-
private List<CombineTransactionsNotifyResult.SubOrders> subOrders;
86+
private List<CombineTransactionsResult.SubOrders> subOrders;
8787

8888
/**
8989
* <pre>
@@ -95,7 +95,7 @@ public class CombineTransactionsResult implements Serializable {
9595
* </pre>
9696
*/
9797
@SerializedName(value = "combine_payer_info")
98-
private CombineTransactionsNotifyResult.CombinePayerInfo combinePayerInfo;
98+
private CombineTransactionsResult.CombinePayerInfo combinePayerInfo;
9999

100100
@Data
101101
@NoArgsConstructor
@@ -248,7 +248,7 @@ public static class SubOrders implements Serializable {
248248
* </pre>
249249
*/
250250
@SerializedName(value = "amount")
251-
private CombineTransactionsNotifyResult.Amount amount;
251+
private CombineTransactionsResult.Amount amount;
252252

253253
}
254254

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
package com.github.binarywang.wxpay.bean.ecommerce;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
import lombok.Data;
5+
import lombok.NoArgsConstructor;
6+
7+
import java.io.Serializable;
8+
9+
/**
10+
* 二级商户账户余额提现
11+
* <pre>
12+
* 文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/pay/combine/chapter3_3.shtml
13+
* </pre>
14+
*/
15+
@Data
16+
@NoArgsConstructor
17+
public class EcommerceWithdrawRequest implements Serializable {
18+
19+
/**
20+
* <pre>
21+
* 字段名:二级商户号
22+
* 变量名:sub_mchid
23+
* 是否必填:是
24+
* 类型:string(32)
25+
* 描述:
26+
* 电商平台二级商户号,由微信支付生成并下发。
27+
* 示例值:1900000109
28+
* </pre>
29+
*/
30+
@SerializedName(value = "sub_mchid")
31+
private String subMchid;
32+
33+
/**
34+
* <pre>
35+
* 字段名:商户提现单号
36+
* 变量名:out_request_no
37+
* 是否必填:是
38+
* 类型:string(32)
39+
* 描述:
40+
* 必须是字母数字
41+
* 示例值: 20190611222222222200000000012122
42+
* </pre>
43+
*/
44+
@SerializedName(value = "out_request_no")
45+
private String outRequestNo;
46+
47+
/**
48+
* <pre>
49+
* 字段名:提现金额
50+
* 变量名:amount
51+
* 是否必填:是
52+
* 类型:int64
53+
* 描述:
54+
* 提现金额(单位:分)
55+
* 示例值:100
56+
* </pre>
57+
*/
58+
@SerializedName(value = "amount")
59+
private Integer amount;
60+
61+
/**
62+
* <pre>
63+
* 字段名:备注
64+
* 变量名:remark
65+
* 是否必填:否
66+
* 类型:string(56)
67+
* 描述:
68+
* 商户对提现单的备注
69+
* 示例值:交易提现
70+
* </pre>
71+
*/
72+
@SerializedName(value = "remark")
73+
private String remark;
74+
75+
/**
76+
* <pre>
77+
* 字段名:银行附言
78+
* 变量名:bank_memo
79+
* 是否必填:否
80+
* 类型:string(32)
81+
* 描述:
82+
* 展示在收款银行系统中的附言,数字、字母最长32个汉字(能否成功展示依赖银行系统支持)。
83+
* 示例值:微信支付提现
84+
* </pre>
85+
*/
86+
@SerializedName(value = "bank_memo")
87+
private String bankMemo;
88+
89+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
package com.github.binarywang.wxpay.bean.ecommerce;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
import lombok.Data;
5+
import lombok.NoArgsConstructor;
6+
7+
import java.io.Serializable;
8+
9+
/**
10+
* 二级商户账户余额提现 结果
11+
* <pre>
12+
* 文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/ecommerce/fund/chapter3_2.shtml
13+
* </pre>
14+
*/
15+
@Data
16+
@NoArgsConstructor
17+
public class EcommerceWithdrawResult implements Serializable {
18+
19+
/**
20+
* <pre>
21+
* 字段名:二级商户号
22+
* 变量名:sub_mchid
23+
* 是否必填:是
24+
* 类型:string(32)
25+
* 描述:
26+
* 电商平台二级商户号,由微信支付生成并下发。
27+
* 示例值:1900000109
28+
* </pre>
29+
*/
30+
@SerializedName(value = "sub_mchid")
31+
private String subMchid;
32+
33+
/**
34+
* <pre>
35+
* 字段名:微信支付提现单号
36+
* 变量名:withdraw_id
37+
* 是否必填:是
38+
* 类型:string(128)
39+
* 描述:
40+
* 电商平台提交二级商户提现申请后,由微信支付返回的申请单号,作为查询申请状态的唯一标识。
41+
* 示例值: 12321937198237912739132791732912793127931279317929791239112123
42+
* </pre>
43+
*/
44+
@SerializedName(value = "withdraw_id")
45+
private String withdrawId;
46+
47+
/**
48+
* <pre>
49+
* 字段名:商户提现单号
50+
* 变量名:out_request_no
51+
* 是否必填:否
52+
* 类型:string(32)
53+
* 描述:
54+
* 必须是字母数字
55+
* 示例值: 20190611222222222200000000012122
56+
* </pre>
57+
*/
58+
@SerializedName(value = "out_request_no")
59+
private String outRequestNo;
60+
}
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
package com.github.binarywang.wxpay.bean.ecommerce;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
import lombok.Data;
5+
import lombok.NoArgsConstructor;
6+
7+
import java.io.Serializable;
8+
9+
/**
10+
* 电商平台提现
11+
* <pre>
12+
* 文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/ecommerce/fund/chapter3_5.shtml
13+
* </pre>
14+
*/
15+
@Data
16+
@NoArgsConstructor
17+
public class MerchantWithdrawRequest implements Serializable {
18+
/**
19+
* <pre>
20+
* 字段名:商户提现单号
21+
* 变量名:out_request_no
22+
* 是否必填:是
23+
* 类型:string(32)
24+
* 描述:
25+
* 商户提现单号,由商户自定义生成。
26+
* 示例值:20190611222222222200000000012122
27+
* </pre>
28+
*/
29+
@SerializedName(value = "out_request_no")
30+
private String outRequestNo;
31+
32+
/**
33+
* <pre>
34+
* 字段名:提现金额
35+
* 变量名:amount
36+
* 是否必填:是
37+
* 类型:int64
38+
* 描述:
39+
* 提现金额,单位:分(RMB)
40+
* 示例值:1
41+
* </pre>
42+
*/
43+
@SerializedName(value = "amount")
44+
private Integer amount;
45+
46+
/**
47+
* <pre>
48+
* 字段名:备注
49+
* 变量名:remark
50+
* 是否必填:否
51+
* 类型:string(56)
52+
* 描述:
53+
* 商户对提现单的备注
54+
* 示例值:交易提现
55+
* </pre>
56+
*/
57+
@SerializedName(value = "remark")
58+
private String remark;
59+
60+
/**
61+
* <pre>
62+
* 字段名:银行附言
63+
* 变量名:bank_memo
64+
* 是否必填:否
65+
* 类型:string(32)
66+
* 描述:
67+
* 展示在收款银行系统中的附言,数字、字母最长32个汉字(能否成功展示依赖银行系统支持)。
68+
* 示例值:xx平台提现
69+
* </pre>
70+
*/
71+
@SerializedName(value = "bank_memo")
72+
private String bankMemo;
73+
74+
/**
75+
* <pre>
76+
* 字段名:账户类型
77+
* 变量名:account_type
78+
* 是否必填:是
79+
* 类型:string(16)
80+
* 描述:
81+
* 枚举值:
82+
* BASIC:基本账户
83+
* OPERATION:运营账户
84+
* FEES:手续费账户
85+
* 示例值:BASIC
86+
* </pre>
87+
*/
88+
@SerializedName(value = "account_type")
89+
private String accountType;
90+
91+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package com.github.binarywang.wxpay.bean.ecommerce;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
import lombok.Data;
5+
import lombok.NoArgsConstructor;
6+
7+
import java.io.Serializable;
8+
9+
/**
10+
* 电商平台提现 结果
11+
* <pre>
12+
* 文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/ecommerce/fund/chapter3_5.shtml
13+
* </pre>
14+
*/
15+
@Data
16+
@NoArgsConstructor
17+
public class MerchantWithdrawResult implements Serializable {
18+
19+
/**
20+
* <pre>
21+
* 字段名:微信支付提现单号
22+
* 变量名:withdraw_id
23+
* 是否必填:否 (文档里面是【否】,理论上应该都有值)
24+
* 类型:string(128)
25+
* 描述:
26+
* 微信支付系统生成的提现单号。
27+
* 示例值:12321937198237912739132791732912793127931279317929791239112123
28+
* </pre>
29+
*/
30+
@SerializedName(value = "withdraw_id")
31+
private String withdrawId;
32+
33+
/**
34+
* <pre>
35+
* 字段名:商户提现单号
36+
* 变量名:out_request_no
37+
* 是否必填:是
38+
* 类型:string(32)
39+
* 描述:
40+
* 必须是字母数字
41+
* 示例值: 20190611222222222200000000012122
42+
* </pre>
43+
*/
44+
@SerializedName(value = "out_request_no")
45+
private String outRequestNo;
46+
}

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsResult.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public class PartnerTransactionsResult implements Serializable {
203203
* </pre>
204204
*/
205205
@SerializedName(value = "combine_payer_info")
206-
private PartnerTransactionsNotifyResult.CombinePayerInfo combinePayerInfo;
206+
private PartnerTransactionsResult.CombinePayerInfo combinePayerInfo;
207207

208208
/**
209209
* <pre>
@@ -215,7 +215,7 @@ public class PartnerTransactionsResult implements Serializable {
215215
* </pre>
216216
*/
217217
@SerializedName(value = "amount")
218-
private PartnerTransactionsNotifyResult.Amount amount;
218+
private PartnerTransactionsResult.Amount amount;
219219

220220
/**
221221
* <pre>
@@ -227,7 +227,7 @@ public class PartnerTransactionsResult implements Serializable {
227227
* </pre>
228228
*/
229229
@SerializedName(value = "scene_info")
230-
private PartnerTransactionsNotifyResult.SceneInfo sceneInfo;
230+
private PartnerTransactionsResult.SceneInfo sceneInfo;
231231

232232
/**
233233
* <pre>
@@ -239,7 +239,7 @@ public class PartnerTransactionsResult implements Serializable {
239239
* </pre>
240240
*/
241241
@SerializedName(value = "promotion_detail")
242-
private List<PartnerTransactionsNotifyResult.PromotionDetail> promotionDetails;
242+
private List<PartnerTransactionsResult.PromotionDetail> promotionDetails;
243243

244244
@Data
245245
@NoArgsConstructor
@@ -507,7 +507,7 @@ public static class PromotionDetail implements Serializable {
507507
* </pre>
508508
*/
509509
@SerializedName(value = "goods_detail")
510-
private List<PartnerTransactionsNotifyResult.GoodsDetail> goodsDetails;
510+
private List<PartnerTransactionsResult.GoodsDetail> goodsDetails;
511511

512512

513513
}

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,4 +261,27 @@ public interface EcommerceService {
261261
*/
262262
RefundsResult refunds(RefundsRequest request) throws WxPayException;
263263

264+
/**
265+
* <pre>
266+
* 二级商户账户余额提现API
267+
* 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/ecommerce/fund/chapter3_2.shtml
268+
* </pre>
269+
*
270+
* @param request 提现请求
271+
* @return 返回数据 return withdraw result
272+
* @throws WxPayException the wx pay exception
273+
*/
274+
EcommerceWithdrawResult withdraw(EcommerceWithdrawRequest request) throws WxPayException;
275+
276+
/**
277+
* <pre>
278+
* 电商平台提现API
279+
* 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/ecommerce/fund/chapter3_5.shtml
280+
* </pre>
281+
*
282+
* @param request 提现请求
283+
* @return 返回数据 return withdraw result
284+
* @throws WxPayException the wx pay exception
285+
*/
286+
MerchantWithdrawResult withdraw(MerchantWithdrawRequest request) throws WxPayException;
264287
}

0 commit comments

Comments
 (0)
0