Get results of the mercadopago transaction

0

I'm doing a project where you send payments for products using mercadopago, so far it works as it should but the process has a problem.

When the user is going to make the payment, he uses a button that uses the% co_of market% pay, when he clicks this he appears in a modal according to this

<a href="{{$preference['response']['sandbox_init_point']}}" name="MP-Checkout" class="lightblue-M-Ov-ArOn" mp-mode="modal" onreturn="execute_my_onreturn">Enviar pago</a>

as you see it executes a function render.js , but for this, the user must "close" the onreturn and here is the problem, It is necessary to save the data of the answer but if the user closes the modal or the browser without closing the modal the payment was sent but the data will not be able to save them.

Is there a way to execute my function once the user is shown the result in the modal (approved, rejected, pending)?

    
asked by Carlos Salazar 24.06.2018 в 22:13
source

0 answers