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, anddefaultCurrencyall 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 toSelect. 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
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 areCZK,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:
| Scenario | Card number (BIN) | Expiration | CVC | Result |
|---|---|---|---|---|
| Successful payment | 4444 8888 8888 5559 | any future date | any 3 digits | Successful |
| Card number/CVC/expiry invalid | 4444 8888 8888 4446 | any future date | any 3 digits | ProblemWithCard |
| Insufficient funds | 4444 8888 8888 9999 | any future date | any 3 digits | LowFunds |
| Card reported lost/stolen | 4444 8888 8888 1111 | any future date | any 3 digits | LostOrStolenCard |
| Declined by acquirer | 4444 8888 8888 3331 | any future date | any 3 digits | Declined |
| Flagged as fraudulent | 4444 8888 8888 6664 | any future date | any 3 digits | FraudulentTransaction |
| Card system error | 4444 8888 8888 7779 | any future date | any 3 digits | CardSystemError |
| SCA not supported by card | 4444 8888 8888 0006 | any future date | any 3 digits | ScaSoftDeclined |
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, andDefault currencyare required only whileEnable barionis 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
GetPaymentStatewith a dummy payment ID and checks the response for anAuthenticationFailederror — 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 currencyare 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.
Recommended admin workflow
- 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.
- Set General (display name, select button label, instructions) and Default currency/Default language to match your store.
- Click Test Credentials to confirm the sandbox API key authenticates.
- Run one successful and one declined test payment using the test cards table.
- 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.