Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //创建支付应答对象
        ResponseHandler resHandler = new ResponseHandler(Context);

        resHandler.init();
        wx_payment_wxpay payBll = new wx_payment_wxpay();

        //暂未获得wid
        Cms.Model.wx_payment_wxpay paymentInfo = payBll.GetModel(1);

        resHandler.setKey(paymentInfo.partnerKey, paymentInfo.paySignKey); //密匙,paysignkey

        //判断签名
        if (resHandler.isWXsignfeedback())
        {
            //回复服务器处理成功
            string AppId        = resHandler.getMpParameter("AppId");
            string TimeStamp    = resHandler.getMpParameter("TimeStamp");
            string OpenId       = resHandler.getMpParameter("OpenId");
            string AppSignature = resHandler.getMpParameter("AppSignature");
            string MsgType      = resHandler.getMpParameter("MsgType");
            string FeedBackId   = resHandler.getMpParameter("FeedBackId");
            string TransId      = resHandler.getMpParameter("TransId");
            string Reason       = resHandler.getMpParameter("Reason");
            string Solution     = resHandler.getMpParameter("Solution");
            string ExtInfo      = resHandler.getMpParameter("ExtInfo");
            string SignMethod   = resHandler.getParameter("SignMethod");
            string txt          = string.Empty;
            if (MsgType.ToLower().Trim() == "request")
            {
                //新增维权操作
            }
            else
            {
                //用户确认处理完毕操作
            }

            //回复服务器处理成功
            Response.Write("OK");
            Response.Write("OK:" + resHandler.getDebugInfo());
        }
        else
        {
            //sha1签名失败
            Response.Write("fail");
            Response.Write("fail:" + resHandler.getDebugInfo());
        }
        Response.End();
    }
Example #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Cms.Model.wx_payment_wxpay model)
 {
     return(dal.Update(model));
 }
Example #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(Cms.Model.wx_payment_wxpay model)
 {
     return(dal.Add(model));
 }