Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!Page.IsPostBack)
                {
                    btnConfirmOrder.Attributes.Add("OnClick", ScriptAvoidDoubleClick(btnConfirmOrder, Localization.GetString("Processing", LocalResourceFile)));
                    lblError.Text    = string.Empty;
                    lblError.Visible = false;
                    string message = Localization.GetString("lblConfirmMessage", LocalResourceFile);
                    lblConfirmMessage.Text = string.Format(message, PortalSettings.PortalName);
                }

                EmailNavigation nav = new EmailNavigation(Request.QueryString);
                if (nav.GatewayExit.ToUpper() == "RETURN")
                {
                    CheckoutControl.Hide();
                    pnlProceedToEmail.Visible = false;
                    InvokeAwaitingPayment();
                }
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Example #2
0
        private void ConfirmOrder()
        {
            //Adds order to db...
            OrderInfo order = CheckoutControl.GetFinalizedOrderInfo();

            GenerateOrderConfirmation();
            // Set order status to "Awaiting Payment"...
            CheckoutControl.Order = UpdateOrderStatus(order, OrderInfo.OrderStatusList.AwaitingPayment);

            //Clear basket
            CurrentCart.DeleteCart(PortalId, StoreSettings.SecureCookie);
            //Clear cookies
            ClearOrderIdCookie();

            EmailNavigation nav = new EmailNavigation(Request.QueryString)
            {
                GatewayExit = "return",
                OrderID     = order.OrderID
            };

            Response.Redirect(nav.GetNavigationUrl());
        }