Back

VibeFox Barion 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.

Barion shop: you need the POSKey (secret key) of your shop and the e-mail address of the Barion wallet that receives the payments. Both are in the Barion portal: secure.barion.com for live, secure.test.barion.com for test, under My stores and your shop. Test and live have different credentials.

Currency: the order currency must be HUF, EUR, USD or CZK. For other currencies the payment method is hidden at checkout.

Reachable store: Barion calls your store after each payment, so the site must be reachable from the internet, without a firewall or basic authentication in front of it. Maintenance mode does not block the callback: OpenCart 3 lets payment extension requests through, and on OpenCart 4 the extension adds a startup action for it.

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_barion_gateway-oc3-(version).ocmod.zip and the OpenCart 4 package wcp_barion_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_barion_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 Barion 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 POSKey and test wallet e-mail, keep Test Mode on, turn on Enable/Disable and click Save. Place a test order.

5. When everything works, enter the live credentials and turn off Test Mode.

OpenCart 4

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

4. Enter the license key and the Barion 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 callback URL is different (see Callback URL).

The callback URL is sent to Barion automatically with every payment. Nothing has to be configured in the Barion portal. 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 Barion Gateway > Edit. The sections are listed on the left; the Save button under the list saves the whole page. Above the settings the page warns you when the current mode has no POSKey or no payee e-mail (the payment method is then hidden at checkout) and when the default currency of your store is not supported by Barion, with the list of supported currencies. While test mode is on, it shows Test mode is on: payments go to the Barion sandbox (api.test.barion.com), no real money is charged. Without the right to modify the extension the page shows the settings but cannot save them.

When you save, Title must have 1 to 128 characters, Sort Order must be a whole number and Total a number of 0 or more. If any field has an error, nothing is saved and the page names the field.

Barion

Enable/Disable: Enable Barion 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. Default: Barion. Required, up to 128 characters.

Description: the text shown to the customer at the Confirm Order step, above the confirm button. Default: Pay securely with Barion — card, Barion Wallet, Apple Pay or Google Pay.

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

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

Barion shop credentials

Get your POSKey and wallet e-mail in the Barion portal: secure.barion.com (live) or secure.test.barion.com (test), My stores, your shop (the portals are linked in this section). Test mode uses only the test credentials, live mode only the live ones.

Test Mode: uses the test credentials below and the Barion sandbox (api.test.barion.com). No real money is charged. Default: on. Turn it off to take real payments. While it is on, customers see Test mode: no real payment is taken. at the Confirm Order step.

Test POSKey: the secret key (POSKey) of your shop in the Barion test system (secure.test.barion.com, My stores).

Test Payee Email: the e-mail address of your Barion test wallet that receives the test payments.

Live POSKey: the secret key (POSKey) of your shop in the Barion live system (secure.barion.com, My stores).

Live Payee Email: the e-mail address of your Barion wallet that receives the payments.

Saved POSKeys 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 POSKey, tick Clear the saved POSKey on save under the field and click Save.

Callback URL: the address Barion calls after each payment. On OpenCart 3 it looks like https://your-store/index.php?route=extension/payment/wcp_barion_gateway/callback, on OpenCart 4 like https://your-store/index.php?route=extension/wcp_barion_gateway/payment/wcp_barion_gateway.callback. It is built from the storefront address of your OpenCart installation. It is sent to Barion with every payment, so there is nothing to configure. It only has to be reachable from the internet.

Orders

