zhengyuxuan
2025-03-31 9810e089cb8f0615e333f7e79606e3a0a56e7787
fix:提交
3个文件已修改
47 ■■■■■ 已修改文件
LifePayment/LifePayment.Domain/WeChat/WxRechargeInfo.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.HttpApi/LifePay/AliPayNotifyController.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Domain/WeChat/WxRechargeInfo.cs
@@ -241,7 +241,42 @@
        /// </summary>
        [JsonProperty("refund_status")]
        public string RefundStatus { get; set; }
        [JsonProperty("amount")]
        public RefundAmount Amount { get; set; }
    }
    public class RefundAmount
    {
        /// <summary>
        /// 总金额
        /// </summary>
        [JsonProperty("total", NullValueHandling = NullValueHandling.Ignore)]
        [Required]
        public int Total { get; set; }
        /// <summary>
        /// 退款金额
        /// </summary>
        [JsonProperty("refund", NullValueHandling = NullValueHandling.Ignore)]
        [Required]
        public int Refund { get; set; }
        /// <summary>
        /// 用户实际支付金额
        /// </summary>
        [JsonProperty("payer_total", NullValueHandling = NullValueHandling.Ignore)]
        [Required]
        public string PayerTotal { get; set; }
        /// <summary>
        /// 用户退款金额
        /// </summary>
        [JsonProperty("payer_refund", NullValueHandling = NullValueHandling.Ignore)]
        [Required]
        public string PayerRefund { get; set; }
    }
    public class WxRechargeNotifyResult
    {
        /// <summary>
LifePayment/LifePayment.HttpApi/LifePay/AliPayNotifyController.cs
@@ -60,6 +60,7 @@
                if (input.TradeStatus == LifePaymentConstant.AliPayStatus.支付成功)
                {
                    await _lifePayService.LifePaySuccessHandler(input.OutTradeNo, input.TradeNo);
                    // 插入收支流水
                    await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput() { OrderNo = input.OutTradeNo, 
                        OutOrderNo = input.TradeNo ,LifePayType = LifePayTypeEnum.AliPay,ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Expenses,
                        Amount = input.ReceiptAmount.Value });
LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs
@@ -56,6 +56,8 @@
                    if (wxPayNotice.TradeState == LifePaymentConstant.WxPayStatus.支付成功)
                    {
                        await _lifePayService.LifePaySuccessHandler(wxPayNotice.OutTradeNo, wxPayNotice.TransactionId);
                        // 插入收支流水
                        await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput()
                        {
                            OrderNo = wxPayNotice.OutTradeNo,
@@ -109,6 +111,15 @@
                        case LifePaymentConstant.WxPayRefundStatus.退款成功:
                        case LifePaymentConstant.WxPayRefundStatus.退款关闭:
                            await _lifePayService.WxPayDomesticRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.已退款);
                            // 插入收支流水
                            await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput()
                            {
                                OrderNo = wxPayNotice.OutTradeNo,
                                OutOrderNo = wxPayNotice.TransactionId,
                                LifePayType = LifePayTypeEnum.WxPay,
                                ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Receipts,
                                Amount = wxPayNotice.Amount.Total
                            });
                            break;
                        case LifePaymentConstant.WxPayRefundStatus.退款处理中:
                            await _lifePayService.WxPayDomesticRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.退款中);