.NET CORE 获取微信支付回调

1、获取微信支付的回调的数据

Stream stream = HttpContext.Request.Body;
byte[] buffer = new byte[HttpContext.Request.ContentLength.Value];
stream.Read(buffer, 0, buffer.Length);
string content = Encoding.UTF8.GetString(buffer);
_log.Info($"微信返回数据:{content}");

原文地址:https://www.cnblogs.com/topguntopgun/p/10869132.html