Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
        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));
        }
Esempio n. 4
0
        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));
        }
Esempio n. 5
0
        internal VerifyCustomerResponseDto UpdateAgentPassword(VerifyCustomerRequestDto model)
        {
            var response = _dbHelper.UpdateAgentPassword(model);

            return(response);
        }
Esempio n. 6
0
        internal VerifyCustomerResponseDto VerifyAgentOTP(VerifyCustomerRequestDto model)
        {
            var response = _dbHelper.VerifyAgentOTP(model);

            return(response);
        }