首页 新闻 搜索 专区 学院

求大神解读啊

0
[待解决问题]

string processFlag = Request["processFlag"].ToString();
string txnType = Request["txnType"].ToString();
string orgTxnType = Request["orgTxnType"].ToString();
string amt = Request["amt"].ToString();
string orgExternalTraceNo = Request["orgExternalTraceNo"].ToString();
string terminalOperId = Request["terminalOperId"].ToString();
string terminalId = Request["terminalId"].ToString();
string authCode = Request["authCode"].ToString();
string RRN = Request["RRN"].ToString();
string shortPAN = Request["shortPAN"].ToString();
string responseCode = Request["responseCode"].ToString();
string responseMessage = Request["responseMessage"].ToString();
string cardType = Request["cardType"].ToString();
string issuerId = Request["issuerId"].ToString();
string issuerIdView = Request["issuerIdView"].ToString();
string signature = Request["signature"].ToString();
string externalTraceNo = Request["externalTraceNo"].ToString();
string merchantId = Request["merchantId"].ToString();
string txnTime = Request["txnTime"].ToString();

            string val = "";
            val = appendParam(val, processFlag);
            val = appendParam(val, txnType);
            val = appendParam(val, orgTxnType);
            val = appendParam(val, amt);
            val = appendParam(val, externalTraceNo);
            val = appendParam(val, orgExternalTraceNo);
            val = appendParam(val, terminalOperId);
            val = appendParam(val, authCode);
            val = appendParam(val, RRN);
            val = appendParam(val, txnTime);
            val = appendParam(val, shortPAN);
            val = appendParam(val, responseCode);
            val = appendParam(val, cardType);
            val = appendParam(val, issuerId);


            StreamWriter sw1 = File.AppendText(HttpContext.Current.Request.PhysicalApplicationPath + "\\test\\" + "\\myText1.txt");
            sw1.WriteLine(val);
         
            sw1.Flush();
            sw1.Close();

            if (CerRSAVerifySignature(val, signature, HttpContext.Current.Server.MapPath("~/mgw.cer")))
            {
                Response.Write("0");
                StreamWriter sw = File.AppendText(HttpContext.Current.Request.PhysicalApplicationPath + "\\test\\" + "\\myText.txt");
                sw.WriteLine(val);
                sw.Flush();
                sw.Close();
            }
            else
            {
                StreamWriter sw = File.AppendText(HttpContext.Current.Request.PhysicalApplicationPath + "\\test\\" + "\\myText.txt");
                sw.WriteLine("s1s" + DateTime.Now.ToString());
                sw.Flush();
                sw.Close();
            }
yanzhoujun的主页 yanzhoujun | 初学一级 | 园豆:108
提问于:2018-11-21 18:14
< >
分享
所有回答(1)
0

从Request获取各种参数,将参数写入val ,保存在myText1.txt文件中,判断是否有加密证书,然后分别处理。。

rqx | 园豆:468 (菜鸟二级) | 2018-11-21 19:00
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册