public HttpResponseMessage UpdateAgentPIN(VerifyCustomerRequestDto request) { if (string.IsNullOrEmpty(request.OldPassword)) { return(Request.CreateErrorResponse(HttpStatusCode.PreconditionFailed, "Invalid Old PIN")); } var response = _processController.UpdatePassword(request.Password, request.CustomerId, request.DeviceId, request.OldPassword, request.Type); return(Request.CreateResponse(HttpStatusCode.OK, response)); }
public HttpResponseMessage VerifyAgentOTP(VerifyCustomerRequestDto request) { if (string.IsNullOrEmpty(request.OTP)) { return(Request.CreateErrorResponse(HttpStatusCode.PreconditionFailed, "Invalid OTP")); } var response = _processController.VerifyAgentOTP(request); return(Request.CreateResponse(HttpStatusCode.OK, response)); }
public HttpResponseMessage VerifyCustomer(VerifyCustomerRequestDto model) { if (string.IsNullOrEmpty(model.CustomerId)) { return(Request.CreateErrorResponse(HttpStatusCode.PreconditionFailed, "Invalid Customer id")); } var response = _processController.VerifyCustomer(model.CustomerId); return(Request.CreateResponse(HttpStatusCode.OK, response)); }
public HttpResponseMessage UpdateAgentPassword(VerifyCustomerRequestDto model) { var expression = new Regex("^(?=.{8,20}$)(?=.*[0-9])(?=.*[a-zA-Z]).*"); if (!expression.IsMatch(model.Password)) { return(Request.CreateErrorResponse(HttpStatusCode.PreconditionFailed, "Invalid password format")); } var response = _processController.UpdateAgentPassword(model); return(Request.CreateResponse(HttpStatusCode.OK, response)); }
internal VerifyCustomerResponseDto UpdateAgentPassword(VerifyCustomerRequestDto model) { var response = _dbHelper.UpdateAgentPassword(model); return(response); }
internal VerifyCustomerResponseDto VerifyAgentOTP(VerifyCustomerRequestDto model) { var response = _dbHelper.VerifyAgentOTP(model); return(response); }