Exemplo n.º 1
0
        public async Task <AdvanceJson> BeginAdvanceEvaluation([FromQuery] AdvanceEvaluationModel model)
        {
            var advProcessing = new AdvanceProcessing(_context, _acquirerApi, _accountApi, _log);
            var advance       = model.Map();

            try
            {
                advance = await advProcessing.BeginEvaluation(advance, model.AuthToken);
            }
            catch (Exception ex)
            {
                return(new AdvanceErrorJson(ex.Message));
            }

            await _context.SaveChangesAsync();

            return(new AdvanceJson(advance));
        }