VibeFox ePayco 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.
Currency: Colombian peso (COP) or US dollar (USD). When the customer pays in another currency, the payment method is hidden at checkout.
ePayco account: you need the four keys of your ePayco account: P_CUST_ID_CLIENTE, P_KEY, PUBLIC_KEY and PRIVATE_KEY. They are in the ePayco dashboard under Integrations, API keys. The same keys work in test and live mode. The payment methods the customer can use (cards, PSE, cash networks, wallets) are the ones enabled on your ePayco account.
Public website: the confirmation URL of your store must be reachable from the internet, not blocked by a firewall or basic authentication.
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_epayco_payment-oc3-(version).ocmod.zip and the OpenCart 4 package wcp_epayco_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_epayco_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 ePayco 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 four ePayco keys and choose the checkout type (see Configuration).
5. Turn on Enable/Disable and click Save. Test a payment with Test Mode on and ePayco test cards, then turn off Test Mode.
OpenCart 4
1. In the admin go to Extensions > Installer, click Upload and choose the file wcp_epayco_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 ePayco Payment, click Install (the green + button), then Edit (the pencil button).
4. Enter the license key, the ePayco keys and the settings as in steps 3 to 5 for OpenCart 3. The settings page and its fields are the same in both versions. Only the confirmation URL is different (see Confirmation URL).
A new install starts with the payment method turned off and test mode off. The confirmation URL is sent to ePayco with every payment, so nothing has to be set up in the ePayco dashboard.
Configuration
All settings are on the extension page: Extensions > Extensions > Payments > VibeFox ePayco Payment > Edit. The sections are listed on the left; the Save button under the list saves the whole page. Above the settings the page explains that the order gets a status only after ePayco confirms the transaction. It warns you when not all four keys are entered (the payment method is then hidden at checkout) and when the default currency of your store is not COP or USD, and shows Test mode is on: customers pay with ePayco test cards and no real money is charged. while test mode is on. Without the right to modify the extension the page shows the settings but cannot save them.
When you save, Title must be at most 128 characters, Sort Order must be a whole number, Total a number not below zero, and the geo zone and order statuses must exist. Otherwise an error names the field and nothing is saved.
ePayco
Enable/Disable: Enable ePayco Payment 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. Up to 128 characters; if left empty, customers see ePayco. Default: ePayco.
Description: the text shown to the customer at the Confirm Order step, above the confirm button. Default: Pay securely with ePayco.
Sort Order: the position of ePayco among the payment methods at checkout. Leave it empty or enter a whole number.
Geo Zone: offer ePayco 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 ePayco is offered. Leave it empty to offer ePayco for any total.
ePayco account keys
Find the four keys in the ePayco dashboard under Integrations, API keys (the section links to the dashboard). P_CUST_ID_CLIENTE and P_KEY verify payment confirmations; PUBLIC_KEY and PRIVATE_KEY create checkout sessions. The same keys work in test and live mode.
Customer ID (P_CUST_ID_CLIENTE): your ePayco customer ID (numeric).
Secret Key (P_KEY): used to verify the signature of ePayco payment confirmations. Keep it secret.
Public Key (PUBLIC_KEY): your ePayco public API key.
Private Key (PRIVATE_KEY): your ePayco private API key. Keep it secret.
The saved Secret Key (P_KEY) and Private Key (PRIVATE_KEY) 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 saved secret on save under the field and click Save.
Test Mode: checkout sessions are created as test transactions. Customers pay with ePayco test cards, and no real money is charged. Test transactions never pay orders created in live mode. Default: off. While it is on, customers see TEST MODE — use ePayco test cards, no real money is charged. at the Confirm Order step and on the payment page.
Checkout
Checkout Type: how the ePayco checkout opens.
Confirmation URL
The confirmation URL tells your store the result of a payment. It is sent to ePayco automatically with every payment, so there is nothing to configure in the ePayco dashboard. The section shows the URL. On OpenCart 3 it looks like https://your-store/index.php?route=extension/payment/wcp_epayco_payment/confirmation, on OpenCart 4 like https://your-store/index.php?route=extension/wcp_epayco_payment/payment/wcp_epayco_payment.confirmation. It is built from the storefront address of your OpenCart installation. It must be reachable from the internet, not blocked by a firewall or basic authentication. It also works while the store is in maintenance mode, because OpenCart 3 lets payment extension requests through and the extension adds a startup action for it on OpenCart 4.
Each confirmation must carry a valid signature made with your P_CUST_ID_CLIENTE and P_KEY. Confirmations without a valid signature are rejected and do not change anything. Without the confirmation, an order gets its status only when the customer comes back to the store after paying.
Orders
OpenCart creates the order at the Confirm Order step without a status (a missing order). The order gets a status only after ePayco has confirmed the transaction. A declined or abandoned payment leaves it without a status, and the cart is kept. Each field below lists your OpenCart order statuses.
Order Status After Payment: ePayco approved the payment, and the amount and currency match the order. Default: Processing.
Awaiting Payment Status: ePayco reported the payment as pending or held (PSE transfer, cash networks). The order changes automatically when ePayco approves or rejects it. Default: Pending.
On Hold (Review) Status: ePayco approved a payment whose amount or currency differs from the order, or approved it after the order got another status (for example Canceled). A note explains why. Do not ship before checking the transaction in the ePayco dashboard. Default: Pending, because OpenCart has no On hold status. You can create your own status in System > Localisation > Order Statuses and select it here.
Payment Failed Status: a pending payment was rejected, failed, expired or cancelled. A new approved payment still pays the order. Default: Failed.
Reversed Status: ePayco reversed the payment of the order. Default: Refunded.
Advanced
Logging: writes API errors and payment confirmations to epc_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 epc_p_debug.old.log.php. Keys and customer data are not logged. Default: off. Errors are always logged, even while it is 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 extension settings and the log. The ePayco data saved for orders always stays. Default: off.
Import / Export
Export: Download JSON saves the settings as a JSON file. Secret keys are not exported.
Import: paste previously exported JSON and click Import to restore the settings. Saved secret keys are kept.
Checkout
At the Payment Method step the customer chooses the payment method (by default ePayco). At the Confirm Order step the customer sees your description and the note After confirming the order you pay securely in the ePayco checkout (cards, PSE, cash, wallets). OpenCart creates the order at this step, still without a status. 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. When the customer clicks Confirm Order, the extension creates an ePayco checkout session for the order total in the order currency, with the taxes, the order number and the billing name, address, e-mail and phone. The payment shows at ePayco as Order # and the order number. The checkout language is Spanish or English, following the customer's store language.
The customer then sees the ePayco payment page with Thank you for your order. The secure ePayco checkout opens automatically; if it does not, click the button below. The ePayco checkout opens as a popup or as a redirect, depending on Checkout Type. The page also has the button Pay with ePayco and the link Choose another payment method. Each new Confirm Order creates a new ePayco session (OpenCart 3 creates a new order every time the Confirm Order step is shown, OpenCart 4 updates the order of the checkout, so a new attempt pays the same order). If an earlier order of the same cart is already paid or awaiting ePayco, the customer is taken to the order success page instead and is not charged again.
In the ePayco checkout the customer pays with one of the methods enabled on your ePayco account. Afterwards ePayco sends the confirmation to your store and returns the customer. The order is marked paid only after ePayco confirms it: by the signed confirmation, or by a server-side request to ePayco when the customer comes back. The customer's return alone never pays an order. 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.
For a pending payment (for example PSE or cash) the order gets Awaiting Payment Status and the success page shows Your ePayco payment is being confirmed. We will e-mail you as soon as it is approved. If the pending payment has already been rejected or has expired when the customer comes back, the page shows Your ePayco payment was not completed. Please contact us about this order. If ePayco has not confirmed the payment yet when the customer comes back, a Payment confirmation page shows We are waiting for ePayco to confirm your payment. This page does not need to stay open. and a Check again button.
If the payment was declined, the customer is back at checkout with Your ePayco payment was declined or could not be completed. You can try again or choose another payment method. If the customer comes back without paying, the message is The ePayco payment was not completed. If you already paid, the order will be updated as soon as ePayco confirms it; otherwise you can try again. The cart is kept, and the order stays without a status. On OpenCart 4 these messages are shown above the checkout page.
OpenCart 4 keeps the order in the checkout until the success page is shown. If that order was closed without an ePayco payment meanwhile (for example its pending payment failed or you cancelled it), the customer is sent back to the checkout with the message about the declined payment, and the next Confirm Order pays a new order of the cart. If that order already has a status but the cart has changed since, including a new quantity, the customer is sent back to the checkout, and the next Confirm Order pays the new cart with a new order. A paid order is never shown as paid for a different cart.
If ePayco cannot start the payment, the customer stays at the Confirm Order step with a short message above the button, for example We could not connect to ePayco. Please try again in a moment or choose another payment method. The technical reason is written to the log.
The extension takes one-time payments only. It has no refunds from the store, no saved cards, subscriptions or split payments, and does not poll ePayco for pending transactions: orders are updated by the ePayco confirmation and by the customer return.
Orders
Order statuses
No status (missing order): the customer was sent to ePayco and has not paid, ePayco has not confirmed the payment yet, or the payment was declined. In Sales > Orders such orders are shown only with the filter Order Status set to Missing Orders.
Order Status After Payment (default Processing): ePayco approved the payment. A note shows the ePayco reference, the state, the amount, the payment method and the approval code.
Awaiting Payment Status (default Pending): ePayco reported the payment as pending or held, for example a PSE transfer or a cash payment. When ePayco approves it, the order moves to Order Status After Payment; when it is rejected, fails, expires or is cancelled, the order moves to Payment Failed Status. OpenCart e-mails the customer about these changes.
On Hold (Review) Status (default Pending): ePayco approved a payment whose amount or currency differs from the order, or approved a payment after you gave the order another status (for example Canceled). The note explains it. Check the transaction in the ePayco dashboard before shipping.
Payment Failed Status (default Failed): a pending payment did not go through. The note shows the ePayco reason. A new approved payment still pays the order. A late failure never changes a paid order.
Reversed Status (default Refunded): ePayco reversed the payment that paid this order.
If ePayco reports another approved payment for an order that is already paid, the status is not changed. A note asks you to check for a double charge and refund it in ePayco if needed. If the customer pays a second order of the same cart (for example, from two open ePayco windows), that order gets no status, the customer sees the order success page, and the paid order gets a note asking you to refund the second payment in ePayco. A test transaction for an order placed in live mode, and a transaction that already belongs to another order, are ignored. Notes are entries in the order History that the customer does not see.
VibeFox ePayco Payment tab
In Sales > Orders open an order paid with ePayco. At the bottom of the order page, next to History and Additional, the VibeFox ePayco Payment tab shows the ePayco reference (ref_payco), the Transaction ID, the State, the Payment method, the Approval code, the Transaction date, the Mode (with a Test mode label for test payments), the Attempt status and the ePayco notes of the order. For an order on review the tab shows a warning to check the transaction before shipping. The tab is read only and is shown to users who have access to the extension.
Refunds
Refunds from the store are not supported. Refund the payment in the ePayco dashboard, then update the order in OpenCart manually if needed. A reversal of the paying transaction that ePayco reports sets the order to Reversed Status. Product returns in Sales > Returns do not send money back through ePayco.
License key
The extension works with a VibeFox license key from vibefox.net. The license block License — VibeFox ePayco Payment is the first block on Extensions > Extensions > Payments > VibeFox ePayco 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-epayco 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, ePayco 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.
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
ePayco does not appear at checkout: check that the license is active, Enable/Disable is on, all four keys are entered and the customer pays in COP or USD. The settings page shows a warning when keys 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: the ePayco confirmation does not reach your store. Check that the confirmation URL shown in the settings opens from the internet and is not blocked by a firewall, a security extension or basic authentication. Look at the Log field on the extension page; turn on Logging to see every confirmation. The order also gets its status when the customer returns to the store after paying.
Confirmation answers Invalid signature: Customer ID (P_CUST_ID_CLIENTE) or Secret Key (P_KEY) does not match the ePayco account that took the payment. Copy both again from the ePayco dashboard.
Confirmation answers Gateway not configured: P_CUST_ID_CLIENTE or P_KEY is empty. Enter them in the settings.
Confirmation answers Order not found: the confirmation refers to an order without an ePayco payment of this store.
Confirmation answers Busy, retry later: the order was being updated by another request at the same moment. ePayco retries the confirmation. The reason is in the log.
The customer sees We could not connect to ePayco: ePayco refused the PUBLIC_KEY and PRIVATE_KEY. The log shows the ePayco answer. Copy both keys again.
The customer sees ePayco could not start the payment: ePayco did not create the checkout session. Read the log for the ePayco error.
The customer sees This payment method is not available right now: the checkout session no longer matches the order, the payment method was turned off meanwhile or the keys were removed. The customer reloads the checkout.
The ePayco checkout does not open: the customer sees The ePayco checkout could not be loaded. Please reload the page or choose another payment method. The ePayco checkout script could not be loaded on the payment page. The customer can reload the page or use Choose another payment method.
A test payment did not pay the order: test transactions never pay orders placed in live mode. Place the test order while Test Mode is on.
Order is in the review status after payment: read the notes in the VibeFox ePayco Payment tab (see Order statuses) and check the transaction in the ePayco dashboard before shipping.
Uninstall
Go to Extensions > Extensions, choose the type Payments and click Uninstall (the red − button) next to VibeFox ePayco 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 the confirmation and the customer's return through in maintenance mode). If Delete Data on Uninstall is on, the other settings (title, description, keys, test mode, checkout type, logging) and the log are removed. If it is off, they are kept for a later re-install. The ePayco data saved for orders is always kept, so late confirmations of old orders still work 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 ePayco Payment in the list of installed extensions, then Delete (the red bin button) to remove the uploaded package.
ePayco is a trademark of its respective owner. This extension is not affiliated with or endorsed by ePayco.
