title: MasterCard Payment Gateway MIGS, how to query
body: <p>I have successfully integrated mastercard payment gateway (MIGS) from Asp.net with C# code. But I am unable to query each transaction. I need to query the server for individual transaction. But I am not able to get proper response a mentioned in VPC client guide.</p>
  
  <p>my code:</p>
  
  <pre><code>            string vpcURL = "https://migs.mastercard.com.au/ma/login.s?mappedUrl=/network";
  
          try
          {
              DataSet ds = new DataSet();
              byte[] response;
              var data = new NameValueCollection();
              data["vpc_Version"] = "1";
              data["vpc_AccessCode"] = "182F61A1";
              data["vpc_Command"] = "QueryDR";
              data["vpc_Merchant"] = "TEST001110246097";
              data["vpc_MerchTxnRef"] = "1W7sVZAMEuQ4=";
              data["vpc_User"] = "XXXXXXXX";
              data["vpc_Password"] = "XXXXXXXX";
              var redirectUrl = vpcURL + "?" + postData;
  
  
              webClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
              response= webClient.UploadValues(vpcURL, "POST", data);
  
              string strresponse = Encoding.UTF8.GetString(response);
              StringReader reader = new StringReader(strresponse);
  
              ds.ReadXml(reader);
  
          }
          catch (Exception ex)
          { 
  
          }
  </code></pre>
  
  <p>In the response I am getting a blank html form, and not the expected fields as mentioned in the server.</p>
  
  <p>I need one complete code for querying the server.</p>
  
  <p>thanks</p>