diff --git a/CoreCms.Net.Web.WebApi/Controllers/PayNotify/WeChatPayController.cs b/CoreCms.Net.Web.WebApi/Controllers/PayNotify/WeChatPayController.cs index c39e853..80fda98 100644 --- a/CoreCms.Net.Web.WebApi/Controllers/PayNotify/WeChatPayController.cs +++ b/CoreCms.Net.Web.WebApi/Controllers/PayNotify/WeChatPayController.cs @@ -73,8 +73,6 @@ namespace CoreCms.Net.Web.WebApi.Controllers.PayNotify // 打印原始请求内容(方便定位问题) NLogUtil.WriteAll(LogLevel.Trace, LogType.Order, "微信支付成功回调原始请求", body); - - NLogUtil.WriteAll(LogLevel.Trace, LogType.Order, "微信支付成功回调解析结果_optionsAccessor", JsonConvert.SerializeObject(_optionsAccessor.Value)); var notify = await _client.ExecuteAsync(Request, _optionsAccessor.Value); // 打印解析后的对象 @@ -98,6 +96,20 @@ namespace CoreCms.Net.Web.WebApi.Controllers.PayNotify } } + + /// + /// Retrieves the current WeChat Pay configuration options. + /// + /// Use this method to obtain the active WeChat Pay settings configured for the + /// application. The returned options can be used to verify or display payment configuration details. + /// An containing the WeChat Pay options. The result has an HTTP 200 status code and + /// includes the options in the response body. + [HttpGet] + public IActionResult GetWeChatPayOptions() + { + return Ok(_optionsAccessor.Value); + } + /// /// 退款结果通知 /// diff --git a/CoreCms.Net.Web.WebApi/Doc.xml b/CoreCms.Net.Web.WebApi/Doc.xml index af29694..dcb9b3e 100644 --- a/CoreCms.Net.Web.WebApi/Doc.xml +++ b/CoreCms.Net.Web.WebApi/Doc.xml @@ -657,6 +657,15 @@ 统一下单支付结果通知 + + + Retrieves the current WeChat Pay configuration options. + + Use this method to obtain the active WeChat Pay settings configured for the + application. The returned options can be used to verify or display payment configuration details. + An containing the WeChat Pay options. The result has an HTTP 200 status code and + includes the options in the response body. + 退款结果通知 diff --git a/CoreCms.Net.Web.WebApi/NLog.config b/CoreCms.Net.Web.WebApi/NLog.config index be08bd5..173373d 100644 --- a/CoreCms.Net.Web.WebApi/NLog.config +++ b/CoreCms.Net.Web.WebApi/NLog.config @@ -1,11 +1,11 @@  - - - - - - + + + + + - - - INSERT INTO SysNLogRecords - (LogDate,LogLevel,LogType,LogTitle,Logger,Message,MachineName,MachineIp,NetRequestMethod - ,NetRequestUrl,NetUserIsauthenticated,NetUserAuthtype,NetUserIdentity,Exception) - VALUES - (@LogDate,@LogLevel,@LogType,@LogTitle,@Logger,@Message,@MachineName,@MachineIp,@NetRequestMethod - ,@NetRequestUrl,@NetUserIsauthenticated,@NetUserAuthtype,@NetUserIdentity,@Exception); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + INSERT INTO SysNLogRecords + (LogDate,LogLevel,LogType,LogTitle,Logger,Message,MachineName,MachineIp,NetRequestMethod + ,NetRequestUrl,NetUserIsauthenticated,NetUserAuthtype,NetUserIdentity,Exception) + VALUES + (@LogDate,@LogLevel,@LogType,@LogTitle,@Logger,@Message,@MachineName,@MachineIp,@NetRequestMethod + ,@NetRequestUrl,@NetUserIsauthenticated,@NetUserAuthtype,@NetUserIdentity,@Exception); + + + + + + + + + + + + + + + + + + + ${longdate} | ${uppercase:${level}} | ${logger} | ${event-properties:item=LogTitle} | ${message} | ${exception:format=tostring} + + + + + + + + + + + \ No newline at end of file