otidh/mercadopago-dx-php-laravel is a Laravel package.
It currently has 0 GitHub stars and 3 downloads on Packagist.
Install it with composer require otidh/mercadopago-dx-php-laravel.
Discover more Laravel packages by otidh
or browse all Laravel packages to compare alternatives.
Last updated
No more doctrine/common and doctrine/annotations issues when using Laravel Framework.
Refer this issues/pull requests:
https://github.com/mercadopago/dx-php/issues/78
https://github.com/mercadopago/dx-php/issues/106
https://github.com/mercadopago/dx-php/pull/136
This library provides developers with a simple set of bindings to the Mercado Pago API.
The SDK supports PHP 5.6 or major
composer require mercadopago/dx-php on the command line.
require __DIR__ . '/vendor/autoload.php';
You have two types of credentials:
MercadoPago\SDK::setAccessToken("YOUR_ACCESS_TOKEN"); // On Production
MercadoPago\SDK::setAccessToken("YOUR_TEST_ACCESS_TOKEN"); // On Sandbox
MercadoPago\SDK::setClientId("YOUR_CLIENT_ID");
MercadoPago\SDK::setClientSecret("YOUR_CLIENT_SECRET");
You can interact with all the resources available in the public API, to this each resource is represented by classes according to the following diagram:

Sample
<?php
require_once 'vendor/autoload.php';
MercadoPago\SDK::setAccessToken("YOUR_ACCESS_TOKEN");
$payment = new MercadoPago\Payment();
$payment->transaction_amount = 141;
$payment->token = "YOUR_CARD_TOKEN";
$payment->description = "Ergonomic Silk Shirt";
$payment->installments = 1;
$payment->payment_method_id = "visa";
$payment->payer = array(
"email" => "[email protected]"
);
$payment->save();
echo $payment->status;
?>
Write us at developers.mercadopago.com