本文介绍了如何在C#中立即获取请求和响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的要求是:



< pre> string FormName =frmTransaction; 
string Method =post;
string V3URL =https://api.secure.ebs.in/api/1_0;
Response.Clear();
Response.Write(< html>< head>);

Response.Write(string.Format(< / head>< body onload = \document。{0} .submit()\>,FormName));
Response.Write(string.Format(< form name = \{0} \method = \{1} \action = \{2} \> ;,FormName,Method,V3URL));

Response.Write(< input type = \hidden \name = \TransactionID \value =+ Request.QueryString [TransId] +/> ;);
Response.Write(< input type = \hidden \name = \SecretKey \value =+ ApplicationConfig.EbsSecretKey +/>);
Response.Write(< input type = \hidden \name = \AccountID \value =+ ApplicationConfig.EbsAccountId +/>);
Response.Write(< input type = \hidden \name = \PaymentID \value =+ Request.QueryString [PayMId] +/>);
Response.Write(< input type = \hidden \name = \Action \value = \status \/>);
Response.Write(< / form>);
Response.Write(< / body>< / html>);
Response.End();



我的输出描述如下:

< output accountId = testamount =500.00billingAddress =IndiabillingCity =NamakkalbillingCountry =INDbillingEmail [email protected] =availbillingPhone =xxxxbillingPostalCode =600001billingState =Tnadu dateCreated =2018-05-16 11:58:22deliveryAddress =deliveryCity =deliveryCountry =INRdeliveryName =deliveryPhone =xxxxxxxxxdeliveryPostalCode =deliveryState =description =gwAuthId =0000gwReciptNo =0000isFlagged =NOmode =TESTpaymentId =102591103paymentMethod =1001paymentMode =Credit Cardprocessed =YesreferenceNo =17181status =Captured transactionId =302443643/> 





我尝试过:



我需要从这个页面检查交易状态如何检查。请提供样品代码。你可以帮忙立即获得输出谢谢

解决方案

My Request is :

<pre> string FormName = "frmTransaction";
                string Method = "post";
                string V3URL = "https://api.secure.ebs.in/api/1_0";
                Response.Clear();
                Response.Write("<html><head>");

                Response.Write(string.Format("</head><body onload=\"document.{0}.submit()\">", FormName));
                Response.Write(string.Format("<form name=\"{0}\" method=\"{1}\" action=\"{2}\" >", FormName, Method, V3URL));

                Response.Write("<input type=\"hidden\" name=\"TransactionID\" value=" + Request.QueryString["TransId"] + " />");
                Response.Write("<input type=\"hidden\" name=\"SecretKey\" value=" + ApplicationConfig.EbsSecretKey + " />");
                Response.Write("<input type=\"hidden\" name=\"AccountID\" value=" + ApplicationConfig.EbsAccountId + " />");
                Response.Write("<input type=\"hidden\" name=\"PaymentID\" value=" + Request.QueryString["PayMId"] + " />");
                Response.Write("<input type=\"hidden\" name=\"Action\" value=\"status\" />");
                Response.Write("</form>");
                Response.Write("</body></html>");
                Response.End();


My Output descriped below:

<output accountId="test" amount="500.00" billingAddress="India " billingCity="Namakkal" billingCountry="IND" billingEmail="[email protected]" billingName="Avail" billingPhone="xxxx" billingPostalCode="600001" billingState="Tnadu" dateCreated="2018-05-16 11:58:22" deliveryAddress="" deliveryCity="" deliveryCountry="INR" deliveryName="" deliveryPhone="xxxxxxxxx" deliveryPostalCode="" deliveryState="" description="" gwAuthId="0000" gwReciptNo="0000" isFlagged="NO" mode="TEST" paymentId="102591103" paymentMethod="1001" paymentMode="Credit Card" processed="Yes" referenceNo="17181" status="Captured" transactionId="302443643"/>



What I have tried:

I need to Check the Transaction Status from this page How can i Check. Please Provide Sample Code. can you please help to get a output immediately thank you

解决方案



这篇关于如何在C#中立即获取请求和响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-17 23:17