Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (NopContext.Current.User == null)
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            if (!Page.IsPostBack)
            {
                this.BindData();
            }
        }
Ejemplo n.º 2
0
        protected override void OnInit(EventArgs e)
        {
            if (NopContext.Current.User == null)
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            BindOrders();
            BindRecurringPayments();

            base.OnInit(e);
        }
Ejemplo n.º 3
0
 protected void Checkout()
 {
     ApplyCheckoutAttributes();
     if (NopContext.Current.User == null || NopContext.Current.User.IsGuest)
     {
         string loginURL = SEOHelper.GetLoginPageUrl(true, true);
         Response.Redirect(loginURL);
     }
     else
     {
         Response.Redirect("~/checkout.aspx");
     }
 }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if ((NopContext.Current.User == null) || (NopContext.Current.User.IsGuest && !CustomerManager.AnonymousCheckoutAllowed))
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            if (this.Cart.Count == 0)
            {
                Response.Redirect(SEOHelper.GetShoppingCartUrl());
            }
        }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CommonHelper.SetResponseNoCache(Response);

            if (NopContext.Current.User == null || NopContext.Current.User.IsGuest)
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            string title = GetLocaleResourceString("PageTitle.Account");

            SEOHelper.RenderTitle(this, title, true);
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if ((NopContext.Current.User == null) || (NopContext.Current.User.IsGuest && !this.CustomerService.AnonymousCheckoutAllowed))
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            if (Cart.Count == 0)
            {
                Response.Redirect(SEOHelper.GetShoppingCartUrl());
            }

            //validation
            var scWarnings = this.ShoppingCartService.GetShoppingCartWarnings(Cart, NopContext.Current.User.CheckoutAttributes, true);

            if (scWarnings.Count > 0)
            {
                Response.Redirect(SEOHelper.GetShoppingCartUrl());
            }
            else
            {
                foreach (ShoppingCartItem sci in this.Cart)
                {
                    List <String> sciWarnings = this.ShoppingCartService.GetShoppingCartItemWarnings(
                        sci.ShoppingCartType,
                        sci.ProductVariantId,
                        sci.AttributesXml,
                        sci.CustomerEnteredPrice,
                        sci.Quantity);
                    if (sciWarnings.Count > 0)
                    {
                        Response.Redirect(SEOHelper.GetShoppingCartUrl());
                    }
                }
            }

            if (!Page.IsPostBack)
            {
                if (!this.ShippingService.ShoppingCartRequiresShipping(Cart))
                {
                    pnlShippingAddress.Visible = false;
                    pnlShippingMethods.Visible = false;
                }

                SelectPane(CheckoutStepEnum.ShippingAddress);
            }
        }
Ejemplo n.º 7
0
        protected void btnEdit_Click(object sender, EventArgs e)
        {
            var forumTopic = ForumManager.GetTopicById(this.TopicId);

            if (forumTopic != null)
            {
                if (!ForumManager.IsUserAllowedToEditTopic(NopContext.Current.User, forumTopic))
                {
                    string loginURL = SEOHelper.GetLoginPageUrl(true);
                    Response.Redirect(loginURL);
                }

                string editForumTopicURL = SEOHelper.GetEditForumTopicUrl(forumTopic.ForumTopicId);
                Response.Redirect(editForumTopicURL);
            }
        }
        protected void btnMoveTopic_Click(object sender, EventArgs e)
        {
            var forumTopic = this.ForumService.GetTopicById(this.TopicId);

            if (forumTopic != null)
            {
                if (!this.ForumService.IsUserAllowedToMoveTopic(NopContext.Current.User, forumTopic))
                {
                    string loginURL = SEOHelper.GetLoginPageUrl(true);
                    Response.Redirect(loginURL);
                }

                string moveForumTopicURL = SEOHelper.GetMoveForumTopicUrl(forumTopic);
                Response.Redirect(moveForumTopicURL);
            }
        }
Ejemplo n.º 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (NopContext.Current.User == null)
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            if (!Page.IsPostBack)
            {
                this.FillCountryDropDowns();
                this.FillStateProvinceDropDowns();
                this.FillTimeZones();
                this.BindData();
            }
        }
