public IActionResult OnGet([FromServices] GetCustomerInfo getCustomerInfo) { var information = getCustomerInfo.Do(); if (information == null) { if (_env.IsDevelopment()) { CustomerInformation = new AddCustomerInfo.Request { FirstName = "Sxmmie", LastName = "Umoh", Email = "*****@*****.**", PhoneNumber = "07062926985", Address1 = "1 Georgious Cole estate", Address2 = "", City = "Lagos", PostCode = "23401", }; } return(Page()); } else { return(RedirectToPage("/Checkout/Payment")); } // If cart exists. go to payments }
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")); } }