Payment Type Get Payment Types by passing required parameter.
Key | Value |
---|---|
URL | https://api.ovvihq.com/OnlineOrder/PaymentTypes |
APIKey | Provided by OVVI |
- public string GetPaymentType()
- {
- get
- {
- string strResult = string.Empty;
- try
- {
- HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://api.ovvihq.com/OnlineOrder/PaymentTypes");
- request.ContentType = "application/json";
- request.Method = "GET";
- request.Headers.Add("APIKey", "Provided by OVVI");
- // Set some reasonable limits on resources used by this request
- request.ContentLength = 0;
- // Set credentials to use for this request.
- request.Credentials = CredentialCache.DefaultCredentials;
- HttpWebResponse response = (HttpWebResponse)request.GetResponse();
- // Get the stream associated with the response.
- Stream receiveStream = response.GetResponseStream();
- // Pipes the stream to a higher level stream reader with the required encoding format.
- StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);
- strResult = readStream.ReadToEnd().ToString();
- response.Close();
- readStream.Close();
- return strResult;
- }
- catch (Exception ex)
- {
- strResult = Convert.ToString(ex.Message);
- return strResult;
- }
- }
- }
- <PaymentOptions>
- <PaymentMethod>
- <Name> Cash </Name>
- <ShortDescription> CA </ShortDescription>
- <Id> 1 </Id>
- </PaymentMethod>
- <PaymentMethod>
- <Name> Credit Card </Name>
- <ShortDescription> CC </ShortDescription>
- <Id> 2 </Id>
- </PaymentMethod>
- <PaymentMethod>
- <Name> Check </Name>
- <ShortDescription> CH </ShortDescription>
- <Id> 3 </Id>
- </PaymentMethod>
- <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. |