Hello! This is a super basic form in PHP which integrates MercadoPago's Checkout Pro. In my initial project, I had problems emailing information to my client after the payment was made, so I was able to solve it with this piece of code and wanted to share it.
It is important that you install both the MercadoPago SDK and PHPMailer for it to work, you can use the code provided as a reference.
On the other hand, this is only compatible for payments with debit / credit card, it is not possible to integrate the MercadoPago electronic wallet (I already consulted it tt)
The fields are sanitized in PHP but it is important that you add your own validations and error messages regarding validations. I did it both on the client side with JQuery and on the server-side with PHP, but I decided not to include it in the project since could cause compatibility problems.
I hope it helps you something!
Hi there! This is a super basic form in PHP which integrates MercadoPago's Checkout Pro. On my initial project, I had trouble submitting information via e-mail to my client after the payment was made, so I was able to solve it with this piece of code and wanted to share it.
It is important that you install both the MercadoPago SDK and PHPMailer for it to work, you can use the code provided as a reference.
On the other hand, this is only compatible for debit / credit card payments, it is not possible to integrate MercadoPago's electronic wallet (I already asked for it tt)
The fields are sanitized in PHP but it is important that you add your own validations and error messages regarding the validations, I did it both in client side with JQuery and in server-side with PHP, but I decided not to include it in the project since it could bring compatibility problems.
Hopefully this can help you!