Back

VibeFox DPO 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 with the SimpleXML extension.

DPO Pay account: you need the Company Token and the Service Type ID of your DPO merchant account. DPO issues them when your account is opened; get them from your DPO account manager or from dpogroup.com. DPO can also provide a test account with its own token and service type. There is no separate test server: DPO uses the same API address for test and live accounts, and the account is chosen by the token.

Currency: the order currency must be supported by your DPO account. DPO accepts at most 2 decimal places, so order totals with 3 decimals (for example KWD 12.345) cannot be paid.

Server cron: a cron job that calls the re-check URL of the extension every 15 minutes (see Configuration).

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_dpo_pay-oc3-(version).ocmod.zip and the OpenCart 4 package wcp_dpo_pay.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_dpo_pay-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 DPO Pay 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. Enter the test and/or live Company Token and Service Type (see Configuration).

5. Send the push notification URL shown in the Payment notifications section to DPO support and ask them to set it for your account. Add the cron URL to the cron jobs of your server.

6. Turn on Enable/Disable and click Save. Place a test order in test mode, then turn off Test mode to accept real payments.

OpenCart 4

1. In the admin go to Extensions > Installer, click Upload and choose the file wcp_dpo_pay.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 DPO Pay Gateway, click Install (the green + button), then Edit (the pencil button).

4. Enter the license key and the DPO credentials, set up the push notification URL and the cron and test the payment as in steps 3 to 6 for OpenCart 3. The settings page and its fields are the same in both versions. Only the push notification URL and the cron URL are different (see Payment notifications).

A new install starts with the payment method turned off and test mode on. On install the extension creates its transaction table and the secret token of the cron URL.

Configuration

All settings are on the extension page: Extensions > Extensions > Payments > VibeFox DPO Pay Gateway > Edit. The sections are listed on the left; the Save button under the list saves the whole page. When the payment method is enabled but the Company Token or Service Type of the selected mode is empty, the page warns you that the payment method is hidden at checkout, and saving shows the same warning. While test mode is on, the page shows Test mode is on: payments are created with the test account credentials. Without the right to modify the extension the page shows the settings but cannot save them.

When you save, Title must not be empty (at most 128 characters), Sort Order must be a whole number and Total a number of 0 or more; otherwise nothing is saved.

DPO Pay

Enable/Disable: Enable DPO Pay 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: DPO Pay. Required.

Description: the text shown to the customer at the Confirm Order step, above the confirm button. Default: Pay securely by card or mobile money on the DPO Pay payment page.

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

Geo Zone: offer DPO Pay 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 DPO Pay is offered. Leave it empty to offer DPO Pay for any total.

API credentials

DPO issues a Company Token and a Service Type ID for your merchant account, and separate ones for a test account. Get them from your DPO account manager or dpogroup.com (the section links there).

Test mode: when on, new payments are created with the test Company Token and Service Type. Default: on. Turn it off to accept real payments with the live credentials. While it is on, customers see Test mode: payments are created with the test account. at the Confirm Order step. Status checks and cancellations of existing payments always use the account the payment was created with.

Test Company Token: the Company Token of your DPO test account.

Test Service Type: the numeric Service Type ID of your DPO test account.

Live Company Token: the Company Token of your live DPO merchant account.

Live Service Type: the numeric Service Type ID of your live DPO merchant account.

Saved Company Tokens 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 token, tick Clear the saved Company Token on save under the field and click Save. A Service Type must be a number. Any other value is not saved: the page shows a warning and keeps the previous value, and the other settings are saved.

Payment notifications

Push notification URL: the push notification tells your store at once that a payment has been made, even if the customer closes the browser after paying. The URL is not set in a dashboard: ask DPO support to set this URL for your account. On OpenCart 3 it looks like https://your-store/index.php?route=extension/payment/wcp_dpo_pay/notify, on OpenCart 4 like https://your-store/index.php?route=extension/wcp_dpo_pay/payment/wcp_dpo_pay.notify. It is built from the storefront address of your OpenCart installation. Copy it exactly as the page shows it. It must be reachable from the internet, without a firewall or basic authentication in front of it.

DPO push notifications carry no signature, so their content is never trusted. The extension only uses them to find the payment by its transaction token and then checks the result with DPO itself. A token your store did not create is rejected without any request to DPO.

