Exemplo n.º 1
0
        public ActionResult FeedBack()
        {
            //创建支付应答对象
            ResponseHandler resHandler = new ResponseHandler(null);
            resHandler.Init();
            resHandler.SetKey(WeixinPayInfo.Key, WeixinPayInfo.AppKey);

            //判断签名
            if (resHandler.IsWXsignfeedback())
            {
                //回复服务器处理成功
                Response.Write("OK");
                Response.Write("OK:" + resHandler.GetDebugInfo());
            }
            else
            {
                //sha1签名失败
                Response.Write("fail");
                Response.Write("fail:" + resHandler.GetDebugInfo());
            }
            return null;
        }