IsWXsignfeedback() 공개 메소드

判断微信维权签名
public IsWXsignfeedback ( ) : Boolean
리턴 Boolean
예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //创建支付应答对象
        ResponseHandler resHandler = new ResponseHandler(Context);
        resHandler.Init();
        resHandler.SetKey(TenPayInfo.Key, TenPayInfo.AppKey);

        //判断签名
        if (resHandler.IsWXsignfeedback())
        {
            //回复服务器处理成功
            Response.Write("OK");
            Response.Write("OK:" + resHandler.GetDebugInfo());
        }
        else {
            //sha1签名失败
            Response.Write("fail");
            Response.Write("fail:" + resHandler.GetDebugInfo());
        }
        Response.End();
    }
예제 #2
0
        public ActionResult FeedBack()
        {
            //创建支付应答对象
            ResponseHandler resHandler = new ResponseHandler(null);
            resHandler.Init();
            resHandler.SetKey(TenPayInfo.Key, TenPayInfo.AppKey);

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