Back

VibeFox MercadoPago for OpenCart — Help

Requirements

OpenCart: 3.0.x (tested on 3.0.5.0) or 4.0.2 and later (tested on 4.1.0.3).

PHP: 8.0 or later.

Store currency: the currency of your MercadoPago account country must be enabled in the store: ARS (Argentina), BRL (Brazil), CLP (Chile), COP (Colombia), MXN (Mexico), PEN (Peru) or UYU (Uruguay). MercadoPago charges in the account currency and does not convert, so the payment method is shown only to customers who pay in that currency.

MercadoPago account: you need an application in the MercadoPago developer panel (Your integrations > your application > Credentials) with its test credentials (start with TEST-) and production credentials (start with APP_USR-): a Public Key and an Access Token for each. For the optional signature check of notifications you also need the secret signature from your application > Webhooks.

VibeFox license key: bought on vibefox.net. One key works on one domain.

Installation

The download is one zip file with the packages for both OpenCart versions. Unpack it on your computer. It contains README.txt, the OpenCart 3 package wcp_mercadopago_gateway-oc3-(version).ocmod.zip and the OpenCart 4 package wcp_mercadopago_gateway.ocmod.zip. Install only the package for your OpenCart version. The license key is the same for both versions.

OpenCart 3

1. In the admin go to Extensions > Installer, click Upload and choose the file wcp_mercadopago_gateway-oc3-(version).ocmod.zip. The extension has no OCMOD modifications, so Extensions > Modifications does not need a refresh. Instead of the installer you can copy the contents of the upload folder of this package into the root folder of your store.

2. Go to Extensions > Extensions and choose the type Payments. Find VibeFox MercadoPago Gateway and click Install (the green + button). Your admin user needs the right to modify the payment extensions list.

3. Click Edit (the pencil button) to open the settings page. Paste your VibeFox license key into License key in the license block at the top of the page and click Activate (see License key).

4. Choose the Account country, enter the test and production credentials and, optionally, set up notifications in your MercadoPago application (see Configuration). Check that the currency of the account is enabled in System > Localisation > Currencies.

5. Turn on Enable / Disable and click Save. Test a payment in test mode with MercadoPago test cards, then turn off Test mode.

OpenCart 4

1. In the admin go to Extensions > Installer, click Upload and choose the file wcp_mercadopago_gateway.ocmod.zip. Do not rename the file: OpenCart 4 takes the extension code from the file name, and a renamed package does not work.

2. The package appears in the list of installed extensions on the same page. Click Install (the green + button) next to it.

3. Go to Extensions > Extensions and choose the type Payments. Find VibeFox MercadoPago Gateway, click Install (the green + button), then Edit (the pencil button).

4. Enter the license key, the credentials and the notifications as in steps 3 to 5 for OpenCart 3. The settings page and its fields are the same in both versions. Only the notification URL is different (see Payment notifications).

A new install starts with the payment method turned off and test mode on.

Configuration

All settings are on the extension page: Extensions > Extensions > Payments > VibeFox MercadoPago Gateway > Edit. The sections are listed on the left; the Save button under the list saves the whole page. Above the settings the page shows Test mode is on: the TEST- credentials are used and no real money is charged. while test mode is on. It warns you when the Public Key or Access Token of the current mode is missing (the payment method is then hidden at checkout), when the default store currency is not the currency of your MercadoPago account (the method is then shown only to customers paying in the account currency, or hidden if the store has no such enabled currency), and when the credentials belong to an account in another country than Account country. Without the right to modify the extension the page shows the settings but cannot save them.

When you save with an empty Title (or one longer than 128 characters), nothing is saved and the page shows Enter a title for the payment method (1 to 128 characters). Any other wrong value is not saved and keeps its previous value, with an error that names the field and ends with — the previous value was kept. This applies to a credential that does not start with the expected prefix (TEST- for test fields, APP_USR- for production fields), Maximum installments outside 1–24, a Sort Order that is not a whole number (Sort Order must be a whole number), a Total that is not a number of 0 or greater, a geo zone or order status that does not exist. After saving, the extension asks MercadoPago which country each access token belongs to. If the token of the current mode cannot be checked, if the account is not in a supported country or if the country differs from Account country, a warning is shown. The extension then uses the country of the account.

MercadoPago

