private void View(HttpContext context) { int orderId = 0; byte productId = 0; if (context.Request["OrderId"] != null && !int.TryParse(context.Request["OrderId"].ToString(), out orderId)) { GenerateErrorResponse(400, "OrderId value must be a number"); } if (context.Request["ProductId"] != null && !byte.TryParse(context.Request["ProductId"].ToString(), out productId)) { GenerateErrorResponse(400, "ProductId value must be a number"); } TablePreferences PaymentDetailsTablePreferences = new TablePreferences("", "", true, false); Dictionary <string, TablePreferences> PaymentDetailsDictionary = new Dictionary <string, TablePreferences>(); PaymentDetailsDictionary.Add("PaymentDetails", PaymentDetailsTablePreferences); OrdersManagement.Core.Client client = new OrdersManagement.Core.Client(responseFormat: OrdersManagement.ResponseFormat.JSON); context.Response.Write(client.GetPaymentDetails(productId, orderId, PaymentDetailsDictionary)); }