Skip to content

Commit 807ed7d

Browse files
authored
🆕 #1775 微信支付电商收付通增加修改二级商户结算账户和退款查询的接口
1 parent 5f0d1b3 commit 807ed7d

11 files changed

+1181
-10
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 CombineTransactionsResult.SceneInfo sceneInfo;
72+
private 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<CombineTransactionsResult.SubOrders> subOrders;
86+
private List<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 CombineTransactionsResult.CombinePayerInfo combinePayerInfo;
98+
private 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 CombineTransactionsResult.Amount amount;
251+
private Amount amount;
252252

253253
}
254254

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 PartnerTransactionsResult.CombinePayerInfo combinePayerInfo;
206+
private CombinePayerInfo combinePayerInfo;
207207

208208
/**
209209
* <pre>
@@ -215,7 +215,7 @@ public class PartnerTransactionsResult implements Serializable {
215215
* </pre>
216216
*/
217217
@SerializedName(value = "amount")
218-
private PartnerTransactionsResult.Amount amount;
218+
private 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 PartnerTransactionsResult.SceneInfo sceneInfo;
230+
private 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<PartnerTransactionsResult.PromotionDetail> promotionDetails;
242+
private List<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<PartnerTransactionsResult.GoodsDetail> goodsDetails;
510+
private List<GoodsDetail> goodsDetails;
511511

512512

513513
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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+
@Data
10+
@NoArgsConstructor
11+
public class ProfitSharingQueryRequest implements Serializable {
12+
13+
/**
14+
* <pre>
15+
* 字段名:二级商户号
16+
* 变量名:sub_mchid
17+
* 是否必填:是
18+
* 类型:string(32)
19+
* 描述:
20+
* 分账出资的电商平台二级商户,填写微信支付分配的商户号。
21+
* 示例值:1900000109
22+
* </pre>
23+
*/
24+
@SerializedName(value = "sub_mchid")
25+
private String subMchid;
26+
27+
/**
28+
* <pre>
29+
* 字段名:微信订单号
30+
* 变量名:transaction_id
31+
* 是否必填:是
32+
* 类型:string(32)
33+
* 描述:
34+
* 微信支付订单号。
35+
* 示例值: 4208450740201411110007820472
36+
* </pre>
37+
*/
38+
@SerializedName(value = "transaction_id")
39+
private String transactionId;
40+
41+
/**
42+
* <pre>
43+
* 字段名:商户分账单号
44+
* 变量名:out_order_no
45+
* 是否必填:是
46+
* 类型:string(64)
47+
* 描述:
48+
* 商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次。
49+
* 示例值:P20150806125346
50+
* </pre>
51+
*/
52+
@SerializedName(value = "out_order_no")
53+
private String outOrderNo;
54+
}

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

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import lombok.NoArgsConstructor;
66

77
import java.io.Serializable;
8+
import java.util.List;
89

