From 4ca1a7a2514b1fec1c260aa748348ecc411a8868 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期二, 01 四月 2025 16:00:29 +0800 Subject: [PATCH] fix: s --- LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs index e3060bb..5dd5a70 100644 --- a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs +++ b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs @@ -1,6 +1,7 @@ 锘縰sing Alipay.AopSdk.F2FPay.Model; using LifePayment.Application.Contracts; using LifePayment.Application.LifePay; +using LifePayment.Domain; using LifePayment.Domain.Common; using LifePayment.Domain.Shared; using Microsoft.AspNetCore.Authorization; @@ -524,15 +525,20 @@ public async Task<WxPayDomesticRefundsQueryReponse> WxPayDomesticRefundsQuery(string outTradeNo) { var res = await _lifePayService.WxPayDomesticRefundsQuery(outTradeNo); - await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput() + if (res.Code == WxpayResultCode.Success) { - OrderNo = res.OutTradeNo, - OutOrderNo = res.TransactionId, - LifePayType = LifePayTypeEnum.WxPay, - ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Expenses, - Amount = Convert.ToDecimal(res.Amount.Total) - }); + await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput() + { + OrderNo = res.OutTradeNo, + OutRefundNo = res.RefundId, + OutOrderNo = res.TransactionId, + LifePayType = LifePayTypeEnum.WxPay, + ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Expenses, + Amount = Convert.ToDecimal(res.Amount.Total) + }); + } return res; + } /// <summary> -- Gitblit v1.9.1