zhengyiming
2025-03-31 a3bfd6cd7ee9580db08aa03a8656ad5572089756
LifePayment/LifePayment.HttpApi/LifePay/AliPayNotifyController.cs
@@ -1,4 +1,5 @@
using LifePayment.Application.Contracts;
using Alipay.AopSdk.F2FPay.Model;
using LifePayment.Application.Contracts;
using LifePayment.Domain.Shared;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
@@ -21,6 +22,7 @@
    {
        private readonly ILifePayService _lifePayService;
        private readonly ILifePayOrderService _lifePayOrderService;
        private readonly ILogger<AliPayNotifyController> _logger;
@@ -28,10 +30,12 @@
               ILogger<AliPayNotifyController> logger,
               ILifePayService lifePayService)
               ILifePayService lifePayService,
               ILifePayOrderService lifePayOrderService)
        {
            _logger = logger;
            _lifePayService = lifePayService;
            _lifePayOrderService = lifePayOrderService;
        }
        /// <summary>
@@ -56,6 +60,10 @@
                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 });
                }
            }
            else
@@ -90,6 +98,8 @@
            };
        }
#endif
        /// <summary>