zhengyuxuan
2025-04-02 ebd007c8948a0c1cf73b86656aeb71278917c2b3
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
209
210
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace LifePayment.Domain.Shared
{
    [Serializable]
    public class AliRechargeNotifyInput : AliNotifyBaseInput
    {
        /// <summary>
        /// 支付宝交易号,支付宝交易凭证号
        /// </summary>
        [JsonProperty("trade_no")]
        [Required]
        public string TradeNo { set; get; }
 
        /// <summary>
        /// 支付宝应用的APPID
        /// </summary>
        [JsonProperty("app_id")]
        [Required]
        public string AppId { set; get; }
 
        /// <summary>
        /// 商家订单号
        /// </summary>
        [JsonProperty("out_trade_no")]
        [Required]
        public string OutTradeNo { set; get; }
 
        /// <summary>
        /// 商家业务号
        /// </summary>
        [JsonProperty("out_biz_no")]
        public string OutBizNo { set; get; }
 
        /// <summary>
        /// 买家支付宝账号 ID
        /// </summary>
        [JsonProperty("buyer_id")]
        public string BuyerId { set; get; }
 
        /// <summary>
        /// 卖家支付宝账号 ID
        /// </summary>
        [JsonProperty("seller_id")]
        public string SellerId { set; get; }
 
        /// <summary>
        /// 交易状态
        /// </summary>
        [JsonProperty("trade_status")]
        public string TradeStatus { set; get; }
 
        /// <summary>
        /// 订单金额
        /// </summary>
        [JsonProperty("total_amount")]
        public decimal? TotalAmount { set; get; }
 
        /// <summary>
        /// 实收金额
        /// </summary>
        [JsonProperty("receipt_amount")]
        public decimal? ReceiptAmount { set; get; }
 
        /// <summary>
        /// 开票金额
        /// </summary>
        [JsonProperty("invoice_amount")]
        public decimal? InvoiceAmount { set; get; }
 
        /// <summary>
        /// 用户在交易中支付的金额,单位为人民币(元),精确到小数点后 2 位
        /// </summary>
        [JsonProperty("buyer_pay_amount")]
        public decimal? BuyerPayAmount { set; get; }
 
        /// <summary>
        /// 使用集分宝支付金额,单位为人民币(元),精确到小数点后 2 位
        /// </summary>
        [JsonProperty("point_amount")]
        public decimal? PointAmount { set; get; }
 
        /// <summary>
        /// 总退款金额
        /// </summary>
        [JsonProperty("refund_fee")]
        public decimal? RefundFee { set; get; }
 
        /// <summary>
        /// 订单标题/商品标题/交易标题/订单关键字等,是请求时对应参数,会在通知中原样传回
        /// </summary>
        [JsonProperty("subject")]
        public string Subject { set; get; }
 
        /// <summary>
        /// 商品描述
        /// </summary>
        [JsonProperty("body")]
        public string Body { set; get; }
 
        /// <summary>
        /// 交易创建时间
        /// </summary>
        [JsonProperty("gmt_create")]
        public DateTime? GmtCreate { get; set; }
 
        /// <summary>
        /// 交易付款时间
        /// </summary>
        [JsonProperty("gmt_payment")]
        public DateTime? GmtPayment { get; set; }
 
        /// <summary>
        /// 交易退款时间
        /// </summary>
        [JsonProperty("gmt_refund")]
        public DateTime? GmtRefund { get; set; }
 
        /// <summary>
        /// 交易结束时间
        /// </summary>
        [JsonProperty("gmt_close")]
        public DateTime? GmtClose { get; set; }
 
        /// <summary>
        /// 支付金额信息。支付成功的各个渠道金额信息
        /// </summary>
        [JsonProperty("fund_bill_list")]
        public string FundBillList { set; get; }
 
        /// <summary>
        /// 优惠券信息。本交易支付时所使用的所有优惠券信息。
        /// </summary>
        [JsonProperty("vocher_detail_list")]
        public string VocherDetailList { set; get; }
 
        /// <summary>
        /// 回传参数,公共回传参数,如果请求时传递了该参数,则返回的异步通知会原样传回。
        /// </summary>
        [JsonProperty("passback_params")]
 
        public string PassbackParams { set; get; }
    }
 
    [Serializable]
    public class AliNotifyBaseInput
    {
        /// <summary>
        /// 通知的发送时间。格式为 yyyy-MM-dd HH:mm:ss
        /// </summary>
        [JsonProperty("notify_time")]
        [Required]
        public DateTime? NotifyTime { get; set; }
 
        /// <summary>
        /// 通知类型
        /// </summary>
        [JsonProperty("notify_type")]
        [Required]
        public string NotifyType { set; get; }
 
        /// <summary>
        /// 通知校验 ID
        /// </summary>
        [JsonProperty("notify_id")]
        [Required]
        public string NotifyId { set; get; }
 
        /// <summary>
        /// 编码格式。如 utf-8、gbk、gb312等。
        /// </summary>
        [JsonProperty("charset")]
        [Required]
        public string Charset { set; get; }
 
        /// <summary>
        /// 调用的接口版本。固定为1.0
        /// </summary>
        [JsonProperty("version")]
        [Required]
        public string Version { set; get; }
 
        /// <summary>
        /// 签名类型。签名算法类型,目前支持RSA2和RSA,推荐使用 RSA2
        /// </summary>
        [JsonProperty("sign_type")]
        [Required]
        public string SignType { set; get; }
 
        /// <summary>
        /// 签名。
        /// </summary>
        [JsonProperty("sign")]
        [Required]
        public string Sign { set; get; }
 
        /// <summary>
        /// 授权方的APPID。由于本接口暂不开放第三方应用授权,因此 auth_app_id=app_id
        /// </summary>
        [JsonProperty("auth_app_id")]
        [Required]
        public string AuthAppId { set; get; }
    }
}