Ejemplo n.º 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (NopContext.Current.User == null)
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            CommonHelper.SetResponseNoCache(Response);

            if (!Page.IsPostBack)
            {
                if (!AmazonHelper.ValidateRequest(Request.QueryString, String.Format("{0}AmazonSimplePayReturn.aspx", CommonHelper.GetStoreLocation()), "GET"))
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }

                int   orderId = Convert.ToInt32(CommonHelper.QueryStringInt("referenceId"));
                Order order   = OrderManager.GetOrderById(orderId);
                if (order == null)
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }
                if (NopContext.Current.User.CustomerId != order.CustomerId)
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }

                if (SimplePaySettings.SettleImmediately)
                {
                    if (OrderManager.CanMarkOrderAsPaid(order))
                    {
                        OrderManager.MarkOrderAsPaid(order.OrderId);
                    }
                }
                else
                {
                    if (OrderManager.CanMarkOrderAsAuthorized(order))
                    {
                        OrderManager.MarkAsAuthorized(order.OrderId);
                    }
                }

                Response.Redirect("~/checkoutcompleted.aspx");
            }
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Logout customer
        /// </summary>
        private void logout()
        {
            IoC.Resolve <ICustomerService>().Logout();
            string loginURL = string.Empty;

            if (HozestERPContext.Current != null)
            {
                if (HozestERPContext.Current.IsAdmin)
                {
                    loginURL = SEOHelper.GetAdminAreaLoginPageUrl();
                }
                else
                {
                    loginURL = SEOHelper.GetLoginPageUrl();
                }
                HttpContext.Current.Response.Redirect(loginURL);
            }
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Logout customer
        /// </summary>
        private void logout()
        {
            CustomerManager.Logout();
            string loginURL = string.Empty;

            if (NopContext.Current != null)
            {
                if (NopContext.Current.IsAdmin)
                {
                    loginURL = SEOHelper.GetAdminAreaLoginPageUrl();
                }
                else
                {
                    loginURL = SEOHelper.GetLoginPageUrl();
                }
                HttpContext.Current.Response.Redirect(loginURL);
            }
        }
Ejemplo n.º 13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CommonHelper.SetResponseNoCache(Response);

            if (!this.SettingManager.GetSettingValueBoolean("Checkout.UseOnePageCheckout"))
            {
                Response.Redirect("~/checkout.aspx");
            }

            string title = GetLocaleResourceString("PageTitle.CheckoutOnePage");

            SEOHelper.RenderTitle(this, title, true);

            if ((NopContext.Current.User == null) || (NopContext.Current.User.IsGuest && !this.CustomerService.AnonymousCheckoutAllowed))
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }
        }
Ejemplo n.º 14
0
        protected void btnEdit_Click(object sender, EventArgs e)
        {
            int forumPostId = 0;

            int.TryParse(lblForumPostId.Text, out forumPostId);
            var forumPost = ForumManager.GetPostById(forumPostId);

            if (forumPost != null)
            {
                if (!ForumManager.IsUserAllowedToEditPost(NopContext.Current.User, forumPost))
                {
                    string loginURL = SEOHelper.GetLoginPageUrl(true);
                    Response.Redirect(loginURL);
                }

                string url = SEOHelper.GetEditForumPostUrl(forumPost.ForumPostId);
                Response.Redirect(url);
            }
        }
Ejemplo n.º 15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CommonHelper.SetResponseNoCache(Response);

            if (NopContext.Current.User == null || NopContext.Current.User.IsGuest)
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            if (!this.ForumService.AllowPrivateMessages)
            {
                Response.Redirect(CommonHelper.GetStoreLocation());
            }

            string title = GetLocaleResourceString("PageTitle.ViewPM");

            SEOHelper.RenderTitle(this, title, true);
        }
Ejemplo n.º 16
0
        protected void btnSubmitVoteRecord_Click(object sender, EventArgs e)
        {
            var customer = NopContext.Current.User;

            if (rblPollAnswers.SelectedItem != null && customer != null && !customer.IsGuest)
            {
                int pollAnswerId = Convert.ToInt32(rblPollAnswers.SelectedItem.Value);
                if (!PollManager.PollVotingRecordExists(this.PollId, customer.CustomerId))
                {
                    PollManager.CreatePollVotingRecord(pollAnswerId, customer.CustomerId);
                }
                BindData(true);
            }
            else
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }
        }
