public ActionResult StoreSettings(Guid privId, Guid storeId)
        {
            DisplayStoreModel displayStore = null;
            try
            {
                NameValueCollection nameValueCollection = HttpUtility.ParseQueryString(Request.Url.Query);
                string updated = nameValueCollection["u"];

                if (!String.IsNullOrEmpty(updated) && updated == SiteMessagesEnum.sced.ToString())
                {
                    SiteMessage message = new SiteMessage();
                    message.MessageType = SiteMessageType.Error;
                    message.Message = "You did not Connect to Stripe. In order to Accept Customer Credit Cards, you should connect to Stripe.";
                    this.AddMessage(message);
                }
                if (!String.IsNullOrEmpty(updated) && updated == SiteMessagesEnum.sca.ToString())
                {
                    SiteMessage message = new SiteMessage();
                    message.MessageType = SiteMessageType.Success;
                    message.Message = "Stripe Connected Successfully.";
                    this.AddMessage(message);
                }

                ViewBag.IsSuccessful = false;
                var sg = new StoreGateway();
                var realStore = sg.GetStoreSettings(storeId, privId);
                string stripe = "https://connect.stripe.com/oauth/authorize?response_type=code&client_id=" + ServerConfig.STRIPE_CONNECT_LIVE_KEY + "&scope=read_write&state=" + StripeStateReturnCodeEnum.store + "-" + privId.ToString().Replace("-", "");
                


                displayStore = new DisplayStoreModel( realStore);
                displayStore.CurrencyList = new SelectList(SiteCache.GetCurrencyExchanges(), "CurrencyAbbrName", "CurrencyNameDisplay", "USD");
                ViewBag.StripeUrl = stripe;
            }
            catch (Exception exception)
            {
                ErrorDatabaseManager.AddException(exception, exception.GetType());
            }
            return View(displayStore);

        }
        public ActionResult StoreSettings(DisplayStoreModel store)
        {
            try
            {
                ViewBag.IsSuccessful = false;
                var sg = new StoreGateway();
                ViewBag.IsSuccessful = sg.UpdateStoreSettings(store);

                return Redirect(Url.Content("~/store/settings/" + store.PrivateManagerId.ToString().Replace("-", "") + "/" + store.MerchantId.ToString().Replace("-", "")));
            }
            catch (Exception exception)
            {
                ErrorDatabaseManager.AddException(exception, exception.GetType());
            }
            return Redirect(Url.Content("~/?u=" + SiteMessagesEnum.sww));
        }