From 8f5a78cae00812ec9eef16936a7d2b53a90892f0 Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期二, 01 四月 2025 09:21:26 +0800
Subject: [PATCH] fix:支付宝退款查询接口

---
 LifePayment/LifePayment.Domain.Shared/Ali/GetPayQrCodeInput.cs |    9 +++++++++
 LifePayment/LifePayment.Domain/Ali/AliPayApi.cs                |    2 +-
 LifePayment/LifePayment.Application/LifePay/LifePayService.cs  |    3 ++-
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
index 8053980..e6551c4 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -848,8 +848,9 @@
     /// <returns></returns>
     public async Task<AlipayTradeFastpayRefundQueryResponse> QueryAlipayTradeRefund(OrderInQuiryInput input)
     {
-        var result = await _aliPayApi.QueryAlipayTradeRefund(input);
         var order = await _lifePayOrderRepository.Where(x => x.OrderNo == input.OutTradeNo).FirstOrDefaultAsync();
+        input.OutRefundNo = order.RefundOrderNo;
+        var result = await _aliPayApi.QueryAlipayTradeRefund(input);
         if (result.Code == AlipayResultCode.Success && result.RefundStatus == AlipayRefundStatus.Success)
         {
             order.LifePayOrderStatus = LifePayOrderStatusEnum.宸查��娆�;
diff --git a/LifePayment/LifePayment.Domain.Shared/Ali/GetPayQrCodeInput.cs b/LifePayment/LifePayment.Domain.Shared/Ali/GetPayQrCodeInput.cs
index b98c786..52d4a3e 100644
--- a/LifePayment/LifePayment.Domain.Shared/Ali/GetPayQrCodeInput.cs
+++ b/LifePayment/LifePayment.Domain.Shared/Ali/GetPayQrCodeInput.cs
@@ -24,6 +24,15 @@
         /// 浜ゆ槗鍒涘缓鏃朵紶鍏ョ殑鍟嗘埛璁㈠崟鍙�
         /// </summary>
         public string OutTradeNo { get; set; }
+        /// <summary>
+        /// 鏀粯瀹濅氦鏄撳彿
+        /// </summary>
+        public string TradeNo { get; set; }
+
+        /// <summary>
+        /// 閫�娆捐鍗曞彿
+        /// </summary>
+        public string OutRefundNo { get; set; }
     }
 
     public class AlipayTradeRefundRequest
diff --git a/LifePayment/LifePayment.Domain/Ali/AliPayApi.cs b/LifePayment/LifePayment.Domain/Ali/AliPayApi.cs
index b3f7f32..e989244 100644
--- a/LifePayment/LifePayment.Domain/Ali/AliPayApi.cs
+++ b/LifePayment/LifePayment.Domain/Ali/AliPayApi.cs
@@ -56,7 +56,7 @@
         /// <returns></returns>
         public async Task<AlipayTradeFastpayRefundQueryResponse> QueryAlipayTradeRefund(OrderInQuiryInput input)
         {
-            AlipayTradeFastpayRefundQueryResponse response = await QueryTradeRefund(input.OutTradeNo, input.OutTradeNo);
+            AlipayTradeFastpayRefundQueryResponse response = await QueryTradeRefund(input.OutTradeNo, input.OutRefundNo);
             return response;
         }
 

--
Gitblit v1.9.1