OpenCart creates the order at the Confirm Order step without a status (a missing order). It gets a status only after Barion has reported the payment (by the callback or the customer's return; the state is always read from Barion). Each field below lists your OpenCart order statuses.

Order Status After Payment: the status set after a successful, verified payment. Default: Processing.

Awaiting Barion Payment Status: the customer finished on the Barion page, but Barion still processes the payment. Default: Pending.

Barion Payment On Hold Status: the payment went through, but the amount or currency differs from the order. A note explains why; check the payment manually. 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: an order awaiting payment whose Barion payment failed. Default: Failed.

Payment Canceled Status: an order awaiting payment whose Barion payment was cancelled or expired. Default: Canceled.

Refunded Status: set after the payment is fully refunded from the order page. Default: Refunded.

Advanced

Logging: writes Barion requests and callbacks to barion_p_debug.log.php in the OpenCart logs folder (storage/logs). The file cannot be opened from the web. Secret keys and wallet e-mails are not logged. Default: off. Nothing is written while it is off, errors included.

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. Orders and their Barion payment data are always kept. Default: off.

Import / Export

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

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

Checkout

At the Payment Method step the customer chooses the payment method (by default Barion). At the Confirm Order step the customer sees your description and the note You will be redirected to the secure Barion payment page. OpenCart creates the order at this step, still without a status. When the customer clicks Confirm Order, the extension starts a Barion payment for the order total in the order currency and sends the customer to the Barion payment page. The products, shipping, other order fees and tax are listed on the payment, the OpenCart order number is passed as the order number, the customer's e-mail is passed as a hint, and the page language follows the customer's language where Barion supports it (Hungarian, German, French, Spanish, Czech, Slovak, Slovenian, Greek, otherwise English). 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.

After paying, the customer returns to your store, and Barion also calls the callback URL. Neither request marks anything paid by itself: the extension asks Barion for the payment state with the POSKey of the mode the payment was started in. The order is marked paid only after Barion confirms it, and only if the amount and currency match the order. The return link contains a random token of the payment attempt, and only payments started for that order are checked. The order then gets its status the standard OpenCart way, with the usual order e-mails and stock update. On OpenCart 4 the browser does not send the store session when Barion 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 succeeded, the customer sees the OpenCart order success page. If the payment is still in progress at Barion, the order gets the Awaiting Barion Payment Status and the success page shows Your payment is being confirmed by Barion. You will receive an e-mail as soon as it is confirmed. If Barion cannot be reached when the customer comes back, or the payment is made but not applied yet, a Payment confirmation page shows the same text and a Check again button; the callback sets the order status as soon as Barion confirms the payment.

If the payment was not completed (cancelled, expired or failed), the order stays without a status, the cart is kept and the customer is back at checkout with Payment was not completed. Please try again. If the return link does not match the order, the message is Payment verification failed. On OpenCart 4 these messages are shown above the checkout page. Each new attempt creates a new OpenCart order on OpenCart 3. OpenCart 4 keeps one order for the checkout and updates it, so the new attempt is a new Barion payment of the same order. Barion cannot cancel a started payment, so before a new payment the extension checks the earlier open payments of the cart at Barion: if one of them is paid or still processing, its order is confirmed and the customer goes to the success page without paying again. If another order of the same cart (the same products in the same visit) is already paid, the customer also goes to the success page without a new payment; a new purchase after a completed one is a new cart. A late payment of an earlier attempt of the same order still confirms it, and an earlier attempt that expires does not cancel the order. If the customer still pays two orders of one cart (two tabs), the second payment does not confirm its order: the paid order gets a note that a second payment for the same cart was received, so you can refund it in the Barion portal.

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 its awaiting payment was cancelled at Barion or you cancelled the order), the next Confirm Order sends the customer back to the checkout with Payment was not completed. Please try again., and the checkout then makes a new order of the cart. If the order already has a status and the cart has changed since (other products or quantities), the order leaves the checkout and the changed cart gets a new order and its own payment.

If the payment cannot be started, the customer stays at the Confirm Order step with a short message above the button: The Barion payment could not be started. Please try again or choose another payment method., Barion does not support payments in the order currency, Barion payment is not available at the moment. Please choose another payment method. or Barion cannot process an order with a zero total. The details go to the log when Logging is on.

The extension takes immediate payments only. It has no reservation or delayed capture payments, no subscriptions or recurring payments, no saved cards, no Barion Pixel and no extra 3-D Secure data; Barion handles 3-D Secure on its payment page.

Orders and refunds

Order statuses

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

Awaiting Barion Payment Status (default Pending): Barion reports the payment as still in progress. A note shows the Barion PaymentId, the amount and, in test mode, (test mode). The order moves to the paid status when Barion confirms the payment.

Order Status After Payment (default Processing): Barion confirmed the payment. A note shows the amount, the PaymentId and the Barion transaction.