Enable / Disable: Enable MercadoPago card payments turns the payment method on or off. The method is shown at checkout only when the credentials of the active mode are filled in and the customer pays in the currency of the MercadoPago account. Default: off.

Title: the payment method name shown to the customer at checkout. It is also the payment method name stored in the order. Default: Credit or debit card (MercadoPago). Required, up to 128 characters.

Description: the text shown above the card fields at the Confirm Order step. Default: Pay securely with your credit or debit card. Card data is sent directly to MercadoPago.

Sort Order: the position of MercadoPago among the payment methods at checkout. Leave it empty or enter a whole number.

Geo Zone: offer MercadoPago only for payment addresses in the selected geo zone. Default: All zones. Geo zones are set up in System > Localisation > Geo Zones.

Total: the checkout total, in the default currency of the store, that an order must reach before MercadoPago is offered. Leave it empty to offer MercadoPago for any total.

MercadoPago account

Get the credentials of your application in the MercadoPago developer panel: Your integrations > your application > Credentials (the page links there). Test credentials start with TEST-, production credentials with APP_USR-.

Account country: the country of your MercadoPago account. It decides the charged currency, the language of the card fields and whether the cardholder document is asked. The customer must pay in the same currency, for example ARS for Argentina. When credentials are saved, the country is checked against the account. Default: Argentina (ARS).

Argentina (ARS), Brazil (BRL), Chile (CLP), Colombia (COP), Mexico (MXN), Peru (PEN), Uruguay (UYU): the supported countries. The document field is shown for all of them except Mexico.

Test mode: in test mode the TEST- credentials are used and you pay with MercadoPago test cards; a TEST MODE badge with Use MercadoPago test cards. No real charges. is shown at checkout. Turn it off to charge real cards with the production credentials. Refunds and notifications always use the credentials of the mode the payment was made in. Default: on.

Test Public Key: starts with TEST-. Used in the browser to tokenize the card.

Test Access Token: starts with TEST-. Used on the server only. Keep it secret.

Production Public Key: starts with APP_USR-.

Production Access Token: starts with APP_USR-. Used on the server only. Keep it secret.

Saved access tokens and the webhook secret are never shown again. The field stays empty and shows Saved — leave empty to keep it. Type a new value only to change it. To remove a saved value, tick Clear the saved value on save under the field and click Save.

Payment options

Maximum installments: the highest number of installments (cuotas or parcelas) the customer can choose, from 1 to 24. 1 = single payment only. The limit is also enforced on the server. Default: 1.

Payment notifications (webhooks)

Card payments usually get a final answer at once. Payments that MercadoPago keeps under review (in process or pending) are completed by MercadoPago notifications. The extension sends the notification URL with every payment when your store has a public address (not localhost or a .local or .test domain). You can also add it in your application > Webhooks, event Payments. The URL is shown in Notification URL in this section. On OpenCart 3 it looks like https://your-store/index.php?route=extension/payment/wcp_mercadopago_gateway/webhook&source_news=webhooks, on OpenCart 4 like https://your-store/index.php?route=extension/wcp_mercadopago_gateway/payment/wcp_mercadopago_gateway.webhook&source_news=webhooks. It is built from the storefront address of your OpenCart installation. Copy the URL exactly as the settings show it.

A notification is never trusted as such. The extension re-reads the payment from the MercadoPago API with the access token of the environment the payment was made in and binds it to a payment attempt of your store. Without notifications, orders under review stay in Awaiting MercadoPago Status until you update them by hand.

The extension handles these MercadoPago payment statuses:

approved: the payment was approved. The order is marked paid when the amount and currency match.
in_process, pending, authorized: the payment is under review. The order waits in Awaiting MercadoPago Status and is completed by a later notification.
rejected, cancelled: the payment was declined or cancelled. A new order stays without a status; an order that was waiting gets Payment Failed Status.
refunded, charged_back, in_mediation: a note is added; the order status is not changed.

Webhook secret signature: optional. The secret signature shown in your application > Webhooks. When set, notifications without a valid x-signature are rejected (HTTP 401).

Orders

OpenCart creates the order at the Confirm Order step without a status (a missing order). It gets a status only after MercadoPago has answered. A declined card leaves the order without a status (a note explains why) and the customer stays on the Confirm Order step. Each field below lists your OpenCart order statuses.

