private string ReturnFirstPayError() { ErrorMessage er; if (!string.IsNullOrEmpty(ErrorMessage)) { er = new ErrorMessage("Transaction Error: " + HttpUtility.UrlDecode(ErrorMessage)); } else if (!string.IsNullOrEmpty(AuthResponse) && !AuthResponse.ToLower().Contains("approved")) { er = new ErrorMessage("Transaction Declined: " + HttpUtility.UrlDecode(AuthResponse)); } else { er = new ErrorMessage("The transaction was declined."); } var checkoutController = CheckOutPageControllerFactory.CreateCheckOutPageController(ThisCustomer, cart); return(checkoutController.GetCheckoutPaymentPage() + "?errormsg=" + er.MessageId); }