public ActionResult Credit(bool isModal)
        {
            checkoutProcess checkoutItem = (checkoutProcess)Session["checkoutProcess"];
            cardInfo helperPage = checkoutItem.cardInfo;
            checkoutShared cs = new checkoutShared(db);
            basketShared bs = new basketShared(db);

            // Bind Post Error
            if (TempData["errorMessage"] != null)
            {
                helperPage.isErrorExist = true;
                helperPage.message = TempData["errorMessage"].ToString();
            }

            // Product Price
            var productPriceItem = cs.getProductPrice(checkoutItem.cartItem, langId, langCode, mainPath, false);
            if (!productPriceItem.Item1)
            {
                // Redirect  Error
                #region Error

                if (isModal)
                {
                    string redirectPage = getSiteNameWithoutSlash(Request) + returnBasketMainPageRelativeUrl(null);
                    return Json(new { redirectPage = redirectPage }, JsonRequestBehavior.AllowGet);
                }
                else
                {
                    return returnBasketMainPage(null);
                }

                #endregion
            }

            var productPrice = productPriceItem.Item2;

            // Cargo Price
            var cargoPrice = cs.getCargoPriceByCargoId(checkoutItem.cargoId, productPrice, langId);

            if (cargoPrice < 0)
            {
                // Error On Cargo
                #region Error
                {
                    if (isModal)
                    {

                        return Json(new { redirectPage = redirectToStepFullSiteName(checkoutStep.cargo, checkoutItem) }, JsonRequestBehavior.AllowGet);
                    }
                    else
                    {
                        return returnBasketMainPage(null);
                    }

                }
                #endregion
            }

            var cargoAndProductPrice = productPrice + cargoPrice;

            helperPage.totalPriceStr = cargoAndProductPrice.ToString("F2", System.Globalization.CultureInfo.CreateSpecificCulture("en-US"));

            if (isModal)
            {
                string html = RenderRazorViewToString("Credit", helperPage);
                return Json(new { html = html }, JsonRequestBehavior.AllowGet);
            }
            else
            {
                return View(helperPage);
            }
        }
        public ActionResult CreditOption(bool isModal, string creditCard)
        {
            checkoutProcess checkoutItem = (checkoutProcess)Session["checkoutProcess"];
            checkoutShared cs = new checkoutShared(db);
            cardOption helperPage = new cardOption();

            // Product Price
            var productPriceItem = cs.getProductPrice(checkoutItem.cartItem, langId, langCode, mainPath, false);
            if (!productPriceItem.Item1)
            {
                // Redirect  Error
                #region Error

                if (isModal)
                {
                    string redirectPage = getSiteNameWithoutSlash(Request) + returnBasketMainPageRelativeUrl(null);
                    return Json(new { redirectPage = redirectPage }, JsonRequestBehavior.AllowGet);
                }
                else
                {
                    return returnBasketMainPage(null);
                }

                #endregion
            }

            var productPrice = productPriceItem.Item2;

            // Cargo Price
            var cargoPrice = cs.getCargoPriceByCargoId(checkoutItem.cargoId, productPrice, langId);

            if (cargoPrice < 0)
            {
                // Error On Cargo
                #region Error
                {
                    if (isModal)
                    {

                        return Json(new { redirectPage = redirectToStepFullSiteName(checkoutStep.cargo, checkoutItem) }, JsonRequestBehavior.AllowGet);
                    }
                    else
                    {
                        return returnBasketMainPage(null);
                    }

                }
                #endregion
            }

            var cargoAndProductPrice = productPrice + cargoPrice;

            //  get Option List
            if (cs.isCreditCardValid(creditCard))
            {
                helperPage.optionList = cs.getCardOptionList(langId, cargoAndProductPrice, creditCard, HelperSite.Pos.posType.standart, System.Globalization.CultureInfo.CreateSpecificCulture("en-US"), "TL");

                if (helperPage.optionList == null)
                {
                    errorSend(new Exception("mainPosNull geliyor"), "Pos atanmamış");
                    helperPage.isErrorExist = true;
                }
            }

            helperPage.creditOptionId = checkoutItem.cardInfo.cardOption.creditOptionId;

            if (isModal)
            {
                string html = RenderRazorViewToString("CreditOption", helperPage);
                return Json(new { html = html }, JsonRequestBehavior.AllowGet);
            }
            else
            {
                return View(helperPage);
            }
        }
        public ActionResult Cargo(int pageId)
        {
            checkoutShared cs = new checkoutShared(db);
            checkoutProcess checkoutItem = (checkoutProcess)Session["checkoutProcess"];
            checkoutItem.clearDataOnStepAndBindCurrentStep(checkoutStep.cargo);

            // Validation
            var validation = checkoutItem.validationOnCurrentStep(db);
            if (!validation.Item1)
            {
                return redirectToValidation(validation, checkoutItem);
            }

            helperCheckoutCargo helperPage = new helperCheckoutCargo();
            sharedCheckoutItemLoad(pageId, helperPage, checkoutItem);

            // get Basket Content => Price , Discount
            var productPriceItem = cs.getProductPrice(checkoutItem.cartItem, langId, langCode, mainPath, false);
            if (!productPriceItem.Item1)
            {
                return returnBasketMainPage(null);
            }

            var basketTotal = productPriceItem.Item2;

            // get Cargo List
            helperPage.cargoList = cs.getCargoItemList(basketTotal, langId, "en-US");
            helperPage.selectedCargoId = checkoutItem.cargoId;

            Session["checkoutProcess"] = checkoutItem;
            return View(helperPage);
        }