From 182c7edd7c70eddbf33e2358f1f1aba96eb58cb3 Mon Sep 17 00:00:00 2001 From: zhengyuxuan <zhengyuxuan1995> Date: 星期五, 28 三月 2025 15:43:46 +0800 Subject: [PATCH] fix:查询优化 --- LifePayment/LifePayment.Domain/Ali/AliPayApi.cs | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/LifePayment/LifePayment.Domain/Ali/AliPayApi.cs b/LifePayment/LifePayment.Domain/Ali/AliPayApi.cs index 1a5ec58..15e591c 100644 --- a/LifePayment/LifePayment.Domain/Ali/AliPayApi.cs +++ b/LifePayment/LifePayment.Domain/Ali/AliPayApi.cs @@ -5,6 +5,7 @@ using LifePayment.Domain.Shared; using Microsoft.Extensions.Options; using Nest; +using Spire.Pdf; using System; using System.Collections; using System.Collections.Generic; @@ -17,12 +18,14 @@ { private readonly Config _options; + public const string SDKVERSION = "alipay-easysdk-net-2.0.0"; protected Alipay.EasySDK.Kernel.Client _kernel; public AliPayApi( - IOptionsMonitor<Config> optionsMonitor, Client kernel) + IOptionsMonitor<Config> optionsMonitor, string optionsName = null) { + Alipay.EasySDK.Kernel.Context context = new Alipay.EasySDK.Kernel.Context(optionsName.IsNullOrEmpty() ? optionsMonitor.CurrentValue : optionsMonitor.Get(optionsName), SDKVERSION); _options = optionsMonitor.CurrentValue; - _kernel = kernel; + this._kernel = new Client(context); } public async Task<AlipayTradePrecreateResponse> GetAliPayQRCode(GetPayQrCodeInput input) @@ -45,7 +48,6 @@ AlipayTradeQueryResponse response = Factory.Payment.Common().Query(input.OutTradeNo); return response; } - /// <summary> /// 鏌ヨ鏀粯瀹濋��娆捐鍗曚俊鎭� -- Gitblit v1.9.1