Ejemplo n.º 17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CommonHelper.SetResponseNoCache(Response);

            if ((NopContext.Current.User == null) || (NopContext.Current.User.IsGuest && !CustomerManager.AnonymousCheckoutAllowed))
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            ShoppingCart cart = ShoppingCartManager.GetCurrentShoppingCart(ShoppingCartTypeEnum.ShoppingCart);

            if (cart.Count == 0)
            {
                Response.Redirect(SEOHelper.GetShoppingCartUrl());
            }

            this.btnNextStep.Attributes.Add("onclick", "this.disabled = true;" + Page.ClientScript.GetPostBackEventReference(this.btnNextStep, ""));
        }
Ejemplo n.º 18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (NopContext.Current.User == null)
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }
            order = OrderManager.GetOrderById(this.OrderId);
            if (order == null || order.Deleted || NopContext.Current.User.CustomerId != order.CustomerId)
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            if (!Page.IsPostBack)
            {
                this.BindData();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (NopContext.Current.User == null)
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            CommonHelper.SetResponseNoCache(Response);

            if (!Page.IsPostBack)
            {
                int   orderId = Convert.ToInt32(Request.Form["x"]);
                Order order   = this.OrderService.GetOrderById(orderId);
                if (order == null)
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }
                if (NopContext.Current.User.CustomerId != order.CustomerId)
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }

                string authkey  = Request.Form["authkey"];
                int    transact = Int32.Parse(Request.Form["transact"]);
                int    currency = DibsHelper.GetCurrencyNumberByCode(this.CurrencyService.PrimaryStoreCurrency.CurrencyCode);
                int    amount   = (int)((double)order.OrderTotal * 100);

                if (!authkey.Equals(FlexWinHelper.CalcAuthKey(transact, amount, currency)))
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }

                if (this.OrderService.CanMarkOrderAsPaid(order))
                {
                    this.OrderService.MarkOrderAsPaid(order.OrderId);
                }

                Response.Redirect("~/checkoutcompleted.aspx");
            }
        }
Ejemplo n.º 20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //comment this line to process return
            Response.Redirect(CommonHelper.GetStoreLocation());



            if (NopContext.Current.User == null)
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            CommonHelper.SetResponseNoCache(Response);

            if (!Page.IsPostBack)
            {
                Order order = this.OrderService.GetOrderById(CommonHelper.QueryStringInt("Order_IDP"));
                if (order == null || NopContext.Current.User.CustomerId != order.CustomerId)
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }

                if (HostedPaymentSettings.AuthorizeOnly)
                {
                    if (this.OrderService.CanMarkOrderAsAuthorized(order))
                    {
                        this.OrderService.MarkAsAuthorized(order.OrderId);
                    }
                }
                else
                {
                    if (this.OrderService.CanMarkOrderAsPaid(order))
                    {
                        this.OrderService.MarkOrderAsPaid(order.OrderId);
                    }
                }

                Response.Redirect("~/checkoutcompleted.aspx");
            }
        }
        protected void btnReply_Click(object sender, EventArgs e)
        {
            var forumTopic = this.ForumService.GetTopicById(this.TopicId);

            if (forumTopic != null)
            {
                if (NopContext.Current.User == null && this.ForumService.AllowGuestsToCreatePosts)
                {
                    this.CustomerService.CreateAnonymousUser();
                }

                if (!this.ForumService.IsUserAllowedToCreatePost(NopContext.Current.User, forumTopic))
                {
                    string loginURL = SEOHelper.GetLoginPageUrl(true);
                    Response.Redirect(loginURL);
                }

                string newForumPostURL = SEOHelper.GetNewForumPostUrl(forumTopic.ForumTopicId);
                Response.Redirect(newForumPostURL);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (NopContext.Current.User == null)
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            CommonHelper.SetResponseNoCache(Response);

            if (!Page.IsPostBack)
            {
                if (!PayPointHelper.ValidateResponseSign(Request.Url))
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }
                if (!CommonHelper.QueryStringBool("valid"))
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }

                int   orderId = CommonHelper.QueryStringInt("trans_id");
                Order order   = this.OrderService.GetOrderById(orderId);
                if (order == null)
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }
                if (NopContext.Current.User.CustomerId != order.CustomerId)
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }

                if (this.OrderService.CanMarkOrderAsPaid(order))
                {
                    this.OrderService.MarkOrderAsPaid(order.OrderId);
                }
                Response.Redirect("~/checkoutcompleted.aspx");
            }
        }
