public IActionResult OnGet(
            [FromServices] GetCustomerInformation getCustomerInformation)
        {
            // Get Cart
            var information = getCustomerInformation.Do();

            // If Cart exist go to payment
            if (information == null)
            {
                if (_env.IsDevelopment())
                {
                    CustomerInformation = new AddCustomerInformation.Request
                    {
                        FirstName   = "Jaime",
                        LastName    = "Barras",
                        Email       = "*****@*****.**",
                        PhoneNumber = "(866) 555-1234",
                        Address1    = "Home Address",
                        Address2    = "Office Address",
                        City        = "New York",
                        ZipCode     = "25078",
                    };
                }

                return(Page());
            }
            else
            {
                return(RedirectToPage("/Checkout/Payment"));
            }
        }
예제 #2
0
        public IActionResult OnGet([FromServices] GetCustomerInformation getCustomerInformation)
        {
            var info = getCustomerInformation.Do();

            if (info == null)
            {
                if (_env.IsDevelopment())
                {
                    CustomerInfo = new AddCustomerInformation.Request
                    {
                        FirstName   = "FirstName",
                        LastName    = "LastName",
                        Email       = "*****@*****.**",
                        PhoneNumber = "123",
                        Address1    = "Address1",
                        Address2    = "Address2",
                        City        = "City",
                        PostCode    = "PostCode",
                    };
                }
                return(Page());
            }
            else
            {
                return(RedirectToPage("/Checkout/Payment"));
            }
        }
예제 #3
0
        public IActionResult OnGet(
            [FromServices] GetCustomerInformation getCustomerInformation)
        {
            var information = getCustomerInformation.Do();

            if (information == null)
            {
                if (_env.IsDevelopment())
                {
                    CustomerInformation = new AddCustomerInformation.Request
                    {
                        FirstName   = "Jan",
                        LastName    = "Kowalski",
                        Email       = "*****@*****.**",
                        PhoneNumber = "111222333",
                        Address1    = "Cebulowa",
                        Address2    = "21/37",
                        City        = "Radom",
                        PostCode    = "33-666",
                    };
                }
                return(Page());
            }
            else
            {
                return(RedirectToPage("/Checkout/Payment"));
            }
        }
예제 #4
0
        public IActionResult OnGet(
            [FromServices] GetCustomerInformation getCustomerInformation)
        {
            var information = getCustomerInformation.Do();

            if (information == null)
            {
                if (_env.IsDevelopment())
                {
                    CustomerInformation = new AddCustomerInformation.Request
                    {
                        FirstName   = "First",
                        LastName    = "Last",
                        Email       = "*****@*****.**",
                        PhoneNumber = "5555555555",
                        Address1    = "123 Fake Street",
                        Address2    = "Apartment A",
                        City        = "Beverly Hills",
                        State       = "CA",
                        ZipCode     = "90210",
                    };
                }
                return(Page());
            }
            else
            {
                return(RedirectToPage("/Checkout/Payment"));
            }
        }
        public IActionResult OnGet([FromServices] GetCustomerInformation getCustomerInformation)
        {
            //Get Cart
            var information = getCustomerInformation.Do();

            if (information == null)
            {
                if (_env.IsDevelopment())
                {
                    CustomerInformation = new AddCustomerInformation.Request
                    {
                        FirstName   = "A",
                        LastName    = "A",
                        Address1    = "A",
                        Address2    = "A",
                        City        = "A",
                        State       = "A",
                        Zipcode     = "A",
                        Email       = "*****@*****.**",
                        PhoneNumber = "11",
                    };
                }
                return(Page());
            }
            else
            {
                return(RedirectToPage("Payment"));
            }
        }
예제 #6
0
        public IActionResult OnGet(
            [FromServices] GetCustomerInformation getCustomerInformation)
        {
            var information = getCustomerInformation.Do();

            if (information == null)
            {
                //
                #region DevEnvOnly
                if (_environment.IsDevelopment())
                {
                    CustomerInformation = new AddCustomerInformation.Request {
                        FirstName   = "devTest",
                        LastName    = "devTest",
                        Email       = "*****@*****.**",
                        PhoneNumber = "1111",
                        Address1    = "devTest",
                        Address2    = "devTest",
                        City        = "devTest",
                        PostCode    = "devTest"
                    };
                }
                #endregion
                //
                return(Page());
            }
            else
            {
                return(RedirectToPage("/Checkout/Payment"));
            }
        }
예제 #7
0
        public IActionResult OnGet([FromServices] GetCustomerInformation getCustomerInformation)
        {
            var information = getCustomerInformation.Do();

            if (information == null)
            {
                return(RedirectToPage("/Checkout/CustomerInformation"));
            }
            return(Page());
        }