910
/**
1011
* 请求分账 结果响应
@@ -72,4 +73,209 @@ public class ProfitSharingResult implements Serializable {
7273
@SerializedName(value = "order_id")
7374
private String orderId;
7475

76+
/**
77+
* <pre>
78+
* 字段名:分账单状态
79+
* 变量名:status
80+
* 是否必填:是
81+
* 类型:string (64)
82+
* 描述:
83+
* 分账单状态,枚举值:
84+
* ACCEPTED:受理成功
85+
* PROCESSING:处理中
86+
* FINISHED:分账成功
87+
* CLOSED:处理失败,已关单
88+
* 示例值:FINISHED
89+
* </pre>
90+
*/
91+
@SerializedName(value = "status")
92+
private String status;
93+
94+
/**
95+
* <pre>
96+
* 字段名:分账接收方列表
97+
* 变量名:receivers
98+
* 是否必填:否
99+
* 类型:array
100+
* 描述:
101+
* 分账接收方列表。当查询分账完结的执行结果时,不返回该字段
102+
* </pre>
103+
*/
104+
@SerializedName(value = "receivers")
105+
private List<Receiver> receivers;
106+
/**
107+
* <pre>
108+
* 字段名:关单原因
109+
* 变量名:close_reason
110+
* 是否必填:否
111+
* 类型:string (32)
112+
* 描述:
113+
* 关单原因描述,当分账单状态status为CLOSED(处理失败,已关单)时,返回该字段。
114+
* 枚举值:
115+
* NO_AUTH:分账授权已解除
116+
* 示例值:NO_AUTH
117+
* </pre>
118+
*/
119+
@SerializedName(value = "close_reason")
120+
private String closeReason;
121+
122+
/**
123+
* <pre>
124+
* 字段名:分账完结金额
125+
* 变量名:finish_amount
126+
* 是否必填:否
127+
* 类型:int
128+
* 描述:
129+
* 分账完结的分账金额,单位为分, 仅当查询分账完结的执行结果时,存在本字段。
130+
* 示例值:100
131+
* </pre>
132+
*/
133+
@SerializedName(value = "finish_amount")
134+
private Integer finishAmount;
135+
136+
/**
137+
* <pre>
138+
* 字段名:分账完结描述
139+
* 变量名:finish_description
140+
* 是否必填:否
141+
* 类型:string (80)
142+
* 描述:
143+
* 分账完结的原因描述,仅当查询分账完结的执行结果时,存在本字段。
144+
* 示例值:分账完结
145+
* </pre>
146+
*/
147+
@SerializedName(value = "finish_description")
148+
private String finishDescription;
149+
150+
@Data
151+
@NoArgsConstructor
152+
public static class Receiver implements Serializable {
153+
154+
/**
155+
* <pre>
156+
* 字段名:分账接收商户号
157+
* 变量名:receiver_mchid
158+
* 是否必填:是
159+
* 类型:string (32)
160+
* 描述:
161+
* 填写微信支付分配的商户号,仅支持通过添加分账接收方接口添加的接收方;电商平台商户已默认添加到分账接收方,无需重复添加。
162+
* 示例值:1900000109
163+
* </pre>
164+
*/
165+
@SerializedName(value = "receiver_mchid")
166+
private String receiverMchid;
167+
168+
/**
169+
* <pre>
170+
* 字段名:分账金额
171+
* 变量名:amount
172+
* 是否必填:否
173+
* 类型:int
174+
* 描述:
175+
* 分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额。
176+
* 示例值: 4208450740201411110007820472
177+
* </pre>
178+
*/
179+
@SerializedName(value = "amount")
180+
private Integer amount;
181+
182+
/**
183+
* <pre>
184+
* 字段名:分账描述
185+
* 变量名:description
186+
* 是否必填:是
187+
* 类型:string (80)
188+
* 描述:
189+
* 分账的原因描述,分账账单中需要体现。
190+
* 示例值:分帐1900000110
191+
* </pre>
192+
*/
193+
@SerializedName(value = "description")
194+
private String description;
195+
196+
/**
197+
* <pre>
198+
* 字段名:分账结果
199+
* 变量名:result
200+
* 是否必填:是
201+
* 类型:string (32)
202+
* 描述:
203+
* 分账结果,枚举值:
204+
* PENDING:待分账
205+
* SUCCESS:分账成功
206+
* ADJUST:分账失败待调账
207+
* RETURNED:已转回分账方
208+
* CLOSED:已关闭
209+
* 示例值:SUCCESS
210+
* </pre>
211+
*/
212+
@SerializedName(value = "result")
213+
private String result;
214+
215+
/**
216+
* <pre>
217+
* 字段名:完成时间
218+
* 变量名:finish_time
219+
* 是否必填:是
220+
* 类型:string (64)
221+
* 描述:
222+
* 分账完成时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss.sss+TIMEZONE,YYYY-MM-DD表示年月日,
223+
* T出现在字符串中,表示time元素的开头,HH:mm:ss.sss表示时分秒毫秒,TIMEZONE表示时区
224+
* (+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35.120+08:00表示,北京时间2015年5月20日 13点29分35秒。
225+
* 示例值: 2015-05-20T13:29:35.120+08:00
226+
* </pre>
227+
*/
228+
@SerializedName(value = "finish_time")
229+
private String finishTime;
230+
231+
/**
232+
* <pre>
233+
* 字段名:分账失败原因
234+
* 变量名:fail_reason
235+
* 是否必填:否
236+
* 类型:string (32)
237+
* 描述:
238+
* 分账失败原因,当分账结果result为RETURNED(已转回分账方)或CLOSED(已关闭)时,返回该字段
239+
* 枚举值:
240+
* ACCOUNT_ABNORMAL:分账接收账户异常
241+
* NO_RELATION:分账关系已解除
242+
* RECEIVER_HIGH_RISK:高风险接收方
243+
* 示例值:NO_RELATION
244+
* </pre>
245+
*/
246+
@SerializedName(value = "fail_reason")
247+
private String failReason;
248+
249+
/**
250+
* <pre>
251+
* 字段名:分账接收方类型
252+
* 变量名:type
253+
* 是否必填:是
254+
* 类型:string (32)
255+
* 描述:
256+
* 分账接收方类型,枚举值:
257+
* MERCHANT_ID:商户
258+
* PERSONAL_OPENID:个人
259+
* 示例值:MERCHANT_ID
260+
* </pre>
261+
*/
262+
@SerializedName(value = "type")
263+
private String type;
264+
265+
/**
266+
* <pre>
267+
* 字段名:分账接收方类型
268+
* 变量名:receiver_account
269+
* 是否必填:是
270+
* 类型:string (64)
271+
* 描述:
272+
* 分账接收方账号:
273+
* 类型是MERCHANT_ID时,是商户ID
274+
* 类型是PERSONAL_OPENID时,是个人openid
275+
* 示例值:1900000109
276+
* </pre>
277+
*/
278+
@SerializedName(value = "receiver_account")
279+
private String receiverAccount;
280+
}
75281
}

0 commit comments

Comments
 (0)