Scheduled status re-check (cron): call this URL every 15 minutes from a server cron job, for example with curl. Unconfirmed payments are re-checked with DPO 15 minutes after the redirect and again after the payment time limit. The URL contains a secret token, so keep it private. On OpenCart 4 it looks like https://your-store/index.php?route=extension/wcp_dpo_pay/payment/wcp_dpo_pay.cron&token= and the token. Without the push URL and the cron, an order gets its status only when the customer returns 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 DPO has confirmed the payment. Each field below lists your OpenCart order statuses.

Successful payment status: the order status after a verified successful payment. Default: Processing. Choose Complete if every paid order should be completed, or your own review status for manual approval of every order.

DPO payment on hold status: the status for a payment that needs your review: amount or currency mismatch, an authorized-only payment, an overpaid or underpaid transaction, or a payment made after the customer cancelled. A note in the order history explains 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.

Cancelled order status: when you set an unpaid DPO Pay order to this status, its open DPO payment is cancelled at DPO too. Default: Canceled.

Advanced

Logging: writes API calls and notifications to dpo_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 dpo_p_debug.old.log.php. Errors are always logged. Tokens are masked, no customer data is logged. Default: off.

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

Delete data: when on, uninstalling the extension removes the gateway settings and the log. The DPO data stored for orders is always kept. Uninstalling without it never deletes data. Default: off.

Import / Export

Export: Download JSON saves the settings as a JSON file. Company Tokens are not exported.

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

Checkout

At the Payment Method step the customer chooses the payment method (by default DPO Pay). At the Confirm Order step the customer sees your description and the note You will be redirected to the secure DPO Pay payment page. OpenCart creates the order at this step, still without a status. When the customer clicks Confirm Order, the extension creates a DPO transaction for the order total in the order currency, with the order number and your store name as description, and sends the customer to the DPO payment page. The customer's name, e-mail, phone and payment address are passed to pre-fill the page. There the customer pays with any method enabled on your DPO account. The payment link is valid for 5 hours. 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 shipping address is passed instead.

After paying, the customer returns to your store. The order is marked paid only after DPO confirms it: the extension asks DPO for the result of the transaction when the customer returns, when a push notification arrives and at the scheduled re-checks. 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. On OpenCart 4 the browser does not send the store session when DPO 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 payment is not confirmed, the customer is back at checkout with one of these messages (on OpenCart 4 above the checkout page). The cart is kept.

The payment was declined or cancelled. Please try again or choose another payment method.
We have not received a payment confirmation from DPO yet. If you completed the payment, your order will be updated automatically — please do not pay again. Otherwise you can try again.
We could not confirm the payment result with DPO. If your account was charged, please contact us before paying again.

If the customer clicks the button on the DPO page to go back to the store, the transaction is checked first. If it was paid, the customer sees the success page. Otherwise it is cancelled at DPO and the customer is back at checkout with the cart.

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, and a new attempt is a new DPO transaction of the same order. Before a new payment, the open DPO transactions of the order and of the earlier orders of the same cart are checked. If one was paid, that payment is confirmed and the customer goes to the success page without a second charge. If one is still being processed, the customer sees Your previous payment for this order is still being processed by DPO. Please wait a few minutes before trying again. Otherwise the old transactions are cancelled at DPO and a new one is created.

OpenCart 4 keeps the order in the checkout until the success page is shown. If that order was closed meanwhile (for example cancelled or refunded), Confirm Order or the return from DPO sends the customer back to the checkout: with The payment was declined or cancelled. Please try again or choose another payment method. when the order had no payment, or with Your previous order was closed by the store. Please confirm the order again: the cart will be paid with a new order. when it had one. If the order is already paid and the cart has changed since (other products or quantities), the message is Your previous order is already paid. Please confirm the order again: the cart will be paid with a new order. In all these cases the next Confirm Order pays a new order of the cart.

If DPO cannot start the payment, the customer stays at the Confirm Order step with a short message above the button, chosen by the DPO error code, for example DPO Pay does not support the currency of this order. Please choose another payment method. or The amount exceeds the limit allowed by DPO Pay. Please choose another payment method or contact us. Other errors show DPO Pay is temporarily unavailable. Please try again or choose another payment method. The technical reason is written to the log.

The push notification and the cron URL 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 them and the customer's return through. Payments already started are confirmed even if you turn the payment method off.

