PHPackages                             diego-mascarenhas/laravel-mercadopago-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. diego-mascarenhas/laravel-mercadopago-sdk

ActiveLibrary

diego-mascarenhas/laravel-mercadopago-sdk
=========================================

Mercado Pago SDK v0.6.3 for Laravel

0.6.3(2y ago)012MITPHP

Since Mar 18Pushed 2y ago1 watchersCompare

[ Source](https://github.com/diego-mascarenhas/laravel-mercadopago-sdk)[ Packagist](https://packagist.org/packages/diego-mascarenhas/laravel-mercadopago-sdk)[ RSS](/packages/diego-mascarenhas-laravel-mercadopago-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Laravel Facade para MercadoPago v0.6.3
======================================

[](#laravel-facade-para-mercadopago-v063)

- [Instalation](#install)
- [Configuration](#configuration)
- [Usage](#usage)
- [Troubleshooting](#troubleshooting)

### Installation

[](#installation)

`composer require diego-mascarenhas/laravel-mercadopago-sdk`

Within config/app.php, add the following Provider and Alias

Provider

```
'providers' => [
  // Others Providers...
  DiegoMascarenhas\LaravelMercadoPago\Providers\MercadoPagoServiceProvider::class,
  /*
   * Application Service Providers...
   */
],
```

Alias

```
'aliases' => [
  // Others Aliases
  'MP' => DiegoMascarenhas\LaravelMercadoPago\Facades\MP::class,
],
```

### Configuration

[](#configuration)

Before configuring the APP ID and APP SECRET, run the following command:

`php artisan vendor:publish`

After executing the command, go to the `.env` file and add the `MP_APP_ID` and `MP_APP_SECRET` fields with the corresponding values of the `CLIENT_ID` and `CLIENT_SECRET` from your MercadoPago application.

To find out your `CLIENT_ID` and `CLIENT_SECRET` information, you can go here:

- [Credentials](https://www.mercadopago.com/mla/account/credentials?type=basic)

If you do not want to use the `.env` file, go to `config/mercadopago.php` and add your corresponding application details.

```
return [
	'app_id' => env('MP_APP_ID', 'YOUR CLIENT ID'),
	'app_secret' => env('MP_APP_SECRET', 'YOUR CLIENT SECRET'),
  'app_ssl' => env('MP_APP_SSL', true),
	'app_sandbox' => env('MP_APP_DEBUG', false)
];
```

### Usage

[](#usage)

In this example, we will create a payment preference using the `MP` Facade.

```
