1. Go to this page and download the library: Download mercadopago/sdk 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/ */
array(
"uri" => "The resource URI, relative to https://api.mercadopago.com",
"params" => "Optional. Key=>Value array with parameters to be appended to the URL",
"data" => "Optional. Object or String to be sent in POST and PUT requests",
"headers" => "Optional. Key => Value array with custom headers, like content-type: application/x-www-form-urlencoded",
"authenticate" => "Optional. Boolean to specify if the GET method has to authenticate with credentials before request. Set it to false when accessing public APIs"
)
// Get a resource, with optional URL params. Also you can disable authentication for public APIs
$mp->get (
array(
"uri" => "/resource/uri",
"params" => array(
"param" => "value"
),
"headers" => array(
"header" => "value"
),
"authenticate" => true
)
);
// Create a resource with "data" and optional URL params.
$mp->post (
array(
"uri" => "/resource/uri",
"params" => array(
"param" => "value"
),
"headers" => array(
"header" => "value"
),
"data" => [data]
)
);
// Update a resource with "data" and optional URL params.
$mp->put (
array(
"uri" => "/resource/uri",
"params" => array(
"param" => "value"
),
"headers" => array(
"header" => "value"
),
"data" => [data]
)
);
// Delete a resource with optional URL params.
$mp->delete (
array(
"uri" => "/resource/uri",
"params" => array(
"param" => "value"
),
"headers" => array(
"header" => "value"
)
)
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.