8000 :new: #2022 【微信支付】增加智慧商圈相关接口和解析支付营销代金券核销回调消息的方法 · binarywang/WxJava@30155b3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 30155b3

Browse files
thinsstar黄星
andauthored
🆕 #2022 【微信支付】增加智慧商圈相关接口和解析支付营销代金券核销回调消息的方法
* 增加解析支付营销代金券核销回调消息解析 * 增加微信支付智慧商圈接口和回调解析 Co-authored-by: 黄星 <huang.xing@aquilaflycloud.com>
1 parent e46c6c1 commit 30155b3

25 files changed

+1226
-56
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
package com.github.binarywang.wxpay.bean.businesscircle;
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/businesscircle/chapter3_1.shtml
13+
* https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/businesscircle/chapter3_3.shtml
14+
* </pre>
15+
*
16+
* @author thinsstar
17+
*/
18+
@NoArgsConstructor
19+
@Data
20+
public class BusinessCircleNotifyData implements Serializable {
21+
private static final long serialVersionUID = 1L;
22+
23+
/**
24+
* 通知ID
25+
*/
26+
@SerializedName("id")
27+
private String id;
28+
29+
/**
30+
* 通知创建时间
31+
*/
32+
@SerializedName("create_time")
33+
private String createTime;
34+
35+
/**
36+
* 通知类型
37+
*/
38+
@SerializedName("event_type")
39+
private String eventType;
40+
41+
/**
42+
* 通知数据类型
43+
*/
44+
@SerializedName("resource_type")
45+
private String resourceType;
46+
47+
/**
48+
* 回调摘要
49+
* summary
50+
*/
51+
@SerializedName("summary")
52+
private String summary;
53+
54+
/**
55+
* 通知数据
56+
*/
57+
@SerializedName("resource")
58+
private Resource resource;
59+
60+
@Data
61+
public static class Resource implements Serializable {
62+
private static final long serialVersionUID = 1L;
63+
/**
64+
* 加密算法类型
65+
*/
66+
@SerializedName("algorithm")
67+
private String algorithm;
68+
69+
/**
70+
* 数据密文
71+
*/
72+
@SerializedName("ciphertext")
73+
private String cipherText;
74+
75+
/**
76+
* 附加数据
77+
*/
78+
@SerializedName("associated_data")
79+
private String associatedData;
80+
81+
/**
82+
* 随机串
83+
*/
84+
@SerializedName("nonce")
85+
private String nonce;
86+
87+
/**
88+
* 原始回调类型
89+
*/
90+
@SerializedName("original_type")
91+
private String originalType;
92+
}
93+
}
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
package com.github.binarywang.wxpay.bean.businesscircle;
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/businesscircle/chapter3_1.shtml
13+
* </pre>
14+
*
15+
* @author thinsstar
16+
*/
17+
@NoArgsConstructor
18+
@Data
19+
public class PaidResult implements Serializable {
20+
21+
private static final long serialVersionUID = 1L;
22+
23+
/**
24+
* 商户号
25+
* <p>
26+
* 微信支付分配的商户号
27+
* 示例值:1230000109
28+
*/
29+
@SerializedName("mchid")
30+
private String mchid;
31+
32+
/**
33+
* 商圈商户名称
34+
* <p>
35+
* 商圈商户名称
36+
* 示例值:微信支付
37+
*/
38+
@SerializedName("merchant_name")
39+
private String merchantName;
40+
41+
/**
42+
* 门店名称
43+
* <p>
44+
* 门店名称,商圈在商圈小程序上圈店时填写的门店名称
45+
* 示例值:微信支付
46+
*/
47+
@SerializedName("shop_name")
48+
private String shopName;
49+
50+
/**
51+
* 门店编号
52+
* <p>
53+
* 门店编号,商圈在商圈小程序上圈店时填写的门店编号,用于跟商圈自身已有的商户识别码对齐
54+
* 示例值:123456
55+
*/
56+
@SerializedName("shop_number")
57+
private String shop_number;
58+
59+
/**
60+
* 小程序APPID
61+
* <p>
62+
* 顾客授权积分时使用的小程序的appid
63+
* 示例值:wxd678efh567hg6787
64+
*/
65+
@SerializedName("appid")
66+
private String appid;
67+
68+
/**
69+
* 用户标识
70+
* <p>
71+
* 顾客授权时使用的小程序上的openid
72+
* 示例值:oUpF8uMuAJ2pxb1Q9zNjWeS6o
73+
*/
74+
@SerializedName("openid")
75+
private String openid;
76+
77+
/**
78+
* 交易完成时间
79+
* <p>
80+
* 交易完成时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒毫秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示北京时间2015年05月20日13点29分35秒(需要增加所有跟时间有关的参数的描述)
81+
* 示例值:2015-05-20T13:29:35+08:00
82+
*/
83+
@SerializedName("time_end")
84+
private String timeEnd;
85+
86+
/**
87+
* 金额
88+
* <p>
89+
* 用户实际消费金额,单位(分)
90+
* 示例值:200
91+
*/
92+
@SerializedName("amount")
93+
private Integer amount;
94+
95+
/**
96+
* 微信支付订单号
97+
* <p>
98+
* 微信支付订单号
99+
* 示例值:1234567890
100+
*/
101+
@SerializedName("transaction_id")
102+
private String transactionId;
103+
104+
/**
105+
* 手动提交积分标记
106+
* <p>
107+
* 手动提交积分标记,自动提交时无该字段,用于区分用户手动申请后推送的积分数据
108+
* 示例值:oUpF8uMuAJ2pxb1Q9zNjWUHsd
109+
*/
110+
@SerializedName("commit_tag")
111+
private String commitTag;
112+
}
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
package com.github.binarywang.wxpay.bean.businesscircle;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
import lombok.AllArgsConstructor;
5+
import lombok.Builder;
6+
import lombok.Data;
7+
import lombok.NoArgsConstructor;
8+
9+
import java.io.Serializable;
10+
11+
/**
12+
* 商圈积分同步
13+
* <pre>
14+
* 文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/businesscircle/chapter3_2.shtml
15+
* </pre>
16+
*
17+
* @author thinsstar
18+
*/
19+
@Data
20+
@Builder
21+
@NoArgsConstructor
22+
@AllArgsConstructor
23+
public class PointsNotifyRequest implements Serializable {
24+
25+
private static final long serialVersionUID = 1L;
26+
27+
/**
28+
* <pre>
29+
* 字段名:商圈商户ID
30+
* 变量名:sub_mchid
31+
* 是否必填:否
32+
* 类型:string[1,64]
33+
* 描述:
34+
* 当以服务商模式管理商圈积分能力时,则要带上商圈商户ID,否则留空
35+
* 示例值:1234567890
36+
* </pre>
37+
*/
38+
@SerializedName(value = "sub_mchid")
39+
private String subMchid;
40+
41+
/**
42+
* <pre>
43+
* 字段名:微信订单号
44+
* 变量名:transaction_id
45+
* 是否必填:是
46+
* 类型:string[1,64]
47+
* 描述:
48+
* 微信支付推送的商圈内交易通知里携带的微信订单号
49+
* 示例值:1217752501201407033233368018
50+
* </pre>
51+
*/
52+
@SerializedName(value = "transaction_id")
53+
private String transactionId;
54+
55+
/**
56+
* <pre>
57+
* 字段名:小程序appid
58+
* 变量名:appid
59+
* 是否必填:是
60+
* 类型:string[1,128]
61+
* 描述:
62+
* 顾客授权积分时使用的小程序的appid
63+
* 示例值:wx1234567890abcdef
64+
* </pre>
65+
*/
66+
@SerializedName(value = "appid")
67+
private String appid;
68+
69+
/**
70+
* <pre>
71+
* 字段名:用户标识
72+
* 变量名:openid
73+
* 是否必填:是
74+
* 类型:string[1,64]
75+
* 描述:
76+
* 顾客授权时使用的小程序上的openid
77 D7AE +
* 示例值:oWmnN4xxxxxxxxxxe92NHIGf1xd8
78+
* </pre>
79+
*/
80+
@SerializedName(value = "openid")
81+
private String openid;
82+
83+
/**
84+
* <pre>
85+
* 字段名:是否获得积分
86+
* 变量名:earn_points
87+
* 是否必填:是
88+
* 类型:boolean
89+
* 描述:
90+
* 用于标明此单是否获得积分,
91+
* true为获得积分,
92+
* false为未获得
93+
* 示例值:true
94+
* </pre>
95+
*/
96+
@SerializedName(value = "earn_points")
97+
private Boolean earnPoints;
98+
99+
/**
100+
* <pre>
101+
* 字段名:订单新增积分值
102+
* 变量名:increased_points
103+
* 是否必填:是
104+
* 类型:int
105+
* 描述:
106+
* 顾客此笔交易新增的积分值
107+
* 示例值:100
108+
* </pre>
109+
*/
110+
@SerializedName(value = "increased_points")
111+
private Integer increasedPoints;
112+
113+
/**
114+
* <pre>
115+
* 字段名:积分更新时间
116+
* 变量名:points_update_time
117+
* 是否必填:是
118+
* 类型:string[1,32]
119+
* 描述:
120+
* 为顾客此笔交易成功积分的时间
121+
* 示例值:2020-05-20T13:29:35.120+08:00
122+
* </pre>
123+
*/
124+
@SerializedName(value = "points_update_time")
125+
private String pointsUpdateTime;
126+
127+
/**
128+
* <pre>
129+
* 字段名:未获得积分的备注信息
130+
* 变量名:no_points_remarks
131+
* 是否必填:否
132+
* 类型:string[1,128]
133+
* 描述:
134+
* 当未获得积分时,提供未获得积分的原因等备注信息
135+
* 示例值:商品不参与积分活动
136+
* </pre>
137+
*/
138+
@SerializedName(value = "no_points_remarks")
139+
private String noPointsRemarks;
140+
141+
/**
142+
* <pre>
143+
* 字段名:顾客积分总额
144+
* 变量名:total_points
145+
* 是否必填:否
146+
* 类型:int
147+
* 描述:
148+
* 当前顾客积分总额
149+
* 示例值:888888
150+
* </pre>
151+
*/
152+
@SerializedName(value = "total_points")
153+
private Integer totalPoints;
154+
}

0 commit comments

Comments
 (0)
0