From 2a0c3c001b87b26a87a4264e3f9851d8d76414e3 Mon Sep 17 00:00:00 2001 From: zhengyuxuan <zhengyuxuan1995> Date: 星期二, 01 四月 2025 11:11:54 +0800 Subject: [PATCH] fix:bug修复 --- LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs | 25 +++++++++++++++++-------- 1 files changed, 17 insertions(+), 8 deletions(-) diff --git a/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs b/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs index 5411b49..5dc1ddd 100644 --- a/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs +++ b/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, @@ -100,23 +102,30 @@ if (wxPayNotice.OutTradeNo.Contains("JF")) { - if (wxPayNotice.RefundStatus == LifePaymentConstant.WxPayRefundStatus.閫�娆炬垚鍔�) - { - - } + switch (wxPayNotice.RefundStatus) { case LifePaymentConstant.WxPayRefundStatus.閫�娆炬垚鍔�: case LifePaymentConstant.WxPayRefundStatus.閫�娆惧叧闂�: - await _lifePayService.WxPayDomesticRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.宸查��娆�); + 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.閫�娆惧鐞嗕腑: - await _lifePayService.WxPayDomesticRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.閫�娆句腑); + await _lifePayService.LifePayRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.閫�娆句腑); break; case LifePaymentConstant.WxPayRefundStatus.閫�娆惧紓甯�: - await _lifePayService.WxPayDomesticRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.閫�娆句腑); + await _lifePayService.LifePayRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.閫�娆句腑); break; - default : await _lifePayService.WxPayDomesticRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.閫�娆句腑);break; + default : await _lifePayService.LifePayRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.閫�娆句腑);break; } } } -- Gitblit v1.9.1