From 483ea509b5f1429ee76916e8556c803b241bad89 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期五, 18 七月 2025 13:02:39 +0800 Subject: [PATCH] fix: s --- LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs | 41 ++++++++++++++++++++++++++++++++++++++--- 1 files changed, 38 insertions(+), 3 deletions(-) diff --git a/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs b/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs index 8d1ae98..cf0adc1 100644 --- a/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs +++ b/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs @@ -1,4 +1,5 @@ -锘縰sing LifePayment.Application.Contracts; +锘縰sing Alipay.AopSdk.Core.Domain; +using LifePayment.Application.Contracts; using LifePayment.Domain; using LifePayment.Domain.Shared; using Medallion.Threading; @@ -141,7 +142,8 @@ { try { - _logger.LogError($"寰俊閫�娆惧洖璋冮�氱煡锛氳繘鍏ュ井淇″洖璋�"); + var req = input.ToJson(); + _logger.LogError($"寰俊閫�娆惧洖璋冮�氱煡锛氳繘鍏ュ井淇″洖璋冿細" + req); var data = _wxPayApi.AesGcmDecrypt(input.Resource.AssociatedData, input.Resource.Nonce, input.Resource.Ciphertext); _logger.LogError($"寰俊閫�娆惧洖璋冮�氱煡data锛�" + data); var wxPayNotice = JsonConvert.DeserializeObject<WxPayDomesticRefundsNotice>(data); @@ -175,7 +177,7 @@ } catch (Exception ex) { - + _logger.LogError($"寰俊閫�娆惧洖璋冮�氱煡閿欒锛�" + ex.Message); return new WxRechargeNotifyResult { Code = "FAIL", @@ -188,5 +190,38 @@ Code = "SUCCESS", }; } + + [HttpPost] + [UnitOfWork] + public async Task WxPayDomesticRefundsNotifyImp(WxPayDomesticRefundsNotice input) + { + var wxPayNotice = input; + if (wxPayNotice.OutTradeNo.Contains("JF")) + { + + switch (wxPayNotice.RefundStatus) + { + case LifePaymentConstant.WxPayRefundStatus.閫�娆炬垚鍔�: + await _lifePayService.LifePayRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.宸查��娆�); + // 鎻掑叆鏀舵敮娴佹按 + await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput() + { + OrderNo = wxPayNotice.OutTradeNo, + OutRefundNo = wxPayNotice.OutRefundNo, + OutOrderNo = wxPayNotice.TransactionId, + LifePayType = LifePayTypeEnum.WxPay, + ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Receipts, + Amount = wxPayNotice.Amount.Total + }); + break; + case LifePaymentConstant.WxPayRefundStatus.閫�娆惧叧闂�: + case LifePaymentConstant.WxPayRefundStatus.閫�娆惧鐞嗕腑: + case LifePaymentConstant.WxPayRefundStatus.閫�娆惧紓甯�: + await _lifePayService.LifePayRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.閫�娆句腑); + break; + default: await _lifePayService.LifePayRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.閫�娆句腑); break; + } + } + } } } \ No newline at end of file -- Gitblit v1.9.1