From d5fe1b8b4de07a9ceeee5bba65677f5c0b5e9d5d Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期一, 31 三月 2025 10:14:56 +0800 Subject: [PATCH] Merge branch 'dev-lifepay-v1.3' of http://120.26.58.240:8888/r/LifePaymentApi into dev-lifepay-v1.3 --- LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs b/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs index 454dc62..5411b49 100644 --- a/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs +++ b/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs @@ -21,16 +21,19 @@ private readonly IWxPayApi _wxPayApi; private readonly ILifePayService _lifePayService; + private readonly ILifePayOrderService _lifePayOrderService; private readonly ILogger<WxPayNotifyController> _logger; public WxPayNotifyController( IWxPayApi wxPayApi, ILogger<WxPayNotifyController> logger, - ILifePayService lifePayService) + ILifePayService lifePayService, + ILifePayOrderService lifePayOrderService) { _wxPayApi = wxPayApi; _logger = logger; _lifePayService = lifePayService; + _lifePayOrderService = lifePayOrderService; } /// <summary> @@ -53,6 +56,14 @@ if (wxPayNotice.TradeState == LifePaymentConstant.WxPayStatus.鏀粯鎴愬姛) { await _lifePayService.LifePaySuccessHandler(wxPayNotice.OutTradeNo, wxPayNotice.TransactionId); + await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput() + { + OrderNo = wxPayNotice.OutTradeNo, + OutOrderNo = wxPayNotice.TransactionId, + LifePayType = LifePayTypeEnum.WxPay, + ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Expenses, + Amount = wxPayNotice.Amount.Total + }); } } } @@ -72,7 +83,11 @@ }; } - + /// <summary> + /// 寰俊閫�娆鹃�氱煡鍥炶皟 + /// </summary> + /// <param name="input"></param> + /// <returns></returns> [HttpPost] [UnitOfWork] public async Task<WxRechargeNotifyResult> WxPayDomesticRefundsNotify(WxRechargeNotifyInput input) @@ -92,8 +107,6 @@ switch (wxPayNotice.RefundStatus) { case LifePaymentConstant.WxPayRefundStatus.閫�娆炬垚鍔�: - await _lifePayService.WxPayDomesticRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.宸查��娆�); - break; case LifePaymentConstant.WxPayRefundStatus.閫�娆惧叧闂�: await _lifePayService.WxPayDomesticRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.宸查��娆�); break; -- Gitblit v1.9.1