This commit is contained in:
zpc 2025-09-26 16:15:44 +08:00
parent e39fee2352
commit 59279cacc3
3 changed files with 69 additions and 66 deletions

View File

@ -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<WeChatPayUnifiedOrderNotify>(Request, _optionsAccessor.Value);
// 打印解析后的对象
@ -98,6 +96,20 @@ namespace CoreCms.Net.Web.WebApi.Controllers.PayNotify
}
}
/// <summary>
/// Retrieves the current WeChat Pay configuration options.
/// </summary>
/// <remarks>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.</remarks>
/// <returns>An <see cref="IActionResult"/> containing the WeChat Pay options. The result has an HTTP 200 status code and
/// includes the options in the response body.</returns>
[HttpGet]
public IActionResult GetWeChatPayOptions()
{
return Ok(_optionsAccessor.Value);
}
/// <summary>
/// 退款结果通知
/// </summary>

View File

@ -657,6 +657,15 @@
统一下单支付结果通知
</summary>
</member>
<member name="M:CoreCms.Net.Web.WebApi.Controllers.PayNotify.WeChatPayController.GetWeChatPayOptions">
<summary>
Retrieves the current WeChat Pay configuration options.
</summary>
<remarks>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.</remarks>
<returns>An <see cref="T:Microsoft.AspNetCore.Mvc.IActionResult"/> containing the WeChat Pay options. The result has an HTTP 200 status code and
includes the options in the response body.</returns>
</member>
<member name="M:CoreCms.Net.Web.WebApi.Controllers.PayNotify.WeChatPayController.Refund">
<summary>
退款结果通知

View File

@ -38,29 +38,11 @@
<parameter name="@NetUserIdentity" layout="${aspnet-user-identity}" />
<parameter name="@Exception" layout="${exception:tostring}" />
</target>
<target xsi:type="File" name="log_file" fileName="${basedir}/App_Data/nlog/${date:format=yyyy-MM}/${level}-${shortdate}.csv" encoding="utf-8">
<layout xsi:type="CSVLayout">
<column name="date" layout="${date}" />
<column name="LogTitle" layout="${event-properties:item=LogTitle}" />
<column name="message" layout="${message}" />
<column name="exception" layout="${exception:format=tostring}" />
<column name="machinename" layout="${machinename}" />
<column name="appdomain" layout="${appdomain}" />
<column name="assembly-version" layout=" ${assembly-version}" />
<column name="basedir" layout="${basedir}" />
<column name="callsite" layout="${callsite}" />
<column name="counter" layout="${counter}" />
<column name="nlogdir" layout="${nlogdir}" />
<column name="processid" layout="${processid}" />
<column name="processname" layout="${processname}" />
<column name="specialfolder" layout="${specialfolder}" />
<column name="stacktrace" layout="${stacktrace}" />
<column name="longdate" layout="${longdate}" />
<column name="event-properties" layout="${event-properties:item=EventId_Id}" />
<column name="uppercase" layout="${uppercase:${level}}" />
<column name="logger" layout="${logger}" />
<column name="url" layout="${aspnet-request-url}" />
<column name="action" layout="${aspnet-mvc-action}" />
<target xsi:type="File" name="log_file"
fileName="${basedir}/App_Data/nlog/${date:format=yyyy-MM}/${level}-${shortdate}.txt"
encoding="utf-8">
<layout>
${longdate} | ${uppercase:${level}} | ${logger} | ${event-properties:item=LogTitle} | ${message} | ${exception:format=tostring}
</layout>
</target>
</targets>