public IActionResult OnGet([FromServices] GetCustomerInfo getCustomerinfo) { //Get Cart var info = getCustomerinfo.Do(); if (info == null) { //if (_env.IsDevelopment()) //{ // CustomerInfo = new AddCustomerInfo.Request // { // FirstName = "a", // LastName = "a", // Email = "*****@*****.**", // PhoneNumber = "00", // City = "defult", // Address1 = "defult", // Address2 = "defult" // }; //} return(Page()); } else { return(RedirectToPage("/Checkout/PaymentMethods")); } }
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 info = getCustomerInfo.Do(); if (info == null) //if he dosen't purches before { return(RedirectToPage("/Checkout/CustomerInfo")); } return(Page()); }
public IActionResult OnGet([FromServices] GetCustomerInfo getCustomerInfo) { var information = getCustomerInfo.Do(); if (information == null) { return(RedirectToPage("/Checkout/CustomerInformation")); } else { return(Page()); } }