Skip to content

Commit 6927eaa

Browse files
cloudX2019曾浩
and
曾浩
authored
🆕 #1749 微信支付增加电商收付通支付回调处理相关方法
* new:电商收付通支付回调处理 Co-authored-by: 曾浩 <epdcgsi@dingtalk.com>
1 parent 9359885 commit 6927eaa

File tree

8 files changed

+1119
-2
lines changed

8 files changed

+1119
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,359 @@
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+
import java.util.List;
9+
10+
/**
11+
* 合单支付 通知结果
12+
* <pre>
13+
* 文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/pay/combine/chapter3_7.shtml
14+
* </pre>
15+
*/
16+
@Data
17+
@NoArgsConstructor
18+
public class CombineTransactionsNotifyResult implements Serializable {
19+
20+
/**
21+
* 源数据
22+
*/
23+
private NotifyResponse rawData;
24+
25+
/**
26+
* <pre>
27+
* 字段名:合单商户appid
28+
* 变量名:combine_appid
29+
* 是否必填:是
30+
* 类型:string(32)
31+
* 描述:
32+
* 合单发起方的appid。(即电商平台appid)
33+
* 示例值:wxd678efh567hg6787
34+
* </pre>
35+
*/
36+
@SerializedName(value = "combine_appid")
37+
private String combineAppid;
38+
39+
/**
40+
* <pre>
41+
* 字段名:合单商户号
42+
* 变量名:combine_mchid
43+
* 是否必填:是
44+
* 类型:string(32)
45+
* 描述:
46+
* 合单发起方商户号。(即电商平台mchid)
47+
* 示例值:1900000109
48+
* </pre>
49+
*/
50+
@SerializedName(value = "combine_mchid")
51+
private String combineMchid;
52+
53+
/**
54+
* <pre>
55+
* 字段名:合单商户订单号
56+
* 变量名:combine_out_trade_no
57+
* 是否必填:是
58+
* 类型:string(32)
59+
* 描述:
60+
* 合单支付总订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。
61+
* 示例值:P20150806125346
62+
* </pre>
63+
*/
64+
@SerializedName(value = "combine_out_trade_no")
65+
private String combineOutTradeNo;
66+
67+
/**
68+
* <pre>
69+
* 字段名:+场景信息
70+
* 变量名:scene_info
71+
* 是否必填:否
72+
* 类型:object
73+
* 描述:支付场景信息描述
74+
* </pre>
75+
*/
76+
@SerializedName(value = "scene_info")
77+
private SceneInfo sceneInfo;
78+
79+
/**
80+
* <pre>
81+
* 字段名:+子单信息
82+
* 变量名:sub_orders
83+
* 是否必填:是
84+
* 类型:array
85+
* 描述:
86+
* 最多支持子单条数:50
87+
*
88+
* </pre>
89+
*/
90+
@SerializedName(value = "sub_orders")
91+
private List<SubOrders> subOrders;
92+
93+
/**
94+
* <pre>
95+
* 字段名:+支付者
96+
* 变量名:combine_payer_info
97+
* 是否必填:否
98+
* 类型:object
99+
* 描述:示例值:见请求示例
100+
* </pre>
101+
*/
102+
@SerializedName(value = "combine_payer_info")
103+
private CombinePayerInfo combinePayerInfo;
104+
105+
@Data
106+
@NoArgsConstructor
107+
public static class SubOrders implements Serializable {
108+
/**
109+
* <pre>
110+
* 字段名:子单商户号
111+
* 变量名:mchid
112+
* 是否必填:是
113+
* 类型:string(32)
114+
* 描述:
115+
* 子单发起方商户号,必须与发起方Appid有绑定关系。(即电商平台mchid)
116+
* 示例值:1900000109
117+
* </pre>
118+
*/
119+
@SerializedName(value = "mchid")
120+
private String mchid;
121+
122+
/**
123+
* <pre>
124+
* 字段名:交易类型
125+
* 变量名:trade_type
126+
* 是否必填:是
127+
* 类型:string (16)
128+
* 描述:
129+
* 枚举值:
130+
* NATIVE:扫码支付
131+
* JSAPI:公众号支付
132+
* APP:APP支付
133+
* MWEB:H5支付
134+
* 示例值: JSAPI
135+
* </pre>
136+
*/
137+
@SerializedName(value = "trade_type")
138+
private String tradeType;
139+
140+
/**
141+
* <pre>
142+
* 字段名:交易状态
143+
* 变量名:trade_state
144+
* 是否必填:是
145+
* 类型:string (32)
146+
* 描述:
147+
* 枚举值:
148+
* SUCCESS:支付成功
149+
* REFUND:转入退款
150+
* NOTPAY:未支付
151+
* CLOSED:已关闭
152+
* USERPAYING:用户支付中
153+
* PAYERROR:支付失败(其他原因,如银行返回失败)
154+
* 示例值: SUCCESS
155+
* </pre>
156+
*/
157+
@SerializedName(value = "trade_state")
158+
private String tradeState;
159+
160+
/**
161+
* <pre>
162+
* 字段名:付款银行
163+
* 变量名:bank_type
164+
* 是否必填:否
165+
* 类型:string(16)
166+
* 描述:
167+
* 银行类型,采用字符串类型的银行标识。
168+
* 示例值:CMC
169+
* </pre>
170+
*/
171+
@SerializedName(value = "bank_type")
172+
private String bankType;
173+
174+
/**
175+
* <pre>
176+
* 字段名:附加信息
177+
* 变量名:attach
178+
* 是否必填:是
179+
* 类型:string(128)
180+
* 描述:
181+
* 附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用。
182+
* 示例值:深圳分店
183+
* </pre>
184+
*/
185+
@SerializedName(value = "attach")
186+
private String attach;
187+
188+
/**
189+
* <pre>
190+
* 字段名:支付完成时间
191+
* 变量名:success_time
192+
* 是否必填:是
193+
* 类型:string(16)
194+
* 描述:
195+
* 订单支付时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss:sss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss:sss表示时分秒毫秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35.120+08:00表示,北京时间2015年5月20日 13点29分35秒。
196+
* 示例值:2015-05-20T13:29:35.120+08:00
197+
* </pre>
198+
*/
199+
@SerializedName(value = "success_time")
200+
private String successTime;
201+
202+
/**
203+
* <pre>
204+
* 字段名:微信订单号
205+
* 变量名:transaction_id
206+
* 是否必填:是
207+
* 类型:string(32)
208+
* 描述:
209+
* 微信支付订单号。
210+
* 示例值: 1009660380201506130728806387
211+
* </pre>
212+
*/
213+
@SerializedName(value = "transaction_id")
214+
private String transactionId;
215+
216+
/**
217+
* <pre>
218+
* 字段名:子单商户订单号
219+
* 变量名:out_trade_no
220+
* 是否必填:是
221+
* 类型:string(32)
222+
* 描述:
223+
* 商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。
224+
* 特殊规则:最小字符长度为6
225+
* 示例值:20150806125346
226+
* </pre>
227+
*/
228+
@SerializedName(value = "out_trade_no")
229+
private String outTradeNo;
230+
231+
/**
232+
* <pre>
233+
* 字段名:二级商户号
234+
* 变量名:sub_mchid
235+
* 是否必填:是
236+
* 类型:string(32)
237+
* 描述:
238+
* 二级商户商户号,由微信支付生成并下发。
239+
* 注意:仅适用于电商平台 服务商
240+
* 示例值:1900000109
241+
* </pre>
242+
*/
243+
@SerializedName(value = "sub_mchid")
244+
private String subMchid;
245+
246+
/**
247+
* <pre>
248+
* 字段名:+订单金额
249+
* 变量名:amount
250+
* 是否必填:是
251+
* 类型:object
252+
* 描述:订单金额信息
253+
* </pre>
254+
*/
255+
@SerializedName(value = "amount")
256+
private Amount amount;
257+
258+
}
259+
260+
@Data
261+
@NoArgsConstructor
262+
public static class SceneInfo implements Serializable {
263+
/**
264+
* <pre>
265+
* 字段名:商户端设备号
266+
* 变量名:device_id
267+
* 是否必填:否
268+
* 类型:string(16)
269+
* 描述:
270+
* 终端设备号(门店号或收银设备ID)。
271+
* 特殊规则:长度最小7个字节
272+
* 示例值:POS1:1
273+
* </pre>
274+
*/
275+
@SerializedName(value = "device_id")
276+
private String deviceId;
277+
278+
}
279+
280+
@Data
281+
@NoArgsConstructor
282+
public static class CombinePayerInfo implements Serializable {
283+
/**
284+
* <pre>
285+
* 字段名:用户标识
286+
* 变量名:openid
287+
* 是否必填:是
288+
* 类型:string(128)
289+
* 描述:
290+
* 使用合单appid获取的对应用户openid。是用户在商户appid下的唯一标识。
291+
* 示例值:oUpF8uMuAJO_M2pxb1Q9zNjWeS6o
292+
* </pre>
293+
*/
294+
@SerializedName(value = "openid")
295+
private String openid;
296+
297+
}
298+
299+
@Data
300+
@NoArgsConstructor
301+
public static class Amount implements Serializable {
302+
/**
303+
* <pre>
304+
* 字段名:标价金额
305+
* 变量名:total_amount
306+
* 是否必填:是
307+
* 类型:int64
308+
* 描述:
309+
* 子单金额,单位为分。
310+
* 示例值:100
311+
* </pre>
312+
*/
313+
@SerializedName(value = "total_amount")
314+
private Integer totalAmount;
315+
316+
/**
317+
* <pre>
318+
* 字段名:标价币种
319+
* 变量名:currency
320+
* 是否必填:是
321+
* 类型:string(8)
322+
* 描述:
323+
* 符合ISO 4217标准的三位字母代码,人民币:CNY。
324+
* 示例值:CNY
325+
* </pre>
326+
*/
327+
@SerializedName(value = "currency")
328+
private String currency;
329+
330+
/**
331+
* <pre>
332+
* 字段名:现金支付金额
333+
* 变量名:payer_amount
334+
* 是否必填:是
335+
* 类型:int64
336+
* 描述:
337+
* 订单现金支付金额。
338+
* 示例值:10
339+
* </pre>
340+
*/
341+
@SerializedName(value = "payer_amount")
342+
private Integer payerAmount;
343+
344+
/**
345+
* <pre>
346+
* 字段名:现金支付币种
347+
* 变量名:payer_currency
348+
* 是否必填:是
349+
* 类型:string(8)
350+
* 描述:
351+
* 货币类型,符合ISO 4217标准的三位字母代码,默认人民币:CNY。
352+
* 示例值: CNY
353+
* </pre>
354+
*/
355+
@SerializedName(value = "payer_currency")
356+
private String payerCurrency;
357+
}
358+
359+
}

0 commit comments

Comments
 (0)