|
|
@@ -3,6 +3,7 @@ using System.Threading.Tasks;
|
|
|
using Essensoft.AspNetCore.Payment.WeChatPay;
|
|
|
using Essensoft.AspNetCore.Payment.WeChatPay.V2;
|
|
|
using Essensoft.AspNetCore.Payment.WeChatPay.V2.Notify;
|
|
|
+using Microsoft.AspNetCore.Http;
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
using Microsoft.Extensions.Options;
|
|
|
|
|
|
@@ -29,6 +30,8 @@ namespace WebApplicationSample.Controllers
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
+ Request.EnableBuffering();
|
|
|
+
|
|
|
var notify = await _client.ExecuteAsync<WeChatPayUnifiedOrderNotify>(Request, _optionsAccessor.Value);
|
|
|
if (notify.ReturnCode == WeChatPayCode.Success)
|
|
|
{
|
|
|
@@ -57,6 +60,8 @@ namespace WebApplicationSample.Controllers
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
+ Request.EnableBuffering();
|
|
|
+
|
|
|
var notify = await _client.ExecuteAsync<WeChatPayRefundNotify>(Request, _optionsAccessor.Value);
|
|
|
if (notify.ReturnCode == WeChatPayCode.Success)
|
|
|
{
|