Exemplo n.º 1
0
        /// <summary>
        /// 写日志
        /// </summary>
        protected void WriteLog()
        {
            var logContent = LogContentBuilder.CreateLogContentBuilder()
                             .SetEventId(Guid.NewGuid()).SetMoudle(GetType().FullName).SetTitle("支付宝支付")
                             .AddContent($"支付方式 : {GetType()}")
                             .AddContent($"参数 : { GetParams()}")
                             .Build();

            Logger.LogInfo(logContent);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 写日志
        /// </summary>
        protected virtual void WriteLog <TResponse>(WechatpayConfig config, WechatpayParameterBuilder builder, WechatpayResult <TResponse> result) where TResponse : WechatpayResponse
        {
            var logContent = LogContentBuilder.CreateLogContentBuilder()
                             .SetEventId(Guid.NewGuid()).SetMoudle(GetType().FullName).SetTitle("微信支付")
                             .AddContent($"支付方式 : {GetType()}")
                             .AddContent($"支付网关 : {config.GetOrderUrl()}")
                             .AddContent($"原始响应:{result?.Raw}")
                             .Build();

            Logger.LogInfo(logContent);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 写日志
        /// </summary>
        protected void WriteLog(AliPayConfig config, AlipayParameterBuilder builder, AlipayResult result)
        {
            var logContent = LogContentBuilder.CreateLogContentBuilder()
                             .SetEventId(Guid.NewGuid()).SetMoudle(GetType().FullName).SetTitle("支付宝支付")
                             .AddContent($"支付宝支付 : {GetType()}")
                             .AddContent($"支付网关 : {config?.GetGatewayUrl()}")
                             .AddContent($"请求参数:{builder?.GetDictionary()?.ToXml()}")
                             .AddContent($"返回结果:{result?.GetDictionary()}")
                             .AddContent($"原始响应:{result?.Raw}")
                             .Build();

            Logger.LogInfo(logContent);
        }