-
Notifications
You must be signed in to change notification settings - Fork 473
/
WeChatPayUnifiedOrderNotify.cs
208 lines (176 loc) · 5.33 KB
/
WeChatPayUnifiedOrderNotify.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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
112
113
114
115
116
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
using System.Collections.Generic;
using System.Xml.Serialization;
using Essensoft.AspNetCore.Payment.WeChatPay.V2.Domain;
using Essensoft.AspNetCore.Payment.WeChatPay.V2.Parser;
namespace Essensoft.AspNetCore.Payment.WeChatPay.V2.Notify
{
/// <summary>
/// 统一下单 - 支付结果通知 (普通商户 / 服务商)
/// </summary>
[XmlRoot("xml")]
public class WeChatPayUnifiedOrderNotify : WeChatPayNotify
{
/// <summary>
/// 返回状态码
/// </summary>
[XmlElement("return_code")]
public string ReturnCode { get; set; }
/// <summary>
/// 返回信息
/// </summary>
[XmlElement("return_msg")]
public string ReturnMsg { get; set; }
/// <summary>
/// 应用号
/// </summary>
[XmlElement("appid")]
public string AppId { get; set; }
/// <summary>
/// 商户号
/// </summary>
[XmlElement("mch_id")]
public string MchId { get; set; }
/// <summary>
/// 子商户应用号
/// </summary>
[XmlElement("sub_appid")]
public string SubAppId { get; set; }
/// <summary>
/// 子商户号
/// </summary>
[XmlElement("sub_mch_id")]
public string SubMchId { get; set; }
/// <summary>
/// 设备号
/// </summary>
[XmlElement("device_info")]
public string DeviceInfo { get; set; }
/// <summary>
/// 是否关注公众账号
/// </summary>
[XmlElement("is_subscribe")]
public string IsSubscribe { get; set; }
/// <summary>
/// 随机字符串
/// </summary>
[XmlElement("nonce_str")]
public string NonceStr { get; set; }
/// <summary>
/// 是否关注子公众账号
/// </summary>
[XmlElement("sub_is_subscribe")]
public string SubIsSubscribe { get; set; }
/// <summary>
/// 签名
/// </summary>
[XmlElement("sign")]
public string Sign { get; set; }
/// <summary>
/// 签名类型
/// </summary>
[XmlElement("sign_type")]
public string SignType { get; set; }
/// <summary>
/// 业务结果
/// </summary>
[XmlElement("result_code")]
public string ResultCode { get; set; }
/// <summary>
/// 错误代码
/// </summary>
[XmlElement("err_code")]
public string ErrCode { get; set; }
/// <summary>
/// 错误描述
/// </summary>
[XmlElement("err_code_des")]
public string ErrCodeDes { get; set; }
/// <summary>
/// 用户标识
/// </summary>
[XmlElement("openid")]
public string OpenId { get; set; }
/// <summary>
/// 用户子标识
/// </summary>
[XmlElement("sub_openid")]
public string SubOpenId { get; set; }
/// <summary>
/// 交易类型
/// </summary>
[XmlElement("trade_type")]
public string TradeType { get; set; }
/// <summary>
/// 付款银行
/// </summary>
[XmlElement("bank_type")]
public string BankType { get; set; }
/// <summary>
/// 总金额
/// </summary>
[XmlElement("total_fee")]
public int TotalFee { get; set; }
/// <summary>
/// 货币种类
/// </summary>
[XmlElement("fee_type")]
public string FeeType { get; set; }
/// <summary>
/// 现金支付金额
/// </summary>
[XmlElement("cash_fee")]
public string CashFee { get; set; }
/// <summary>
/// 现金支付货币类型
/// </summary>
[XmlElement("cash_fee_type")]
public string CashFeeType { get; set; }
/// <summary>
/// 应结订单金额
/// </summary>
[XmlElement("settlement_total_fee")]
public string SettlementTotalFee { get; set; }
/// <summary>
/// 代金券金额
/// </summary>
[XmlElement("coupon_fee")]
public string CouponFee { get; set; }
/// <summary>
/// 代金券使用数量
/// </summary>
[XmlElement("coupon_count")]
public string CouponCount { get; set; }
/// <summary>
/// 代金券信息
/// </summary>
[XmlIgnore]
public List<CouponInfo> CouponInfos { get; set; }
/// <summary>
/// 微信支付订单号
/// </summary>
[XmlElement("transaction_id")]
public string TransactionId { get; set; }
/// <summary>
/// 商户订单号
/// </summary>
[XmlElement("out_trade_no")]
public string OutTradeNo { get; set; }
/// <summary>
/// 商家数据包
/// </summary>
[XmlElement("attach")]
public string Attach { get; set; }
/// <summary>
/// 支付完成时间
/// </summary>
[XmlElement("time_end")]
public string TimeEnd { get; set; }
/// <summary>
/// 处理 _$n / _$n_$m
/// </summary>
internal override void Execute()
{
CouponInfos = WeChatPayListPropertyParser.Parse<CouponInfo>(Parameters);
}
}
}