Download the PHP package diego-mascarenhas/laravel-mercadopago-sdk without Composer
On this page you can find all versions of the php package diego-mascarenhas/laravel-mercadopago-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download diego-mascarenhas/laravel-mercadopago-sdk
More information about diego-mascarenhas/laravel-mercadopago-sdk
Files in diego-mascarenhas/laravel-mercadopago-sdk
Package laravel-mercadopago-sdk
Short Description Mercado Pago SDK v0.6.3 for Laravel
License MIT
Informations about the package laravel-mercadopago-sdk
Laravel Facade para MercadoPago v0.6.3
- Instalation
- Configuration
- Usage
- Troubleshooting
Installation
composer require diego-mascarenhas/laravel-mercadopago-sdk
Within config/app.php, add the following Provider and Alias
Provider
Alias
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:
If you do not want to use the .env
file, go to config/mercadopago.php
and add your corresponding application details.
Usage
In this example, we will create a payment preference using the MP
Facade.
In this example, we will create a subscription (automatic debit) using the MP
Facade.
In the example, the use of the Carbon
library can be seen to specify the start and end dates of the subscription, with a monthly frequency.
To the current date, an hour is added via Carbon
, as otherwise MercadoPago might consider the date as past.
Troubleshooting
SSL Certificate Problem: Unable to Get Local Issuer Certificate
If you encounter an error stating SSL certificate problem: unable to get local issuer certificate, this typically occurs when the root certificates on your system are out of date or missing.
To resolve this issue, download the Latest CA Certificates Bundle from CA Extract.