using LifePayment.Domain.Shared; using Newtonsoft.Json; using System.ComponentModel.DataAnnotations; namespace LifePayment.Application.Contracts { public class WxRechargeInfo { /// /// 充值单号 /// public string RechargeNo { get; set; } /// /// 充值码地址 /// public string RechargeCodeUrl { get; set; } } public class WxRechargeInput { /// /// 充值金额,单位为元。 /// public decimal Amount { get; set; } /// /// 商品描述 /// public string Description { get; set; } = "微信充值"; /// /// 备注 /// public string Remark { get; set; } } public class WxRechargeNotifyInput { /// /// 通知Id /// [JsonProperty("id")] [Required] public string Id { get; set; } /// /// 通知创建时间 /// [JsonProperty("create_time")] [Required] public string CreateTime { get; set; } /// /// 通知类型 /// [JsonProperty("event_type")] [Required] public string EventType { get; set; } /// /// 通知数据类型 /// [JsonProperty("resource_type")] [Required] public string ResourceType { get; set; } /// /// 通知数据 /// [JsonProperty("resource")] [Required] public Resource Resource { get; set; } /// /// 回调摘要 /// [JsonProperty("summary")] [Required] public string Summary { get; set; } } public class Resource { /// /// 加密算法类型 /// [JsonProperty("algorithm")] [Required] public string Algorithm { get; set; } /// /// 数据密文 /// [JsonProperty("Ciphertext")] [Required] public string Ciphertext { get; set; } /// /// 附加数据 /// [JsonProperty("associated_data")] public string AssociatedData { get; set; } /// /// 原始类型 /// [JsonProperty("original_type")] [Required] public string OriginalType { get; set; } /// /// 随机串 /// [JsonProperty("nonce")] [Required] public string Nonce { get; set; } } public class WxPayNotice { /// /// 应用Id /// [JsonProperty("appid")] public string Appid { get; set; } /// /// 商户号 /// [JsonProperty("mchid")] public string Mchid { get; set; } /// /// 商户订单号 /// [JsonProperty("out_trade_no")] public string OutTradeNo { get; set; } /// /// 微信支付订单号 /// [JsonProperty("transaction_id")] public string TransactionId { get; set; } /// /// 交易类型 /// [JsonProperty("trade_type")] public string TradeType { get; set; } /// /// 交易状态 /// [JsonProperty("trade_state")] public string TradeState { get; set; } /// /// 交易状态描述 /// [JsonProperty("trade_state_desc")] public string TradeStateDesc { get; set; } /// /// 付款银行 /// [JsonProperty("bank_type")] public string BankType { get; set; } /// /// 附加数据 /// [JsonProperty("attach")] public string Attach { get; set; } /// /// 支付完成时间 /// [JsonProperty("success_time")] public string SuccessTime { get; set; } /// /// 支付者 /// [JsonProperty("payer")] public Payer Payer { get; set; } /// /// 订单金额 /// [JsonProperty("amount")] public Amount Amount { get; set; } /// /// 场景信息 /// [JsonProperty("scene_info")] public SceneInfo SceneInfo { get; set; } /// /// 优惠功能 /// [JsonProperty("promotion_detail")] public PromotionDetail PromotionDetail { get; set; } } public class WxPayDomesticRefundsNotice { /// /// /// 商户号 /// [JsonProperty("mchid")] public string Mchid { get; set; } /// /// 商户订单号 /// [JsonProperty("out_trade_no")] public string OutTradeNo { get; set; } /// /// 微信支付订单号 /// [JsonProperty("transaction_id")] public string TransactionId { get; set; } /// /// 商户退款单号 /// [JsonProperty("out_refund_no")] public string OutRefundNo { get; set; } /// /// 退款状态 /// SUCCESS—退款成功 /// CLOSED—退款关闭。 /// PROCESSING—退款处理中 /// ABNORMAL—退款异常,退款到银行发现用户的卡作废或者冻结了,导致原路退款银行卡失败,可前往商户平台-交易中心,手动处理此笔退款,可参考: 退款异常的处理,或者通过发起异常退款接口进行处理。 /// [JsonProperty("refund_status")] public string RefundStatus { get; set; } } public class WxRechargeNotifyResult { /// /// 返回状态码(错误码,SUCCESS为接收成功,其他错误码为失败) /// public string Code { get; set; } /// /// 返回信息,如非空,为错误原因 /// public string Message { get; set; } } }