Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.Form["notifyData"] != null)
     {
         try
         {
             ICBC icbcInfo = new ICBC();
             icbcInfo.TranData   = Request.Form["notifyData"];
             icbcInfo.MerSignMsg = Request.Form["signMsg"].ToString();
             icbcInfo            = CBCPayOnline.GetCheckReturnInfo(icbcInfo);
             //自定义返回的变量
             //string myOrderid = Encrypt.Decode(Request.Form["merVAR"].ToString());
             if (icbcInfo.IsCheck)
             {
                 DataSet      myds      = new DataSet();
                 StringReader strReader = new StringReader(icbcInfo.TranData);
                 myds.ReadXml(strReader);
                 FileStream   fs = new FileStream("D:\\cc.txt", FileMode.Append);
                 StreamWriter sw = new StreamWriter(fs, Encoding.Default);
                 sw.Write(ToJson(myds));
                 sw.Close();
                 fs.Close();
                 DataTable mytable = new DataTable();
                 mytable = myds.Tables["bank"];
                 string payDate = myds.Tables["orderInfo"].Rows[0]["orderDate"].ToString().Trim();
                 string userNum = myds.Tables["custom"].Rows[0]["UserNum"].ToString().Trim();//联名客户在商户的会员号
                 userNum += "," + myds.Tables["bank"].Rows[0]["TranBatchNo"].ToString().Trim();
                 string amount  = myds.Tables["orderInfo"].Rows[0]["amount"].ToString().Trim();
                 string orderid = myds.Tables["orderInfo"].Rows[0]["orderid"].ToString().Trim();
                 if (null != mytable && mytable.Rows.Count > 0)
                 {
                     if (mytable.Rows[0]["tranStat"].ToString().Trim() == "1")
                     {
                         WebBLL.UpdatePayOrder(true, true, orderid, payDate, userNum, amount);
                     }
                 }
             }
         }
         catch (Exception ex)
         {
         }
     }
 }