Order Status After Payment: MercadoPago approved the payment and its amount and currency match the order. Default: Processing.

Awaiting MercadoPago Status: the payment is under review at MercadoPago (in process or pending); the notification completes the order. Default: Pending.

On Hold (Review) Status: MercadoPago approved another amount or currency than the order, or returned an unexpected status. A note explains what to check in the MercadoPago panel. Default: Pending, because OpenCart has no On hold status. You can create your own statuses in System > Localisation > Order Statuses to tell the awaiting and the review orders apart.

Payment Failed Status: a payment that was under review was rejected or cancelled by MercadoPago. Default: Failed.

Cancelled Status: an order in this status (or in the refunded status) is closed: a late MercadoPago approval only adds a note. Default: Canceled.

Refunded Status: the payment is fully refunded from the order page. Partial refunds only add a note. Default: Refunded.

Advanced

Debug log: writes MercadoPago requests and notifications to wc_mpg_debug.log.php in the OpenCart logs folder (storage/logs). The file cannot be opened from the web. Errors are always logged, also while this setting is off. Access tokens, card tokens and payer data are not logged. Default: off.

Log: shows the size and the latest entries of the log. Click Clear log to empty it.

Delete data on uninstall: when on, uninstalling the extension removes the gateway settings and the log. MercadoPago payment records and refunds always stay, so orders paid before can still be refunded after a re-install. Default: off.

Import / Export

Export: Download JSON saves the settings as a JSON file. Access tokens and the webhook secret are not exported.

Import: paste previously exported JSON and click Import to restore the settings. Saved secrets are kept.

Checkout

At the Payment Method step the customer chooses the payment method (by default Credit or debit card (MercadoPago)). OpenCart creates the order at the Confirm Order step, still without a status. There the customer sees your description and fills in the card fields: Card number, Expiry (MM/YY), Security code and Cardholder name. Depending on the country and the card, the customer also chooses Document type and enters Document number, selects the Card issuer and the number of Installments. The installment options and interest come from MercadoPago for the order total.

On OpenCart 4 the customer picks the payment method with the Choose button of the payment method block, in the window Payment method options. The card fields then appear in the order confirmation block at the bottom of the checkout page, above the Confirm Order button.

When the customer clicks Confirm Order, MercadoPago turns the card into a one-time token and your store creates the payment on the server for the order total in the order currency. The customer's e-mail and name and the document are passed to MercadoPago; the payment shows as Order #, the order number and your store name. CLP and COP amounts are charged without decimals.

An approved payment sets the order status the standard OpenCart way, with the usual order e-mails and stock update, the cart is emptied, and the customer sees the OpenCart order success page. A payment under review sets Awaiting MercadoPago Status, and the page also shows MercadoPago is reviewing your payment. Your order will be updated automatically as soon as MercadoPago confirms it. An order in the review status shows Your payment is being reviewed. We will update your order as soon as the review is complete.

A declined card leaves the order without a status. The customer stays at the Confirm Order step with a short reason, for example Your card has insufficient funds. Please use another card or payment method. or Please check the security code of your card. The customer can correct the data or use another card; a new card token is created for each attempt. Missing card data shows Please fill in all card fields.

If MercadoPago does not answer, the customer sees We could not confirm your payment with MercadoPago. Please wait a minute before trying again — if the payment went through, your order will be updated automatically. The next attempt first looks the payment up, so the card is not charged twice. A second click while the cart is being paid shows This order is already being paid. Please wait a moment and check your e-mail before trying again. OpenCart 3 creates a new order every time the Confirm Order step is shown, OpenCart 4 keeps one order for the checkout, and after a declined card the customer pays the same order. Either way a cart with a paid or awaiting order is never charged again; the customer is sent to the success page.

OpenCart 4 keeps the order in the checkout until the success page is shown. If that order was closed without a payment meanwhile (for example you cancelled it), it is not charged, and the customer sees Your previous order was cancelled without a payment. Please reload the checkout page and confirm the order again — the payment will be made with a new order. If that order is already placed and the cart has changed since, the message is Your previous order has already been placed. Your cart has changed since — please reload the checkout page and confirm the order again to pay for the current cart with a new order. A change of the cart, including a new quantity, counts as a new cart that needs its own payment.

The notification URL also works while the store is in maintenance mode, because OpenCart 3 lets payment extension requests through and on OpenCart 4 the extension adds a startup action for it.

