zhengyuxuan
2025-03-27 efef23b91cfcdf3e242258876b2b4ae8abb8fb7e
LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -51,6 +51,7 @@
    private readonly IAlipayInterfaceManager _alipayInterfaceManager;
    private readonly IWxPayApi _wxPayApi;
    private readonly WxPayOption _wxPayOptions;
    private readonly InitSetting _initSettingOptions;
    private readonly IACOOLYManager _aCOOLYManager;
@@ -67,6 +68,7 @@
                          IAlipayInterfaceManager aliPayInterfaceManager,
                          IWxPayApi wxPayApi,
                          IOptions<WxPayOption> wxPayOptions,
                          IOptions<InitSetting> initSettingOptions,
                          IRepository<LifePayChannles, Guid> lifePayChannlesRep,
                          IRepository<LifePayAccount, Guid> lifePayAccount,
                          IDataFilter dataFilter,
@@ -83,6 +85,7 @@
        _alipayInterfaceManager = aliPayInterfaceManager;
        _wxPayApi = wxPayApi;
        _wxPayOptions = wxPayOptions.Value;
        _initSettingOptions = initSettingOptions.Value;
        _distributedEventBus = distributedEventBus;
        _lifePayChannlesRep = lifePayChannlesRep;
        _lifePayAccount = lifePayAccount;
@@ -1810,9 +1813,8 @@
    private (decimal PayAmont, decimal DiscountAmount, decimal RechargeAmount) CalculateAmount(decimal amount, decimal rate)
    {
        /// 正常支付
        //var payAmount = decimal.Round(amount * rate / 100, 2, MidpointRounding.AwayFromZero);
        if (_initSettingOptions.OpenTheOnePennyTest)
        {
        /// 1分钱支付
        decimal payAmount = 0.01m;
@@ -1820,6 +1822,13 @@
        return (payAmount, amount - payAmount, amount);
    }
        else
        {
            /// 正常支付
            var payAmount = decimal.Round(amount * rate / 100, 2, MidpointRounding.AwayFromZero);
            return (payAmount, amount - payAmount, amount);
        }
    }
    private void SetOrderStatus(LifePayOrder order, string code)
    {