Status Return Javascript or PHP API MercadoPago

0

I would like to know what to do at the time that I am getting the payment array from the paid market API. I implemented the server-side status response (in PHP), according to the returns presented in MarketPage documentation .

The complete payment implementation code is available this link .

The question is whether it is correct for me to do this response handling in PHP or if I should do it via Javascript on the page that sends the form to the payment page. (index.php)

    
asked by anonymous 10.10.2017 / 14:27

1 answer

0

Dude, from what I understood and in my example I have been involved with the Cielo API for payment by credit card. I believe you should return PHP 201 to the end of the code where it does the checks, for example: if($payment['response']['status'] == "rejected"){

    
10.10.2017 / 19:29