VibeFox Barion for PrestaShop — Help
Requirements
PrestaShop: 8.0 to 9.x.
PHP: 8.0 or later. The module refuses to install on older PHP versions.
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 cart currency must be HUF, EUR, USD or CZK. For other currencies the payment method is hidden at checkout.
Reachable shop: Barion calls your shop after each payment, so the site must be reachable from the internet, without a firewall or basic authentication in front of it.
VibeFox license key: bought on vibefox.net. One key works on one domain.
Installation
1. In the back office go to Modules > Module Manager and click Upload a module. Choose the module ZIP file.
2. When the upload finishes, click Configure, or find VibeFox Barion Gateway in the module list later and click Configure.
3. Paste your VibeFox license key into License key in the license block at the top of the Configure 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.
The callback URL is sent to Barion automatically with every payment. Nothing has to be configured in the Barion portal.
On install the module creates two order statuses, Awaiting Barion payment and Barion payment on hold. PrestaShop offers a new payment module for all currencies, countries and customer groups. You can limit them in Payment > Preferences.
Configuration
All settings are on the module page: Modules > Module Manager > VibeFox Barion Gateway > Configure. Each section has its own Save button, which saves the whole page. Above the fields 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 shop 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.
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.
Description: the text shown under the payment method at checkout. Default: Pay securely with Barion — card, Barion Wallet, Apple Pay or Google Pay.
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. 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. under the payment method.
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.
Clear saved POSKeys: tick a key and click Save to remove it. An empty field keeps the saved value.
Callback URL: the address Barion calls after each payment, for example https://your-shop/module/wcp_barion_gateway/callback with friendly URLs, possibly with a language code such as /en/. It is sent to Barion with every payment, so there is nothing to configure. It only has to be reachable from the internet.
Orders
Order Status After Payment: the order status set after a successful, verified payment.
Payments still processing at Barion wait in Awaiting Barion payment. Amount or currency mismatches always go to Barion payment on hold.
Advanced
Logging: writes Barion requests and callbacks to logs/barion_p_debug.log.php in the module folder. 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 module removes the module settings and the log. Orders, their Barion payment data and the order statuses are always kept. Default: off.
Checkout
At the payment step the customer chooses the payment method (by default Barion) and sees the note You will be redirected to the secure Barion payment page. After confirming, the module starts a Barion payment for the cart total in the cart currency and sends the customer to the Barion payment page. The products, shipping, gift wrapping and tax are listed on the payment, the payment shows as Cart and the cart number, the customer's e-mail is passed as a hint, and the page language follows the language of the cart where Barion supports it. No order exists yet at this point.
After paying, the customer returns to your shop, and Barion also calls the callback URL. Neither request marks anything paid by itself: the module 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 cart. The return link contains the secure key of the cart, and only payments started for that cart are checked.
If the payment succeeded, the order is created and the customer sees the standard order confirmation page with Your payment with Barion has been received. If the payment is still in progress at Barion, the order is created in Awaiting Barion payment and the page shows Your payment is being confirmed by Barion. You will receive an e-mail as soon as it is confirmed. If such a payment is later cancelled, expires or fails at Barion, the page shows Your Barion payment was not completed. Please contact us about this order. If Barion cannot be reached when the customer comes back, a Payment confirmation page shows the same "being confirmed" text and a Check again button; the callback creates the order as soon as Barion confirms the payment.
If the payment was not completed (cancelled, expired or failed), no order is created, the cart is kept and the customer is back at checkout with Payment was not completed. Please try again. The customer can try again. Every attempt is remembered, so a late payment of an earlier attempt still creates the order, and an earlier attempt that expires does not cancel an order of a newer one.
If the payment cannot be started, the customer stays at checkout with a short message: The Barion payment could not be started. Please try again or choose another payment method., Barion does not support payments in the cart currency, or Barion cannot process an order with a zero total. The details go to the log when Logging is on.
The callback works while the shop is in maintenance mode and is not blocked by the country restriction of your shop.
The module 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 order yet: the customer was sent to Barion and has not paid, or Barion has not confirmed the payment yet. Only the cart exists.
Awaiting Barion payment: 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.
Payment accepted or Delivered: Barion confirmed the payment. The status follows Order Status After Payment. The payment is recorded with the Barion transaction ID, and a note shows the amount, the PaymentId and the transaction.
Barion payment on hold: Barion reported a different amount or currency than the order total, for example because the cart was changed after the payment was started. The note shows both amounts. Check the payment in the Barion portal, then fulfil the order or refund the payment in the Barion portal.
Canceled: the latest payment attempt of an awaiting order was cancelled or expired at Barion.
Payment error: the latest payment attempt of an awaiting order failed.
Refunded: the payment was fully refunded through the module.
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 private messages on the order page.
Barion payment block
The order page shows a Barion payment block with the PaymentId, the Barion transaction, the payment status, the amount paid and refunded, a Test mode badge for test payments and the refund history.
Refunds
In the Barion payment block enter the amount (the amount not refunded yet is filled in), optionally a reason, 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 edit orders. 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 block 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. 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 PrestaShop; refund it in the Barion portal. The module does not create credit slips, and the standard PrestaShop refund buttons of the order page do not send money back through Barion.
License key
The module works with a VibeFox license key from vibefox.net. The license block License — VibeFox Barion Gateway is the first block on Modules > Module Manager > VibeFox Barion Gateway > Configure, 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 shop. Below them are the line Product: presta-payment-barion and the link Manage licenses and domains in your account, which opens your vibefox.net account. Only employees with the Configure permission for the module can change the key. The texts of the block follow the back office 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 shop address changes, or after you free a domain slot in your account, click Check now. If the license server cannot be reached, the module keeps working on the last known status.
One key works on one domain: the domain of the main shop, also in a multistore setup. Removing the key from the shop 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. The PrestaShop storefront does not know that you are logged in to the back office, so the payment method is hidden for you too: you can set up the module before you buy a key, but not test it at checkout. A reminder appears in Modules > Module Manager on the Alerts tab. Existing orders are not affected: payments already started are still confirmed, and refunds work.
When a license expires, the module keeps working, but updates and support need a renewal. The status is checked again automatically while you work in the back office: once a day for the first 14 days after the key is entered, then once a week. No cron job is needed. Uninstalling or resetting the module 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 cart currency is HUF, EUR, USD or CZK. In Payment > Preferences check that the module is allowed for the cart currency, the customer's country and the customer's group.
The payment went through, but no order was created: the order is created when Barion calls the callback URL or when the customer returns to your shop. 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 module 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 could not be created (for example, the module is disabled). Barion calls again. Turn on Logging to see the reason.
The callback answers API error: the shop 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 shop. Barion calls for other shops or test systems are ignored.
The customer sees Payment verification failed: the return link does not match the cart, for example it was opened in another browser session or edited. The payment state is still confirmed by the callback.
The customer sees an error when choosing Barion: turn on Logging and look at the Log field on the module page. A wrong POSKey or payee e-mail gives The Barion payment could not be started.
Order is Barion payment on hold: read the mismatch note on the order, 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.
The refund says the Barion POSKey for this order's mode is not configured: the payment was made in test or live mode, and that mode's POSKey is empty. Enter it and try again.
Uninstall
Go to Modules > Module Manager, open the menu next to VibeFox Barion Gateway and choose Uninstall. The license key and license status of this module are always removed. If Delete Data on Uninstall is on, the module settings and the log are removed. If it is off, all settings are kept for a later re-install. The Barion payment data of orders and the order statuses Awaiting Barion payment and Barion payment on hold are always kept, so orders paid before can still be refunded after a re-install. Existing orders keep their payment notes and transaction IDs.
Barion is a trademark of its respective owner. This module is not affiliated with or endorsed by Barion.
