public IHttpActionResult Mpnotification(MercadoPago mercado, string identificador, int tp)
        {
            int ret = 0;

            try
            {
                if (identificador != null)
                {
                    bool retorno = true;
                    ///ValidaLogin(user, senha);
                    if (retorno)
                    {
                        BuscaPagamento(mercado.data.id, tp);

                        dao.daoNotification ApiDao = new dao.daoNotification();
                        ret = ApiDao.set_Notification(Convert.ToInt32(identificador), mercado.data.id, mercado.type, tp);
                        return(Ok());
                    }
                    else
                    {
                        return(BadRequest("Usuário e senha invalida"));
                    }
                }
                else
                {
                    return(BadRequest("Favor preencher todos os dados"));
                }
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.ToString()));
            }
        }
Exemple #2
0
 public MercadoPagoAdapter(MercadoPago mercadoPago)
 {
     _mercadoPago = mercadoPago;
 }