Exemple #1
0
        public IActionResult OnGet([FromServices] GetCustomerInfo getCustomerInfo)
        {
            var customerInfo = getCustomerInfo.Action();

            if (customerInfo == null)
            {
                if (_env.EnvironmentName == "Development")
                {
                    CustomerInfo = new AddCustomerInfo.Request
                    {
                        FirstName    = "Krystal",
                        LastName     = "Ruwoldt",
                        EmailAddress = "*****@*****.**",
                        PhoneNumber  = "0414419581",
                        Address1     = "24 Caulfield Road",
                        Address2     = "",
                        City         = "Morawa",
                        Postcode     = "6623"
                    };
                }

                //Needs to be able to be edited
                return(Page());
            }
            else
            {
                return(RedirectToPage("/Checkout/Payment"));
            }
        }
        public IActionResult OnGet([FromServices] GetCustomerInfo getCustomerInfo)
        {
            var customerInfo = getCustomerInfo.Action();

            if (customerInfo == null)
            {
                return(RedirectToPage("/Checkout/CustomerInfo"));
            }
            return(Page());
        }