Ejemplo n.º 23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (NopContext.Current.User == null)
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }
            order = OrderManager.GetOrderById(this.OrderId);
            if (order == null || order.Deleted || NopContext.Current.User.CustomerId != order.CustomerId)
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            if (!Page.IsPostBack)
            {
                this.BindData();
            }

            //buttons
            lbPDFInvoice.Visible = SettingManager.GetSettingValueBoolean("Features.SupportPDF");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //comment this line to process return
            Response.Redirect(CommonHelper.GetStoreLocation());

            CommonHelper.SetResponseNoCache(Response);

            if (NopContext.Current.User == null)
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            if (!Page.IsPostBack)
            {
                if (!CommonHelper.QueryStringBool("trnApproved"))
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }

                int   orderId = CommonHelper.QueryStringInt("trnOrderNumber");
                Order order   = this.OrderService.GetOrderById(orderId);
                if (order == null)
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }
                if (NopContext.Current.User.CustomerId != order.CustomerId)
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }

                if (this.OrderService.CanMarkOrderAsPaid(order))
                {
                    this.OrderService.MarkOrderAsPaid(order.OrderId);
                }
                Response.Redirect("~/checkoutcompleted.aspx");
            }
        }
Ejemplo n.º 25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if ((NopContext.Current.User == null) || (NopContext.Current.User.IsGuest && !this.CustomerService.AnonymousCheckoutAllowed))
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            if (!Page.IsPostBack)
            {
                var orderCollection = NopContext.Current.User.Orders;
                if (orderCollection.Count == 0)
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }
                else
                {
                    var lastOrder = orderCollection[0];
                    lblOrderNumber.Text        = lastOrder.OrderId.ToString();
                    hlOrderDetails.NavigateUrl = string.Format("{0}OrderDetails.aspx?OrderID={1}", CommonHelper.GetStoreLocation(), lastOrder.OrderId).ToLowerInvariant();
                }
            }
        }
Ejemplo n.º 26
0
        private void BindData()
        {
            pnlError.Visible = false;

            var forumTopic = this.ForumService.GetTopicById(this.ForumTopicId);

            if (forumTopic == null)
            {
                Response.Redirect(SEOHelper.GetForumMainUrl());
            }

            if (!this.ForumService.IsUserAllowedToMoveTopic(NopContext.Current.User, forumTopic))
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            ctrlForumBreadcrumb.ForumTopicId = forumTopic.ForumTopicId;
            ctrlForumBreadcrumb.BindData();

            ctrlForumSelector.SelectedForumId = forumTopic.ForumId;
            ctrlForumSelector.BindData();
        }
        protected void PostCartToGoogle(object sender, ImageClickEventArgs e)
        {
            //user validation
            if (NopContext.Current.User == null && this.CustomerService.AnonymousCheckoutAllowed)
            {
                //create anonymous record
                this.CustomerService.CreateAnonymousUser();
            }

            if ((NopContext.Current.User == null) || (NopContext.Current.User.IsGuest && !this.CustomerService.AnonymousCheckoutAllowed))
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            //USD for US dollars, GBP for British pounds, SEK for Swedish krona, EUR for Euro etc
            GCheckoutButton1.Currency = this.CurrencyService.PrimaryStoreCurrency.CurrencyCode;
            var Req = GCheckoutButton1.CreateRequest();
            var googleCheckoutPaymentProcessor = new GoogleCheckoutPaymentProcessor();

            NopSolutions.NopCommerce.BusinessLogic.Orders.ShoppingCart cart = this.ShoppingCartService.GetCurrentShoppingCart(ShoppingCartTypeEnum.ShoppingCart);
            var Resp = googleCheckoutPaymentProcessor.PostCartToGoogle(Req, cart);

            if (Resp.IsGood)
            {
                Response.Redirect(Resp.RedirectUrl);
            }
            else
            {
                Response.Clear();
                Response.Write("Resp.RedirectUrl = " + Resp.RedirectUrl + "<br />");
                Response.Write("Resp.IsGood = " + Resp.IsGood + "<br />");
                Response.Write("Resp.ErrorMessage = " + Server.HtmlEncode(Resp.ErrorMessage) + "<br />");
                Response.Write("Resp.ResponseXml = " + Server.HtmlEncode(Resp.ResponseXml) + "<br />");
                Response.End();
            }
        }