Barion Payment On Hold Status (default Pending): Barion reported a different amount or currency than the order total. The note shows both amounts. Check the payment in the Barion portal, then fulfil the order or refund the payment in the Barion portal.

Payment Canceled Status (default Canceled): the latest payment attempt of an awaiting order was cancelled or expired at Barion.

Payment Failed Status (default Failed): the latest payment attempt of an awaiting order failed.

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

If a payment of the order still succeeds after the order was cancelled or failed, the order becomes paid. A paid or refunded order is never changed by a later callback. If another payment succeeds for a paid order, a note asks you to check it in the Barion portal and refund it if it is a duplicate. Notes are entries in the order History that the customer does not see.

VibeFox Barion Gateway tab

In Sales > Orders open an order paid with Barion. At the bottom of the order page, next to History and Additional, the VibeFox Barion Gateway tab shows the PaymentId with a Test mode label for test payments, the Barion Transaction, the payment Status, the amounts Paid / refunded, the refund form, the refund history and the Barion notes of the order. The tab is shown to users who have access to the extension.

Refunds

In the VibeFox Barion Gateway tab enter the amount (the amount not refunded yet is filled in), optionally a Reason (optional), and click Refund via Barion. Confirm the question Refund this amount through Barion? This cannot be undone. Full and partial refunds are supported. You need the right to modify the extension (set in System > Users > User Groups). The reason is sent to Barion as a comment. HUF refunds must be whole amounts. The refund is sent in the mode (test or live) the payment was made in, so that mode's POSKey must be set. If Barion does not accept or confirm the refund, the tab shows the error and no refund is recorded. A successful refund is added to the refund history and the notes with the Barion transaction and status. 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 Barion has confirmed the payment and the order is paid by it. A payment with an amount or currency mismatch cannot be refunded from OpenCart; refund it in the Barion portal. Product returns in Sales > Returns do not send money back through Barion.

License key

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

Barion does not appear at checkout: check that the license is active, Enable/Disable is on, the current mode has a POSKey and a payee e-mail (the settings page shows a warning when one is missing) and the order currency is HUF, EUR, USD or CZK. 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 order gets its status when Barion calls the callback URL or when the customer returns to your store. Make sure the site is reachable from the internet (no firewall or basic authentication in front of the callback URL). Check that the POSKey of the mode the payment was made in is correct, because the extension asks Barion for the payment state with it. Turn on Logging to see the callback.

The callback answers Busy, retry: the order was being processed by the customer's return at the same moment, or the order status could not be set. Barion calls again. Turn on Logging to see the reason.

The callback answers API error: the store could not read the payment state from Barion, or the POSKey of the mode the payment was made in is not set. Check that POSKey.

The callback answers Order not found: the PaymentId was not started by this store. Barion calls for other shops or test systems are ignored.

The customer sees Payment verification failed.: the return link does not match the order, for example it was edited. The payment state is still confirmed by the callback.

The customer sees an error after Confirm Order: turn on Logging and look at the Log field on the extension page. A wrong POSKey or payee e-mail gives The Barion payment could not be started. This payment method is not available. Please reload the checkout page. means the checkout session no longer matches the order, or the payment method was turned off meanwhile: the customer reloads the checkout.

Order is in the on-hold status: read the mismatch note in the VibeFox Barion Gateway tab, check the payment in the Barion portal, then fulfil the order or refund it in the Barion portal.

Why can't I refund 10.50 HUF: Barion processes HUF without decimals. Enter a whole amount.

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 POSKey of the payment's mode is not configured.

For developers: the extension triggers the OpenCart events wcp_barion_supported_currencies (the list of currencies) and wcp_barion_payment_request (the payment request and the order, before it is sent to Barion).

Uninstall

Go to Extensions > Extensions, choose the type Payments and click Uninstall (the red − button) next to VibeFox Barion 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 the callback through in maintenance mode). If Delete Data on Uninstall is on, the other gateway settings (title, description, test mode, POSKeys, payee e-mails, logging) and the log are removed. If it is off, they are kept for a later re-install. The Barion payment and refund records 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 Barion Gateway in the list of installed extensions, then Delete (the red bin button) to remove the uploaded package.

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