public async Task PagosBusiness_ConfigurarPayU_ShouldConfigure()
        {
            PagosBusiness pagosBusiness = new PagosBusiness();

            HistorialPagosPersonas historial = new HistorialPagosPersonas
            {
                Consecutivo = 23
            };

            PayUModel payUModel = await pagosBusiness.ConfigurarPayU(historial);

            Assert.IsNotNull(payUModel);
        }
Пример #2
0
        public async Task <IHttpActionResult> ConfigurarPayU(HistorialPagosPersonas pagoParaProcesar)
        {
            if (pagoParaProcesar == null || pagoParaProcesar.Consecutivo <= 0)
            {
                return(BadRequest("pagoParaProcesar vacio y/o invalido!."));
            }

            try
            {
                PayUModel payUModel = await _pagosBusiness.ConfigurarPayU(pagoParaProcesar);

                return(Ok(payUModel));
            }
            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
        }