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.MainModels;
using LitJson;
using Library;
using System.IO;
using Aop.Api.Util;

namespace MySystem.Areas.Api.Controllers.v1
{
    [Area("Api")]
    [Route("Api/[controller]/[action]")]
    public class AlipayController : BaseController
    {
        public AlipayController(IHttpContextAccessor accessor, ILogger<BaseController> logger, IOptions<Setting> setting) : base(accessor, logger, setting)
        {
        }


        #region 支付宝服务平台支付回调(好哒)
        public Dictionary<string, string> HdNotice()
        {
            StreamReader sr = new StreamReader(Request.Body);
            string requestMes = sr.ReadToEnd();
            function.WriteLog(DateTime.Now.ToString() + "\r\n" + requestMes + "\r\n\r\n", "支付宝服务平台支付回调(好哒)");
            RedisDbconn.Instance.AddList("WeChatPayBack", requestMes);
            Dictionary<string, string> dic = new Dictionary<string, string>();
            dic.Add("resultCode", "1");
            return dic;
        }
        #endregion

    }
}
