VibeFox dLocal 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.
dLocal Go account: you need the API key and the API secret of your dLocal Go account, from the Payment integration page of the dLocal Go dashboard: dashboard-sbx.dlocalgo.com for the sandbox, dashboard.dlocalgo.com for production. Sandbox and production use different credentials. The extension works with dLocal Go only, not with the enterprise dLocal Payments API.
Currencies and countries: the extension does not limit them. dLocal Go decides which payment methods it offers for the customer's country and the order currency, according to your dLocal Go account.
Reachable store: dLocal Go sends payment and refund notifications from its own servers, so the notification URLs must be reachable from the internet over HTTPS.
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_dlocal_payment-oc3-(version).ocmod.zip and the OpenCart 4 package wcp_dlocal_payment.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_dlocal_payment-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 dLocal Payment 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. Enter the API key and API secret for the sandbox and, for real payments, for production. Choose the Environment (see Configuration).
5. Turn on Enable/Disable and click Save. Make a test payment in the sandbox, then switch Environment to Production.
OpenCart 4
1. In the admin go to Extensions > Installer, click Upload and choose the file wcp_dlocal_payment.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 dLocal Payment, click Install (the green + button), then Edit (the pencil button).
4. Enter the license key and the dLocal Go credentials and test the payment as in steps 3 to 5 for OpenCart 3. The settings page and its fields are the same in both versions. Only the notification URLs are different (see Notifications (IPN)).
Nothing has to be set up in the dLocal Go dashboard: the notification and return URLs are sent with every payment and refund. A new install starts with the payment method turned off and the sandbox selected.
Configuration
All settings are on the extension page: Extensions > Extensions > Payments > VibeFox dLocal Payment > Edit. The sections are listed on the left; the Save button under the list saves the whole page. Until the API key and secret of the selected environment are entered, the page warns you that the payment method is hidden at checkout, for example Enter the sandbox API key and secret: until then the payment method is hidden at checkout. While the sandbox is selected and the payment method is enabled, it shows Sandbox mode is active: payments are simulated, no money is charged. Without the right to modify the extension the page shows the settings but cannot save them.
When you save, Title must not be empty or longer than 128 characters, Sort Order must be a whole number, Total a number of 0 or more, and the geo zone and order statuses must exist. Otherwise nothing is saved and the page shows the error. If the payment method is enabled without the key and secret of the selected environment, the settings are saved with the warning above.
dLocal Go
Enable/Disable: Enable dLocal Go turns the payment method on or off. Default: off.
Title: the payment method name customers see at checkout. It is also the payment method name stored in the order. Default: dLocal Go. Required.
Description: the text shown to the customer at the Confirm Order step, above the confirm button. Default: Pay with local cards, bank transfer or cash via dLocal Go.
Sort Order: the position of dLocal Go among the payment methods at checkout. Leave it empty or enter a whole number.
Geo Zone: offer dLocal Go 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 dLocal Go is offered. Leave it empty to offer dLocal Go for any total.
API credentials
Copy the API key and API secret from the dLocal Go dashboard, Payment integration: dashboard-sbx.dlocalgo.com (sandbox) or dashboard.dlocalgo.com (production). The section links to both dashboards.
Environment: which credentials and which dLocal Go servers are used for new payments.
Refunds and notifications of a payment always use the credentials of the environment it was made in, so keep the credentials of the other environment while its payments are still open or may be refunded.
Sandbox API Key: your dLocal Go sandbox API key.
Sandbox API Secret: your dLocal Go sandbox API secret.
Production API Key: your dLocal Go production API key.
Production API Secret: your dLocal Go production API secret.
Saved keys and secrets 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 under the field and click Save.
Payment
Default country: dLocal Go shows the payment methods of the customer's country, taken from the payment address, then from the shipping address. This country is used when the order has neither. The list shows the countries of your store. Default: Uruguay.
Auto-complete orders: gives paid orders the Complete Order Status instead of the Paid Order Status. Default: off.
Notifications (IPN): the notifications tell your store that a payment or a refund has changed. The extension sends the notification URLs to dLocal Go with every payment and refund, so nothing has to be configured in the dLocal Go dashboard. This field shows both URLs, built from the storefront address of your OpenCart installation:
Notifications are verified with your API secret (HMAC-SHA256). Notifications without a valid signature are rejected. A notification must be signed with the credentials of the environment the payment was made in. After that, the status, amount and currency of the payment are always read again from the dLocal Go API; the content of the notification is not trusted. Without notifications, an order gets its status only when the customer comes back to the store.
Orders
OpenCart creates the order at the Confirm Order step without a status (a missing order). The order gets a status only after dLocal Go has confirmed the payment. Each field below lists your OpenCart order statuses.
Paid Order Status: the order status after a confirmed payment. Default: Processing.
Complete Order Status: the order status after a confirmed payment when Auto-complete orders is on. Default: Complete.
On Hold (Review) Status: payments whose amount or currency do not match the order, or that arrive after the order was cancelled, get this status and a note explaining why. Default: Pending, because OpenCart has no On hold status. You can create your own status in System > Localisation > Order Statuses and select it here.
Refunded Status: set after the payment is fully refunded from the order page. Default: Refunded.
Advanced
Debug log: writes dLocal Go requests and notifications to dlocal_p_debug.log.php in the OpenCart logs folder (storage/logs). The file cannot be opened from the web, and at 5 MB it is moved to a backup file. API credentials and personal data are not logged. Errors and warnings are always written; the other entries only while this option is on. 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. The order payment data (dLocal payments and refunds) always stays, so existing orders keep working. Default: off.
Import / Export
Export: Download JSON saves the settings as a JSON file. The API credentials are not exported.
Import: paste previously exported JSON and click Import to restore the settings. The saved API credentials are kept.
Checkout
At the Payment Method step the customer chooses the payment method (by default dLocal Go). At the Confirm Order step the customer sees your description and the note You will be redirected to the dLocal Go checkout page. In sandbox mode it also shows Sandbox mode: no real payment is made. OpenCart creates the order at this step, still without a status. When the customer clicks Confirm Order, the extension creates a dLocal Go payment for the order total in the order currency, with the customer's country, name, e-mail and phone, and sends the customer to the dLocal Go payment page. There the customer pays with a method of their country. The payment shows on the dLocal Go page as Order # and the order number. On OpenCart 4 the customer picks the payment method with the Choose button of the payment method block, in the window Payment method options, and clicks Confirm Order at the bottom of the checkout page. If the store does not ask for a payment address (the OpenCart 4 default), the country of the shipping address and the customer's name are used.
After paying, the customer returns to your store. The order is marked paid only after dLocal Go confirms it: by the signed notification or by a server-side request to the dLocal Go API when the customer comes back. The return address carries a random token of the payment attempt. The order then gets its status the standard OpenCart way, with the usual order e-mails and stock update, and the customer sees the OpenCart order success page with Your payment with dLocal Go has been received. If the order was put in the review status, the page shows Your dLocal Go payment has been received and is being reviewed by the store. You will be informed when your order is confirmed. If dLocal Go has not confirmed the payment yet (for example a cash voucher not paid yet, or dLocal Go could not be reached), a Payment confirmation page asks the customer not to pay again and offers Check again and Back to checkout. The order gets its status as soon as dLocal Go confirms the payment. On OpenCart 4 the browser does not send the store session when dLocal Go sends the customer back, so the extension first shows a short page that opens the same return address again from your store: the customer keeps the cart and the login.
If the customer leaves the dLocal Go page without paying, the customer comes back to the checkout and sees The payment at dLocal Go was not completed. You can try again or choose another payment method. If the payment was declined or expired, the message is Your dLocal payment was not completed: it was declined or it expired. Please try again or choose another payment method. On OpenCart 4 these messages are shown above the checkout page. The cart is kept. Each click on Confirm Order creates a new dLocal Go payment. OpenCart 3 creates a new order every time the Confirm Order step is shown; OpenCart 4 keeps one order for the checkout and updates it, so the new payment belongs to the same order. An older payment link can still be paid and confirms its order. Before a new payment starts, the open payments of the same order and of the same customer session (last 24 hours) are read from dLocal Go: if one is paid, its order is confirmed and the customer goes to the success page without a second payment.
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 cancelled or refunded), Confirm Order or the return from dLocal Go sends the customer back to the checkout with Your previous order was cancelled without a payment. Please confirm the order again to pay with a new order., and the next Confirm Order pays a new order of the cart.
If dLocal Go cannot start the payment, the customer stays at the Confirm Order step with a short message, for example dLocal could not start the payment: followed by the reason from dLocal. This also happens when the customer's country and the order currency are not enabled in your dLocal Go account. If dLocal Go rejects your credentials, the customer sees This payment method is temporarily unavailable. Please choose another payment method or contact us. The technical reason is written to the log.
The notifications also work while the store is in maintenance mode: OpenCart 3 lets payment extension requests through, and on OpenCart 4 the extension adds a startup action that lets the notifications and the customer's return through.
The extension takes one-time payments on the dLocal Go page only. It has no card form on your site, no saved cards, no subscriptions and no separate authorize and capture.
Orders and refunds
Order statuses
No status (missing order): the customer was sent to dLocal Go and has not paid, the payment was declined or expired, or it is still pending at dLocal Go. In Sales > Orders such orders are shown only with the filter Order Status set to Missing Orders.
Paid Order Status (default Processing) or Complete Order Status (default Complete): the payment was confirmed. The order gets the Complete Order Status when Auto-complete orders is on. A note shows the environment and the dLocal payment ID.
On Hold (Review) Status (default Pending): dLocal Go reported a different amount or currency than the order total, or the payment arrived after the order had been cancelled. The note explains it. Compare with the dLocal Go dashboard and fulfil the order or refund the payment.
Refunded Status (default Refunded): the payment was fully refunded through the extension.
A declined, expired or cancelled payment never changes an order that already has a status. If a second payment arrives for an order that is already paid, the order is not changed. A note asks you to refund the duplicate payment in the dLocal Go dashboard. The same kind of note is added to the paid order when the same cart (same customer session and cart contents) was paid once more with another order, for example in a second browser tab; that other order keeps no status.
Notes are entries in the order History that the customer does not see.
VibeFox dLocal Payment tab
In Sales > Orders open an order paid with dLocal Go. At the bottom of the order page, next to History and Additional, the VibeFox dLocal Payment tab shows the Payment ID, the Environment (sandbox or production), the payment Status, the amounts Paid / refunded, the refund form, the refund history and the dLocal Go notes of the order. The tab is shown to users who have access to the extension.
Refunds
In the VibeFox dLocal Payment tab enter the Amount (the amount not refunded yet is filled in), optionally a Reason (optional), and click Refund via dLocal Go. Confirm the question Refund this amount through dLocal Go? 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 made in the amount and currency dLocal Go charged, so after an amount or currency mismatch you can refund up to what the customer actually paid, not the order total. The refund is sent to the environment the payment was made in, with that environment's credentials. If dLocal Go does not accept the refund, the tab shows the error and no refund is recorded. An accepted refund is added to the refund history and the notes with the refund ID, status and reason. 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. Refunds are available once dLocal Go has confirmed the payment.
dLocal Go then reports the final refund status by the refund notification, and it is added to the notes. If dLocal Go later rejects or cancels a refund that it had accepted, the note warns that the money was not returned to the customer. Refund the customer again or another way.
Product returns in Sales > Returns do not send money back through dLocal Go. Refunds made in the dLocal Go dashboard are not recorded as refunds in OpenCart. Update the order manually if needed.
License key
The extension works with a VibeFox license key from vibefox.net. The license block License — VibeFox dLocal Payment is the first block on Extensions > Extensions > Payments > VibeFox dLocal Payment > 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-dlocal 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, dLocal Go 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
dLocal Go does not appear at checkout: check that the license is active, Enable/Disable is on and the API key and API secret of the selected Environment are set. The settings page shows a warning when they are missing. Also check that the payment address is in the selected Geo Zone and that the order reaches the Total set in the settings.
The payment went through, but the order stays without a status: dLocal Go could not reach the notification URL (firewall, basic authentication, no public HTTPS address) and the customer did not come back to the store. Turn on Debug log, look at the Log field and check the payment in the dLocal Go dashboard. As soon as a notification arrives or the customer clicks Check again, the order gets its status.
Notification answers Missing signature or Invalid signature: the API key and secret in the settings do not belong to the account that sent the notification. Notifications are checked with the credentials of the environment of the payment, so payments started before you switched Environment are still confirmed, as long as the credentials of their environment stay in the settings.
Notification answers Gateway not configured: the credentials of the payment's environment are missing. Enter them; dLocal Go retries the notification.
Notification answers API verification failed: the dLocal Go API could not be reached to read the payment. dLocal Go retries the notification.
Notification answers Temporarily unavailable: the order was being confirmed by another request at the same moment, or the order status could not be set. dLocal Go retries the notification. The reason is in the log.
Notification answers Order not found: the payment does not belong to an order of this store, for example it was created by another site with the same dLocal Go account.
The customer sees This payment method is temporarily unavailable: dLocal Go rejected the API key or secret. Check the credentials of the selected environment.
The customer sees Payment gateway is not properly configured: the credentials of the selected environment are missing.
Order is in the review status after payment: read the notes in the VibeFox dLocal Payment tab. The paid amount or currency differed from the order, or the payment came after the order was cancelled. Fulfil the order or refund the payment.
No refund form in the tab: the tab says why: the payment is not confirmed yet, it is fully refunded, your user group has no right to modify the extension, or the credentials of the payment environment are missing.
Refund fails with a message about missing credentials: the payment was made in the other environment, and its credentials are not set. Enter them and try again.
For developers: the extension triggers the OpenCart events dlocal_p_payment_data (the payment request and the order, before the payment is created) and dlocal_p_currency_decimals (the decimals of a currency).
Uninstall
Go to Extensions > Extensions, choose the type Payments and click Uninstall (the red − button) next to VibeFox dLocal Payment. 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 its events and its startup action, which lets dLocal Go through in maintenance mode). If Delete data on uninstall is on, the other gateway settings (title, description, environment, credentials, default country, auto-complete, logging) and the log are removed. If it is off, they are kept for a later re-install. The dLocal payments and refunds of orders 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 dLocal Payment in the list of installed extensions, then Delete (the red bin button) to remove the uploaded package.
dLocal is a trademark of its respective owner. This extension is not affiliated with or endorsed by dLocal.
