Esempio n. 1
0
    private void doPaymint()
    {
        Dictionary <string, string> inventDic = AjaxService.checkInventory(null, Session.SessionID);

        if (inventDic.Count == 0)
        {
            String payMode = "COD";// this is hard code need to be change when paymint gatway will intigrate
            string orderId = AjaxService.createOrder(Session.SessionID, Session[Constant.Session.SHIPING_EMAIL] + "", payMode, Session[Constant.Session.LOGED_IN_USER_ID] + "");
            Session[Constant.Session.CURRENT_ORDER] = orderId;
            AjaxService.updateInventroy(Session.SessionID);
            AjaxService.clearCart(Session.SessionID);
            Session.Remove(Constant.Session.CART_ITEMS);
            Session.Remove(Constant.Session.TOTAL);
            EmailTemplateService.sendOrderPlacedEmail();
            Response.Redirect(ConfigUtil.hostURL() + "order-summary");
        }
        else
        {
            Response.Redirect(ConfigUtil.hostURL() + "check-out");
        }
    }