Skip to main content
Version: 2.0.0

Settings

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

Settings → Plugins → 24Pay (g24pay/settings).

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

Enable / Sandbox toggles (sidebar)

  • Enable 24Pay: master switch. When off, 24Pay is not shown at checkout and no settings are required. When on, merchantNumber, name, buttonName, defaultCurrency, and eshopId all become required fields.
  • Enable SandboxMode: when on, requests go to 24Pay's Test environment (test.24-pay.eu) instead of the Live environment (admin.24-pay.eu). Turn this 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 "24Pay" or "Card payment via 24Pay"). 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. Optional.

Restrictions section

  • Visible From / Visible To: optional date/time window. Outside this window, 24Pay is hidden from checkout even if enabled — useful for a planned maintenance window or a temporary rollout freeze. Leave both blank to make 24Pay always visible.
  • Available in countries: a multi-select of store countries. 24Pay is only offered at checkout for orders shipping to (or billed to) one of the selected countries. Leave empty to make 24Pay available in all store countries. This restriction is independent from the fact that the actual payment request currently always sends SVK as the gateway Country value — see README → Known behavior.

Credentials section

  • Merchant number (mid): the 24Pay merchant ID (Mid) issued for your merchant account. Required when the plugin is enabled.
  • E-shop ID: the store identification number (EshopId) issued by 24Pay alongside the merchant number. Required when the plugin is enabled.
  • Key: the signing key (Key) used to compute the Sign value on every payment request. Required when the plugin is enabled; see Developer → Request signing for how it's used.
  • Default currency: offered options are CZK, EUR, HUF, USD. Required when the plugin is enabled. Note: in this plugin version the request sent to 24Pay always uses EUR regardless of this setting — see README → Known behavior.
  • Default language: options are Čeština (cs-CZ), English (en-US), Magyar (hu-HU), Slovenčina (sk-SK, the plugin default), Deutsche (de-DE), Slovenščina (sl-SI), Spanish (es-ES), Français (fr-FR), or -. Note: this value is not currently sent to the gateway, so it has no effect on the language of 24Pay's hosted payment page — see README → Known behavior.

Validation and save behavior

  • Merchant number, E-shop ID, Key, Display Name, Select button name, and Default currency are required only while Enable 24Pay 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 posts the E-shop ID and Merchant number to 24Pay's pay_gate/install endpoint and checks for a non-empty JSON response — this confirms the credentials are recognized by 24Pay without placing a real payment. A success or failure flash message is shown after the check.
  1. Install the plugin, then open Credentials and enter the Merchant number, E-shop ID, and Key for 24Pay's Test environment, with Enable SandboxMode on.
  2. Set General (display name, select button label, instructions) and Default currency/Default language.
  3. Click Test Credentials to confirm the sandbox merchant number and e-shop ID are recognized by 24Pay.
  4. Run a full test checkout through 24Pay's hosted payment page to confirm the redirect back to the store reports the order as paid.
  5. Only after the test payment behaves as expected, replace the credentials with the Live environment values and switch Enable SandboxMode off.
  6. Optionally configure Restrictions (countries, visibility window) to match when/where 24Pay should be offered.

Troubleshooting

"Test Credentials" reports the login information is incorrect

testCredentials() posts to 24Pay's install endpoint with the current E-shop ID and Merchant number and expects a non-empty JSON response. Confirm both values match the environment implied by Enable SandboxMode (test credentials aren't valid against the live merchant account, and vice versa).

24Pay doesn't appear at checkout even though it's enabled

Check the Restrictions tab: the order's country may be outside Available in countries, or the current time may be outside Visible From/Visible To. Both restrictions hide the payment method silently without an error.

A completed 24Pay payment isn't marked as paid in yStore

postValidate() only marks the order paid when the callback's Result parameter is exactly OK — any other value (or a missing Result) is treated as a failed/pending payment and logged under g24pay-gateway:postValidate together with the full callback payload for lookup. Check the yStore error log and the 24Pay merchant portal for the transaction's actual status.

The customer is charged in a different currency than expected

By design in this plugin version — see README → Known behavior: the currency sent to 24Pay is hardcoded to EUR, independent of the Default currency setting.