Skip to main content
Version: 2.0.0

Settings

This page explains every Barion setting and where to find it. Open settings in Craft CP:

Settings → Plugins → Barion (barion/settings).

The settings form is split into three sections on one page: General, Restrictions, Credentials, plus an Enable barion / Enable SandboxMode toggle pair in the details sidebar.

Enable / Sandbox toggles (sidebar)

  • Enable barion: master switch. When off, Barion is not shown at checkout and no settings are required. When on, apiKey, email, name, buttonName, and defaultCurrency all become required fields.
  • Enable SandboxMode: when on, the plugin talks to Barion's Test environment and payments are never realized against a real card. Turning this on also reveals the test cards reference table in the Credentials section. Turn it off only once live credentials are entered and a sandbox test payment has succeeded.

General section

  • Display Name: the label shown for this payment method at checkout (for example "Barion" or "Card payment via Barion"). Required when the plugin is enabled.
  • Select button name: the text on the button/radio option the customer picks at checkout to choose this payment method. Defaults to Select. Required when the plugin is enabled.
  • Instructions: free-text instructions shown to the customer at checkout next to the payment method (for example, a note about card types accepted). Optional.

Restrictions section

Not currently enforced

As of v1.2.1, the fields on this tab are saved with the plugin's settings but are not read by yStore's checkout payment method registry. Setting them has no effect on whether Barion appears at checkout — do not rely on this tab to hide Barion for specific countries or time windows.

  • Visible From / Visible To: date/time window fields. Intended to hide Barion from checkout outside this window, but not currently applied.
  • Available in countries: a multi-select of store countries. Intended to limit Barion to orders shipping to (or billed to) one of the selected countries, but not currently applied.

Credentials section

  • Account email: the Barion Wallet email used as the payee for every transaction (PaymentTransactionModel.Payee). Must be a valid Barion wallet address. Required when the plugin is enabled.
  • API Key: the Barion API key (POSKey) for the selected environment (sandbox or live — the same field is used for both; switch Enable SandboxMode to change which Barion environment it's sent to). Required when the plugin is enabled.
  • Default currency: the three-letter ISO 4217 currency code Barion charges in. Offered options are CZK, EUR, HUF, USD. Required when the plugin is enabled.
  • Default language: the locale Barion's hosted payment page opens in (PaymentRequestModel.Locale). Options: Čeština (cs-CZ), English (en-US), Magyar (hu-HU), Slovenčina (sk-SK), Deutsche (de-DE), Slovenščina (sl-SI), Spanish (es-ES), Français (fr-FR), or - to let Barion fall back to the browser's language. The plugin default is Slovenčina (sk-SK).

Test cards

Shown only while Enable SandboxMode is on, this reference table lists the official Barion sandbox test card numbers, one per outcome, so you can exercise every branch of the checkout flow without a real card:

ScenarioCard number (BIN)ExpirationCVCResult
Successful payment4444 8888 8888 5559any future dateany 3 digitsSuccessful
Card number/CVC/expiry invalid4444 8888 8888 4446any future dateany 3 digitsProblemWithCard
Insufficient funds4444 8888 8888 9999any future dateany 3 digitsLowFunds
Card reported lost/stolen4444 8888 8888 1111any future dateany 3 digitsLostOrStolenCard
Declined by acquirer4444 8888 8888 3331any future dateany 3 digitsDeclined
Flagged as fraudulent4444 8888 8888 6664any future dateany 3 digitsFraudulentTransaction
Card system error4444 8888 8888 7779any future dateany 3 digitsCardSystemError
SCA not supported by card4444 8888 8888 0006any future dateany 3 digitsScaSoftDeclined

Run at least the successful and one declined scenario before switching Enable SandboxMode off.

Validation and save behavior

  • Account email, API Key, Display Name, Select button name, and Default currency are required only while Enable barion is on — an unsaved/incomplete configuration can be left disabled without validation errors.
  • Saving redirects back to the settings page and shows a Craft success/error notice as usual.
  • A Test Credentials action button on the settings page calls Barion's GetPaymentState with a dummy payment ID and checks the response for an AuthenticationFailed error — this confirms the configured Account email/API Key pair authenticates against Barion without placing a real payment. A success or failure flash message is shown after the check.
  • Enable SandboxMode, Account email, API Key, Default language, Default currency are site-overridable: a multi-site install can set different values per site (via the site selector on the settings page), while other fields stay shared across all sites.
  1. Install the plugin, then open Credentials and enter the Barion Wallet Account email and the API Key for Barion's Test environment, with Enable SandboxMode on.
  2. Set General (display name, select button label, instructions) and Default currency/Default language to match your store.
  3. Click Test Credentials to confirm the sandbox API key authenticates.
  4. Run one successful and one declined test payment using the test cards table.
  5. Only after both test payments behave as expected, replace the API key with the Live environment key and switch Enable SandboxMode off.

Troubleshooting

"Test Credentials" reports the login information is incorrect

The API key doesn't match the environment implied by Enable SandboxMode — a Live API key tested with sandbox mode on (or vice versa) fails authentication. Confirm the key matches the toggle state, and that the Account email is a real Barion Wallet address on that account.

Barion doesn't appear at checkout even though it's enabled

The Restrictions tab is not the cause — as noted above, it currently has no effect on checkout. Confirm Enable barion is on and that the required fields (Account email, API Key, Display Name, Select button name, Default currency) are saved without validation errors.

A completed Barion payment isn't marked as paid in yStore

postValidate() only marks the order paid when Barion's payment status for the returned paymentId is exactly Succeeded — statuses like Reserved, Authorized, or Waiting are valid Barion states but are not treated as final payment in this plugin version (see Developer → Payment statuses). Check the payment's actual status in the Barion merchant dashboard.

API errors aren't shown in detail to the customer

By design — Barion Errors entries (error code, title, description, timestamp) are written to the shared yStore error log under barion-plugin:placeOrder:api or barion-plugin:postValidate:api rather than surfaced verbatim at checkout. Check the yStore error log for the underlying Barion error when a payment attempt fails unexpectedly.