Ejemplo n.º 1
0
        public async Task <IHttpActionResult> Confirmation(ConfirmRegistration details)
        {
            // To do - Move the following code to a single method & use it across the project
            IEnumerable <string> tokenValues;
            string tokenValue = "";

            if (Request.Headers.TryGetValues("AuthorizationToken", out tokenValues))
            {
                tokenValue = tokenValues.FirstOrDefault();
            }
            var payment = await loanService.ConfirmationforLoanAsync(tokenValue, details);

            if (payment == null)
            {
                return(NotFound());
            }
            return(Ok(payment));
        }