A payment gateway integration for Mercado Pago on the Bagisto e-commerce platform.
- Seamless integration with Bagisto checkout process
- Support for Mercado Pago payment methods
- Configurable from Bagisto admin panel
- Sandbox mode support for testing
- Bagisto ^2.0
- PHP ^8.1
- Composer
- Mercado Pago account
composer require midnightgb/mercadopago
- Download this repository
- Extract the file and copy the
mercadopago-payment-gateaway
folder to thepackages/
directory of your Bagisto installation - Add the following line to the
composer.json
file in theautoload.psr-4
section:"Midnight\\MercadoPago\\": "packages/mercadopago-payment-gateaway/src/"
- Add the following service provider to the
config/app.php
file:Midnight\MercadoPago\Providers\MercadoPagoServiceProvider::class
- Run:
composer dump-autoload
-
Get your Mercado Pago credentials:
- Log in to your Mercado Pago Developers account
- Go to the Credentials section
- Copy your Access Token and Public Key
-
Configure the credentials in your
.env
file:MERCADOPAGO_ACCESS_TOKEN=YOUR_ACCESS_TOKEN MERCADOPAGO_PUBLIC_KEY=YOUR_PUBLIC_KEY
-
Configure the payment method in the Bagisto admin panel:
- Go to Settings > Sales > Payment Methods
- Find "Mercado Pago" in the list
- Enable the payment method
- Configure the title and description
- Enable Sandbox mode for testing if needed
- Save the configuration
Once configured, Mercado Pago will appear as a payment option during the checkout process in your Bagisto store.
For testing in Sandbox mode, you can use the test cards provided by Mercado Pago.
If you encounter any issues, check the Laravel logs in storage/logs/laravel.log
.
Contributions are welcome. Please submit a Pull Request or open an Issue to discuss proposed changes.
This package is licensed under the MIT License.