Market Payment: MVC, error when configuring payment receipt URL

1

I'm making a payment module with the api of mercadopago, and when configuring the url for the reception of payment notifications on the page of mercadopago, I get the error "The URL entered does not answer an HTTP correct status, you must reply 200 or 201 ".

My application is made in MVC, and the action I want to configure is:

[HttpGet]
public HttpStatusCodeResult MisNotificaciones(string topic, string id)
{
     return new HttpStatusCodeResult(200);
}

Some idea of how I should do the method or how I should put the URL in link ?

Right now I'm trying to set link

    
asked by nachoamado 12.02.2018 в 20:11
source

1 answer

0

I tried several ways to return a HttpStatusCodeResult without success.

In the middle of the row, create a common view, return a blank HTML page and before the return View () I put my code that I want to be executed upon receiving the Market notification payment, and this way if that worked.

Going to the MercadoPago page and setting up my URL I put link and I take it as correct.

The code in my controller is:

public ActionResult MisNotificaciones(string topic, int id)
{
    // LOGIC HERE

    return View();
}

and the corresponding view:

<html>
<head>
   <title></tile>
</head>
<body></body>
</html>
    
answered by 19.02.2018 в 17:10