Ejemplo n.º 28
0
        protected void btnPaypalExpress_Click(object sender, EventArgs e)
        {
            if ((NopContext.Current.User == null) || (NopContext.Current.User.IsGuest && !CustomerManager.AnonymousCheckoutAllowed))
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }

            var payPalExpress    = new PayPalExpressPaymentProcessor();
            var ppePaymentMethod = PaymentMethodManager.GetPaymentMethodBySystemKeyword("PayPalExpress");

            if (ppePaymentMethod != null && ppePaymentMethod.IsActive)
            {
                decimal?cartTotal = ShoppingCartManager.GetShoppingCartTotal(cart,
                                                                             ppePaymentMethod.PaymentMethodId, NopContext.Current.User, false);
                if (cartTotal.HasValue)
                {
                    string expressCheckoutURL = payPalExpress.SetExpressCheckout(cartTotal.Value,
                                                                                 CommonHelper.GetStoreLocation(false) + "paypalexpressreturn.aspx",
                                                                                 CommonHelper.GetStoreLocation(false));
                    Response.Redirect(expressCheckoutURL);
                }
            }
        }
Ejemplo n.º 29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string title = GetLocaleResourceString("PageTitle.AddressEdit");

            SEOHelper.RenderTitle(this, title, true);

            CommonHelper.SetResponseNoCache(Response);

            if (NopContext.Current.User == null)
            {
                string loginURL = SEOHelper.GetLoginPageUrl(true);
                Response.Redirect(loginURL);
            }
            var address = CustomerManager.GetAddressById(this.AddressId);

            if (address != null)
            {
                var addressCustomer = address.Customer;
                if (addressCustomer == null || addressCustomer.CustomerId != NopContext.Current.User.CustomerId)
                {
                    string loginURL = SEOHelper.GetLoginPageUrl(true);
                    Response.Redirect(loginURL);
                }

                if (DeleteAddress)
                {
                    CustomerManager.DeleteAddress(address.AddressId);
                    Response.Redirect(SEOHelper.GetMyAccountUrl());
                }
            }

            if (!Page.IsPostBack)
            {
                this.BindData();
            }
        }
Ejemplo n.º 30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if ((NopContext.Current.User == null) || NopContext.Current.User.IsGuest)
            {
                Response.Redirect(SEOHelper.GetLoginPageUrl(true));
            }

            CommonHelper.SetResponseNoCache(Response);

            if (!Page.IsPostBack)
            {
                Order order = OrderManager.GetOrderById(CommonHelper.QueryStringInt("OrderId"));
                if (order == null)
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }
                if (NopContext.Current.User.CustomerId != order.CustomerId)
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }

                string md5 = CommonHelper.QueryString("MD5");

                if (String.IsNullOrEmpty(md5) || !md5.Equals(HostedPaymentHelper.CalcMd5Hash(String.Format("{0}SveaHostedPaymentReturn.aspx{1}{2}", CommonHelper.GetStoreHost(false), Regex.Replace(Request.Url.Query, "&MD5=.*", String.Empty), HostedPaymentSettings.Password))))
                {
                    Response.Redirect(CommonHelper.GetStoreLocation());
                }

                if (OrderManager.CanMarkOrderAsPaid(order))
                {
                    OrderManager.MarkOrderAsPaid(order.OrderId);
                }

                Response.Redirect("~/checkoutcompleted.aspx");
            }
        }