zhengyiming
2025-04-01 f885db9e204c172c62779f45c3edee3cae463b8d
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;
                    }
                }
            }