PHP code example of codemancompany / laravel-mercadopago

1. Go to this page and download the library: Download codemancompany/laravel-mercadopago 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/ */

    

codemancompany / laravel-mercadopago example snippets


	/*
	 * Package Service Providers...
	 */
	CodemanCompany\LaravelMercadoPago\Providers\MercadoPagoServiceProvider::class,
	

	'MP' => CodemanCompany\LaravelMercadoPago\Facades\MP::class,
	

use MP;

$filter = [
	'email' => '[email protected]',
];

$response = MP :: get( [
	'uri' => '/v1/customers/search',
	'data' => $filter,
] );

$data = [		
	'email' => '[email protected]',
	'first_name' => 'Codeman',
	'last_name' => 'Company',
	'phone' => [
		'area_code' => '52',
		'number' => '5555555555',
	],
];
$response = MP :: post( [
	'uri'	=>	'/v1/customers',
	'data'	=>	$data,
] );