enrol mpcheckoutpro
Mercadopago Payment Gateway Enrolment Plugin Colombia
This plugin allows integration with Mercadopago, a popular payment gateway, to manage paid course enrolments within Moodle. It provides a seamless enrolment experience for users while offering administrators a flexible and easy-to-configure payment solution.
Key Features:
- Seamless Integration: Connects Moodle with Mercadopago for automated payment processing and enrolment.
- Flexible Configuration: Supports both development and production environments with customizable settings.
- Secure Transactions: Leverages Mercadopago's secure platform for handling financial transactions.
- Easy Setup: Simple installation and configuration process through Moodle's administrative interface.
- Customizable Enrolment Options: Allows setting custom instance names, enrolment costs, and enrolment periods.
Supported Moodle Versions: 4.0, 4.1, 4.2, 4.3, 4.4, 4.5
Installation Guide:
Requirements:
- Your moodle have run in linux server
- You need a mercado pago account in colombian country
- You need install sdk for mercadopago checkout pro
- You need install composer for php
Steps:
- Download the composer in your linux operative system (you never install components in public directory, by default the public access for externals /var/www/html)
- Go to www directory: and run all command in the steps (important)
cd /var/www/
- Install Composer using the instructions found at Composer's download page: https://getcomposer.org/download/ The installation process may vary depending on your operating system.
- Install Checkoutpro using the instructions found mercado pago page: https://www.mercadopago.com.co/developers/es/docs/checkout-pro/integrate-preferences (Install sdk of mercado pago) for example you have search this section:
php composer.phar require "mercadopago/dx-php"
- Go to www directory: and run all command in the steps (important)
- After successful installation, the necessary files will be located in the vendor directory within your project.:

Note: If a error in some steps you will be fixed before continue
Mercado pago page
- Login in your account: https://www.mercadopago.com.co/
- Go to, home -> Your business -> configuration -> credentials
- After scan and confirm QR you have a create application (product checkoutpro) and not ecommerce platform.
- Click in activate credentials (for real payments), fill the industry and other areas.
- After two creadentials (production for real payments) and sandbox (for testing) generated for configuration.

- Copy in your text editor the production credentials.
Moodle Plugin Page
- Upload the Plugin: In your Moodle site as an administrator, navigate to Site administration > plugins.
- Upload the plugin ZIP file. Choose the plugin type "Enrolment method (enrol)". Accept the acknowledgement and install.
- Enable the Plugin: Go to Site administration > Plugins > Enrolments > Manage enrol plugins and enable "Mercadopago".
- Configure Settings: Click the settings icon for the Mercadopago plugin. Enter your Mercadopago merchant credentials and configure any desired options. Save changes.
- Add to Course: Navigate to the desired course, then go to Course administration > Users > Enrolment methods. Choose "Mercadopago" from the dropdown menu.
- Configure Enrolment Instance: Set a custom instance name, enrolment cost, and any other relevant options, such as the enrolment duration. Save changes.
Configurations in moodle site with credentials
When all steps is success, you will be configure moodle integration:
- In your Moodle site as an administrator, navigate to Site administration > plugins.
- Paste the AccessToken that you copy in the mercado pago step.
- Paste the Publickey that you copy in the mercado pago step.

- The sdk for automatic enrolment require the path for vendor/autoload.php in the installation requirements at home this page. (the plugin will be try when default path for this) if you install components in another route you have edit this.
- Ipn for notifications is optional (is a webhook when user todo pay), you can add url site to notification (you will be develop component for catch event)
- The next is a enrolment instance defaults (cost, tax, currency role assigment, enrolment duration).

- Save changes.
Course configuration
- Go to course and categories
- Ingress to course for set enrolment with mercado pago
- Enable edit mode.
- set Participants and chose enrolment methods

- Add method and select mpcheckoutpro.
- Fill the cost, tax, currency role assigment, enrolment duration.

- Add method.
- Now you see the new method for pay enroll.

User Experience:
Registered users can now view and access the course after successfully completing payment through the Mercadopago gateway.
The users will view your status in the platform.
- In the courses that have a enrollment method mercado pago they view the payment element (show aliase for enrollment method that you write).

- Click to pay

- Note: The payments that you will be use is pse, efecty and default mercado pago account (the mercado pago account not proccess pays if is the same account of integration).

Transaction status
Error with payment:
When payment is failed, the user receive message for contact support or wait to the payment is accredited
Payment pending:
When payment wait to check with mercado pago account.

Payment success:
When payment is accredited