The extension takes one-time payments on the DPO page only. It has no refunds from the store, no saved cards, no subscriptions or recurring payments, no card fields on your site and no capture of authorized-only payments.

Orders

Order statuses

No status (missing order): the customer was sent to DPO and has not paid, the payment was declined or cancelled, or DPO has not confirmed the payment yet. In Sales > Orders such orders are shown only with the filter Order Status set to Missing Orders.

Successful payment status (default Processing): the payment was verified. A note in the order history shows the amount, the currency, the approval code and the beginning of the DPO transaction token.

DPO payment on hold status (default Pending): DPO confirmed a payment, but the amount or currency differs from the order, the payment is only authorized and not captured, the transaction was overpaid or underpaid, or the customer had cancelled the payment or the order had already been cancelled. The note explains the reason. Check the transaction in the DPO portal. Capture or void an authorized-only payment in the DPO portal, then update the order status.

Cancelled order status (default Canceled): when you set an unpaid order of the extension to this status (for example one on hold for an authorized-only payment), its open DPO transaction is cancelled at DPO too.

A later declined result never changes an order, and results of older transactions never fail the current attempt. If DPO confirms a second successful payment for an order that is already paid, the order is not changed and gets a note about a possible double payment, so you can refund it in the DPO portal. 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. An order you have moved to another status (for example refunded) is never reopened; a late payment only adds a note.

Notes are entries in the order History that the customer does not see. The extension has no tab on the order page.

Refunds

Refunds from the store are not available in this version. Refund the payment in the DPO merchant portal, then change the order status in OpenCart.

License key

The extension works with a VibeFox license key from vibefox.net. The license block License — VibeFox DPO Pay Gateway is the first block on Extensions > Extensions > Payments > VibeFox DPO Pay 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-dpo 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, DPO Pay 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

DPO Pay does not appear at checkout: check that the license is active, Enable/Disable is on and the Company Token and Service Type of the selected mode are set: the test fields in test mode, the live fields otherwise. 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: the push notification URL is probably not set for your DPO account, and the customer did not return to the store. Ask DPO support to set the URL shown in the settings, and check that the cron calls the re-check URL every 15 minutes. Turn on Logging and look at the Log field on the extension page.

Push notification answers Unknown transaction: the transaction token does not belong to a DPO Pay payment of this store, for example the push came from another store on the same DPO account.

Push notification answers Verification failed: DPO could not be reached to check the payment, the order was being processed by another request at the same moment, or the order status could not be set. DPO repeats the notification, and the scheduled re-check also confirms the order. The reason is in the log.

The push URL shows Method not allowed in the browser: this is normal. The URL accepts only requests from DPO.

The cron URL answers Forbidden: the token in the URL is wrong. Copy the URL again from the settings page. A working call answers OK checked= and the number of payments checked.

The Service Type is not saved: it must be the numeric Service Type ID from DPO.

The customer sees This payment method is not available. Please reload the checkout page.: the checkout session no longer matches the order, or the payment method was turned off meanwhile. The customer reloads the checkout.

The customer sees DPO Pay is temporarily unavailable: DPO refused to create the transaction, for example because of a wrong Company Token or Service Type, or a token of the other mode. The DPO result code is in the log.

The customer sees that DPO accepts at most 2 decimal places: the order total has 3 decimals. DPO cannot charge such amounts.

The customer sees This order has already been paid with DPO Pay: DPO refused a second payment for the same order. Check the payment in the DPO portal and the order in OpenCart.

Order is in the review status after payment: read the note in the order History (see Order statuses), then review the transaction in the DPO portal.

For developers: the extension triggers the OpenCart events wcp_dpo_pay_customer_data (the customer data sent to DPO) and wcp_dpo_pay_payment_time_limit (the payment time limit in hours).

Uninstall

Go to Extensions > Extensions, choose the type Payments and click Uninstall (the red − button) next to VibeFox DPO Pay 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 its events and its startup action, which lets DPO and the cron through in maintenance mode). If Delete data is on, the other gateway settings (title, description, test mode, Company Tokens, Service Types, logging) and the log are removed, and a re-install creates a new cron URL. If it is off, they are kept for a later re-install. The DPO data stored for orders is always kept, so late notifications and re-checks of old payments 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 DPO Pay Gateway in the list of installed extensions, then Delete (the red bin button) to remove the uploaded package.

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