The extension takes credit and debit cards only. It has no Checkout Pro redirect, MercadoPago wallet or account money, no cash (Rapipago, OXXO, boleto and others), Pix, PSE or Yape, no saved cards or subscriptions, no separate authorize and capture, no 3-D Secure challenge and no currency conversion.

Orders and refunds

Order statuses

No status (missing order): the card was declined, or MercadoPago has not answered yet. In Sales > Orders such orders are shown only with the filter Order Status set to Missing Orders.

Order Status After Payment (default Processing): MercadoPago approved the payment and the amount and currency match the order. A note shows the payment ID, the environment and the number of installments.

Awaiting MercadoPago Status (default Pending): the payment is under review (in process or pending) and waits for the MercadoPago notification. The order moves to Order Status After Payment when MercadoPago approves it.

On Hold (Review) Status (default Pending): the approved amount or currency differs from the order, or MercadoPago returned an unexpected status. The note explains it. Check the order and fulfil it or refund the payment.

Payment Failed Status (default Failed): a payment under review was rejected or cancelled. The note shows the status and its detail.

Refunded Status (default Refunded): the payment was fully refunded through the extension.

If MercadoPago approves a payment for an order that is already cancelled or refunded, the status is not changed and a note asks you to complete the order or refund the payment. If another payment arrives for an order or a cart that is already paid, a note asks you to refund the extra payment in the MercadoPago panel.

Notes are entries in the order History that the customer does not see.

VibeFox MercadoPago Gateway tab

In Sales > Orders open an order paid with MercadoPago. At the bottom of the order page, next to History and Additional, the VibeFox MercadoPago Gateway tab shows the Payment ID, the payment Status, the Environment (a Test label for test payments), the Installments, the amounts Charged / order, the amount Refunded, the refund form, the refund history and the MercadoPago notes of the order. The tab is shown to users who have access to the extension.

Refunds

In the VibeFox MercadoPago Gateway tab enter the Amount (the amount not refunded yet is filled in), optionally a Reason (optional), and click Refund via MercadoPago. Confirm the question Refund this amount through MercadoPago? This cannot be undone. Full and partial refunds are supported. You need the right to modify the extension (set in System > Users > User Groups). Refunds are limited to the amount MercadoPago charged, so after an amount mismatch you can refund up to what the customer actually paid, not the order total. The refund is sent with the credentials of the environment the payment was made in (test or production), so that environment's access token must be set. If MercadoPago refuses the refund, the tab shows MercadoPago refused the refund with the reason and no refund is recorded. An approved or in-process refund is added to the refund history and the notes with the refund ID. A full refund sets the order to Refunded Status without notifying the customer and without returning products to stock, like a manual status change. A partial refund does not change the status.

Product returns in Sales > Returns do not send money back through MercadoPago.

Refunds, chargebacks and mediations made in the MercadoPago panel arrive by the notification and are added to the notes. The order status is not changed automatically. Update it manually if needed.

License key

The extension works with a VibeFox license key from vibefox.net. The license block License — VibeFox MercadoPago Gateway is the first block on Extensions > Extensions > Payments > VibeFox MercadoPago Gateway > Edit, above the settings. Paste the key into License key and click Activate. After that the block shows the key masked, the status (for example the date the license is active until and your domain) and the buttons Check now to check the status again, Change key to enter another key and Remove key to remove the key from this store. Below them are the line Product: opencart-payment-mercadopago and the link Manage licenses and domains in your account, which opens your vibefox.net account. Only admin users with the Modify permission for the extension can change the key. The texts of the block follow the admin language (English and Russian are included).

If the key is not accepted, the block says why, for example Key not found, This key belongs to another product, Domain limit reached or License expired on a date. After the store address changes, or after you free a domain slot in your account, click Check now. If the license server cannot be reached, the extension keeps working on the last known status.

One key works on one domain: the store address from the OpenCart configuration. Removing the key from the store does not free its domain slot. Free the slot in your vibefox.net account.

