1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.AspNetCore.Http;
- using Microsoft.Extensions.Logging;
- using Microsoft.Extensions.Options;
- using Microsoft.AspNetCore.Authorization;
- using System.Web;
- using MySystem.Areas.Admin.Controllers;
- using LitJson;
- using Library;
- using System.IO;
- namespace MySystem.Areas.Api.Controllers.v1
- {
- [Area("Api")]
- [Route("Api/[controller]/[action]")]
- public class WeChatController : BaseController
- {
- public WeChatController(IHttpContextAccessor accessor, ILogger<BaseController> logger, IOptions<Setting> setting) : base(accessor, logger, setting)
- {
- }
- #region 微信服务平台支付回调
- public Dictionary<string, string> Notice()
- {
- StreamReader sr = new StreamReader(Request.Body);
- string requestMes = sr.ReadToEnd();
- RedisDbconn.Instance.AddList("WeChatPayBack", requestMes);
- function.WriteLog(DateTime.Now.ToString() + "\r\n" + requestMes + "\r\n\r\n", "微信服务平台支付回调");
- Dictionary<string, string> dic = new Dictionary<string, string>();
- dic.Add("code", "SUCCESS");
- dic.Add("message", "成功");
- return dic;
- }
- #endregion
- }
- }
|