1 package com.foxinmy.weixin4j.payment.mch;
2
3 import java.util.Date;
4
5 import javax.xml.bind.annotation.XmlAccessType;
6 import javax.xml.bind.annotation.XmlAccessorType;
7 import javax.xml.bind.annotation.XmlElement;
8 import javax.xml.bind.annotation.XmlRootElement;
9
10 import com.alibaba.fastjson.annotation.JSONField;
11 import com.foxinmy.weixin4j.payment.PayPackage;
12 import com.foxinmy.weixin4j.type.CurrencyType;
13 import com.foxinmy.weixin4j.type.TradeType;
14
15
16
17
18
19
20
21
22
23
24
25 @Deprecated
26 @XmlRootElement
27 @XmlAccessorType(XmlAccessType.FIELD)
28 public class MchPayPackage extends PayPackage {
29
30 private static final long serialVersionUID = 8944928173669656177L;
31
32
33
34
35 @XmlElement(name = "trade_type")
36 @JSONField(name = "trade_type")
37 private String tradeType;
38
39
40
41 @XmlElement(name = "fee_type")
42 @JSONField(name = "fee_type")
43 private String feeType;
44
45
46
47 @XmlElement(name = "openid")
48 @JSONField(name = "openid")
49 private String openId;
50
51
52
53
54 @XmlElement(name = "product_id")
55 @JSONField(name = "product_id")
56 private String productId;
57
58
59
60
61 @XmlElement(name = "auth_code")
62 @JSONField(name = "auth_code")
63 private String authCode;
64
65
66
67 @XmlElement(name = "limit_pay")
68 @JSONField(name = "limit_pay")
69 private String limitPay;
70
71
72
73 @XmlElement(name = "sub_openid")
74 @JSONField(name = "sub_openid")
75 private String subOpenId;
76
77
78
79 @XmlElement(name = "scene_info")
80 @JSONField(name = "scene_info")
81 private String sceneInfo;
82
83 protected MchPayPackage() {
84
85 }
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111 public MchPayPackage(String body, String outTradeNo, double totalFee,
112 String notifyUrl, String createIp, TradeType tradeType,
113 String openId, String authCode, String productId, String attach) {
114 this(body, null, outTradeNo, totalFee, CurrencyType.CNY, notifyUrl,
115 createIp, tradeType, openId, authCode, productId, attach, null,
116 null, null, null, null);
117 }
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158 public MchPayPackage(String body, String detial, String outTradeNo,
159 double totalFee, CurrencyType feeType, String notifyUrl,
160 String createIp, TradeType tradeType, String openId,
161 String authCode, String productId, String attach, Date timeStart,
162 Date timeExpire, String goodsTag, String limitPay, String subOpenId) {
163 super(body, detial, outTradeNo, totalFee, notifyUrl, createIp, attach,
164 timeStart, timeExpire, goodsTag);
165 this.tradeType = tradeType != null ? tradeType.name() : null;
166 this.feeType = feeType == null ? CurrencyType.CNY.name() : feeType
167 .name();
168 this.openId = openId;
169 this.authCode = authCode;
170 this.productId = productId;
171 this.limitPay = limitPay;
172 this.subOpenId = subOpenId;
173 }
174
175 public String getTradeType() {
176 return tradeType;
177 }
178
179 public String getFeeType() {
180 return feeType;
181 }
182
183 public String getOpenId() {
184 return openId;
185 }
186
187 public String getAuthCode() {
188 return authCode;
189 }
190
191 public String getProductId() {
192 return productId;
193 }
194
195 public String getLimitPay() {
196 return limitPay;
197 }
198
199 public void setLimitPay(String limitPay) {
200 this.limitPay = limitPay;
201 }
202
203 public String getSubOpenId() {
204 return subOpenId;
205 }
206
207 public void setSubOpenId(String subOpenId) {
208 this.subOpenId = subOpenId;
209 }
210
211 public String getSceneInfo() {
212 return sceneInfo;
213 }
214
215 public void setSceneInfo(String sceneInfo) {
216 this.sceneInfo = sceneInfo;
217 }
218
219 @Override
220 public String toString() {
221 return "MchPayPackage [tradeType=" + tradeType + ",feeType=" + feeType
222 + ", openId=" + openId + ", productId=" + productId
223 + ", authCode=" + authCode + ", limitPay=" + limitPay
224 + ", subOpenId=" + subOpenId + ", sceneInfo=" + sceneInfo
225 + ", " + super.toString() + "]";
226 }
227 }