Payment Type Get Payment Types by passing required parameter.

Payment type
Key Value
URL https://api.ovvihq.com/OnlineOrder/PaymentTypes
APIKey Provided by OVVI
                                    
  1. public string GetPaymentType()
  2. {
  3. get
  4. {
  5. string strResult = string.Empty;
  6. try
  7. {
  8. HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://api.ovvihq.com/OnlineOrder/PaymentTypes");
  9. request.ContentType = "application/json";

  10. request.Method = "GET";
  11. request.Headers.Add("APIKey", "Provided by OVVI");
  12. // Set some reasonable limits on resources used by this request
  13. request.ContentLength = 0;
  14. // Set credentials to use for this request.
  15. request.Credentials = CredentialCache.DefaultCredentials;
  16. HttpWebResponse response = (HttpWebResponse)request.GetResponse();
  17. // Get the stream associated with the response.
  18. Stream receiveStream = response.GetResponseStream();
  19. // Pipes the stream to a higher level stream reader with the required encoding format.
  20. StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);
  21. strResult = readStream.ReadToEnd().ToString();
  22. response.Close();
  23. readStream.Close();
  24. return strResult;
  25. }
  26. catch (Exception ex)
  27. {
  28. strResult = Convert.ToString(ex.Message);
  29. return strResult;
  30. }
  31. }
  32. }
                                
  1. <PaymentOptions>
  2. <PaymentMethod>
  3. <Name> Cash </Name>
  4. <ShortDescription> CA </ShortDescription>
  5. <Id> 1 </Id>
  6. </PaymentMethod>
  7. <PaymentMethod>
  8. <Name> Credit Card </Name>
  9. <ShortDescription> CC </ShortDescription>
  10. <Id> 2 </Id>
  11. </PaymentMethod>
  12. <PaymentMethod>
  13. <Name> Check </Name>
  14. <ShortDescription> CH </ShortDescription>
  15. <Id> 3 </Id>
  16. </PaymentMethod>
  17. <PaymentOptions>
Xml Node Description
PaymentMethod
Name Name of the Payment Method. It can be Cash, Credit card.
ShortDescription ShortDescription of the payment method.
ID Payment option Id.