PHP code example of fedeisas / mercadopago-sdk-php
1. Go to this page and download the library: Download fedeisas/mercadopago-sdk-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
fedeisas / mercadopago-sdk-php example snippets
use MercadoPago\MercadoPago;
use MercadoPago\Http\GuzzleClient;
$mp = new MercadoPago(new GuzzleClient());
$mp->setCredentials('CLIENT_ID', 'CLIENT_SECRET');
use MercadoPago\MercadoPago;
use MercadoPago\Http\GuzzleClient;
$mp = new MercadoPago(new GuzzleClient());
$mp->setCredentials('CLIENT_ID', 'CLIENT_SECRET');
$paymentInfo = $mp->getPayment('PAYMENT_ID');
var_dump($paymentInfo);