how to capture MerchantOneprocessing
-
Hi everyone , I need to capture the response_code value of the website : https://secure.merchantonegateway.com/api/transact.php In the page i need to capture the response_code value. In the page load i am using Response.Redirect('https://secure.merchantonegateway.com/api/transact.php?id=response\_code'); But i am want the value of response_code in my page. can anyone please send the code or suggest to get the value of how to get the response_code value . Thanks Murali
-
Hi everyone , I need to capture the response_code value of the website : https://secure.merchantonegateway.com/api/transact.php In the page i need to capture the response_code value. In the page load i am using Response.Redirect('https://secure.merchantonegateway.com/api/transact.php?id=response\_code'); But i am want the value of response_code in my page. can anyone please send the code or suggest to get the value of how to get the response_code value . Thanks Murali
Response.Redirect will not give you response_code it will only redirect page to given link. You can use httpwebrequest and httpwebresponse class to get response_code.
Viral My Site Tips & Tracks
-
Hi everyone , I need to capture the response_code value of the website : https://secure.merchantonegateway.com/api/transact.php In the page i need to capture the response_code value. In the page load i am using Response.Redirect('https://secure.merchantonegateway.com/api/transact.php?id=response\_code'); But i am want the value of response_code in my page. can anyone please send the code or suggest to get the value of how to get the response_code value . Thanks Murali
I think You are using the third party for credit/debitcard values. What is the merchant name You are using? Depending on the third party the code changes..! You have capture the response..! This Is not the way of capturing the value. You need to use Stream reader and http object response..! Check this Link it may help..! http://www.codeproject.com/Messages/3208439/Re-Post-an-HTTP-Request-from-one-WebServer-to-anot.aspx[^]
LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.
modified on Tuesday, November 24, 2009 2:26 AM
-
Hi everyone , I need to capture the response_code value of the website : https://secure.merchantonegateway.com/api/transact.php In the page i need to capture the response_code value. In the page load i am using Response.Redirect('https://secure.merchantonegateway.com/api/transact.php?id=response\_code'); But i am want the value of response_code in my page. can anyone please send the code or suggest to get the value of how to get the response_code value . Thanks Murali
If you are only bothered about the Response, dont use Redirect. Redirect actually navigates to the page, so if you use it, your own contextual response will get modified with the response. So if you what to get the response, you need to invoke another
HttpRequest
to the web path.string url = "https://secure.merchantonegateway.com/api/transact.php?id=response\_code"
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
using (StreamReader sr = new StreamReader(objResponse.GetResponseStream()))
{
result = sr.ReadToEnd();
sr.Close();
}Now result will hold the Response. I think this is what you require.
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript -
If you are only bothered about the Response, dont use Redirect. Redirect actually navigates to the page, so if you use it, your own contextual response will get modified with the response. So if you what to get the response, you need to invoke another
HttpRequest
to the web path.string url = "https://secure.merchantonegateway.com/api/transact.php?id=response\_code"
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
using (StreamReader sr = new StreamReader(objResponse.GetResponseStream()))
{
result = sr.ReadToEnd();
sr.Close();
}Now result will hold the Response. I think this is what you require.
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using JavascriptHello , I have executed the code the if we give a valid credit card number also the result is the same. so is there any other ways . The responsecode is always 300. Thanks Murali