public void PostOrderToOmx(int orderId)
        {
            string req = new OrderMotion().GetRequest(orderId, false, false); // Posting order to OMX
            string res = CommonHelper.HttpPost(config.Attributes["OMXUrl"].Value, req);
            Dictionary <string, AttributeValue> orderAttributes = new Dictionary <string, AttributeValue>();

            orderAttributes.Add("Request", new CSBusiness.Attributes.AttributeValue(req));
            orderAttributes.Add("Response", new CSBusiness.Attributes.AttributeValue(res));

            XmlDocument doc = new XmlDocument();

            doc.LoadXml(res);
            XmlNode xnResult = doc.SelectSingleNode("/UDOAResponse/Success");

            if (xnResult.InnerText.ToLower().Equals("1"))
            {
                CSResolve.Resolve <IOrderService>().SaveOrderInfo(orderId, 2, req.ToLower().Replace("utf-8", "utf-16"), res.ToLower().Replace("utf-8", "utf-16"));
                CSResolve.Resolve <IOrderService>().UpdateOrderAttributes(orderId, orderAttributes, 2);
            }
            else
            {
                CSResolve.Resolve <IOrderService>().SaveOrderInfo(orderId, 8, req.ToLower().Replace("utf-8", "utf-16"), res.ToLower().Replace("utf-8", "utf-16"));
                CSResolve.Resolve <IOrderService>().UpdateOrderAttributes(orderId, orderAttributes, 8);
                //sending email to admins
                OrderHelper.SendEmailToAdmins(orderId);
            }
        }
        public decimal GetTaxFromOMX(int orderId)
        {
            decimal     taxAmount = 0;
            string      req       = new OrderMotion().GetRequest(orderId, true, false);
            string      res       = CommonHelper.HttpPost(config.Attributes["OMXUrl"].Value, req);
            XmlDocument doc       = new XmlDocument();

            doc.LoadXml(res);
            XmlNode xnResult = doc.SelectSingleNode("/UDOAResponse/Success");
            XmlNode xnTax    = doc.SelectSingleNode("/UDOAResponse/UDOARequest/Header/Tax");

            if (xnResult.InnerText.ToLower().Equals("1"))
            {
                if (xnTax != null)
                {
                    taxAmount = Convert.ToDecimal(xnTax.InnerText);
                }
            }

            return(taxAmount);
        }