zhengyuxuan
2025-03-28 182c7edd7c70eddbf33e2358f1f1aba96eb58cb3
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>
        /// 查询支付宝退款订单信息