Without an active key, MercadoPago is not shown to customers at checkout. If a payment is started anyway, the customer sees This payment method is not available. Please choose another one. An admin user who is logged in to the admin in the same browser still sees the payment method in the store, marked (unlicensed — visible to admins only), so you can set up and test the extension before you buy a key. On OpenCart 4 this preview is not available: the store does not see the admin login, so without an active key the payment method is hidden for everybody. After you have opened the Edit page once, a reminder appears on the admin Dashboard. Close it with × to hide it for 7 days. Existing orders are not affected: payments already started are still confirmed, and refunds work.

When a license expires, the extension keeps working, but updates and support need a renewal. The status is checked again automatically when you open the admin Dashboard or the Edit page: once a day for the first 14 days after the key is entered, then once a week. No cron job is needed. Uninstalling the extension always removes the license key and license status.

Troubleshooting

MercadoPago does not appear at checkout: check that the license is active, Enable / Disable is on and the current mode has both credentials with the right prefix: the TEST- keys in test mode, the APP_USR- keys in production. Check that the customer pays in the currency of your MercadoPago account (the currency must be enabled in the store), that the payment address is in the selected Geo Zone and that the order reaches the Total set in the settings. The settings page tells you which one is missing.

The payment went through, but the order stays in Awaiting MercadoPago Status: the notification did not arrive. The extension sends the notification URL only when your store has a public address (not localhost or a .local or .test domain). Add the URL from Notification URL in your application > Webhooks with the event Payments. If Webhook secret signature is set, check that it is the secret of the same application. The MercadoPago panel shows the answer of your store for each notification.

Notification answers invalid signature: the secret signature belongs to another application, or the notification has no valid x-signature. Copy the secret again or leave the field empty.

Notification answers no credentials for test or no credentials for live: the access token of the environment the payment was made in is not set. Enter it; MercadoPago retries the notification.

Notification answers not for this store: the payment does not belong to a payment attempt of this store. No order is changed.

Notification answers order busy or payment could not be read: the order was being updated by another request at the same moment, or MercadoPago could not be reached. MercadoPago retries the notification automatically.

A credential is not saved: the error must start with shows that the value has the wrong prefix for the field. Test fields take TEST- credentials, production fields APP_USR- credentials.

The customer sees This payment method is not configured correctly. Please choose another payment method or contact the store.: the credentials of the current mode are missing, have the wrong prefix or were rejected by MercadoPago. Check them on the settings page.

The customer sees MercadoPago cannot process payments in: the order currency is not the currency of your MercadoPago account. MercadoPago does not convert currencies.

The secure card form does not load: the customer sees The secure card form could not be loaded. Please reload the page or choose another payment method. Check the Public Key of the current mode.

The customer sees Your session has expired. Please reload the page and try again.: the card form no longer belongs to the customer's checkout session. The customer reloads the checkout page.

The customer sees Your payment was received, but the order could not be completed automatically: MercadoPago took the payment, but OpenCart could not set the order status. Look at the Log field on the extension page: errors are always logged. The customer is asked not to pay again; the next payment attempt or notification for the cart sets the status without a new charge.

Order is in the review status after payment: read the MercadoPago notes in the order tab (see Order statuses), then fulfil the order or refund the payment.

Refund fails with a message about the mode: the payment was made in test or production mode, and the access token of that mode is not set. Enter it and try again.

Refund fails with MercadoPago did not answer the refund request: check the payment in the MercadoPago panel before trying again.

Uninstall

Go to Extensions > Extensions, choose the type Payments and click Uninstall (the red − button) next to VibeFox MercadoPago Gateway. The license key and license status of this extension are always removed. OpenCart always removes its own settings of the extension: Enable / Disable, Sort Order, Geo Zone, Total and the order statuses of the Orders section, which return to their defaults on a re-install. The OpenCart event of the extension is removed too (on OpenCart 4 also its startup action, which lets the notifications through in maintenance mode). If Delete data on uninstall is on, the other gateway settings (title, description, account country, test mode, credentials, installments, webhook secret, logging), the saved account check and the log are removed. If it is off, they are kept for a later re-install. The MercadoPago payment records and refunds are always kept, so orders paid before can still be refunded after a re-install. Existing orders keep their payment notes.

On OpenCart 4, to remove the files of the extension as well, go to Extensions > Installer after the uninstall and click Uninstall (the orange − button) next to VibeFox MercadoPago Gateway in the list of installed extensions, then Delete (the red bin button) to remove the uploaded package.

MercadoPago is a trademark of its respective owner. This extension is not affiliated with or endorsed by MercadoPago.