Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. how to capture MerchantOneprocessing

how to capture MerchantOneprocessing

Scheduled Pinned Locked Moved ASP.NET
phpcomjsontutorialquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    ballameharmurali
    wrote on last edited by
    #1

    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

    V S A 3 Replies Last reply
    0
    • B ballameharmurali

      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

      V Offline
      V Offline
      Viral Upadhyay
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • B ballameharmurali

        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

        S Offline
        S Offline
        sashidhar
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • B ballameharmurali

          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

          A Offline
          A Offline
          Abhishek Sur
          wrote on last edited by
          #4

          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

          B 1 Reply Last reply
          0
          • A Abhishek Sur

            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

            B Offline
            B Offline
            ballameharmurali
            wrote on last edited by
            #5

            Hello , 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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups