Skip to content

BUGFIX: clarify Hosted field style info banner to mention Custom form requirement - #328

Merged
TLabutis merged 1 commit into
SL-346/accessibility-eaa-compliancefrom
BUGFIX/clarify-hosted-field-style-info
May 15, 2026
Merged

BUGFIX: clarify Hosted field style info banner to mention Custom form requirement#328
TLabutis merged 1 commit into
SL-346/accessibility-eaa-compliancefrom
BUGFIX/clarify-hosted-field-style-info

Conversation

@TLabutis

Copy link
Copy Markdown
Contributor

Summary

  • "Hosted field style" (Classic / Labeled / Inline with Card) only affects checkouts that go through the module's own hosted fields flow — i.e. payment methods with Custom form enabled. Saved-card flow and methods without Custom form use the Saferpay-hosted Payment Page, whose appearance is controlled by "Payment Page configurations name" (ConfigSet).
  • The previous info banner text ("Choose which hosted field will be displayed on payment option selection with supported payment methods.") was generic and led merchants to expect the style to apply universally.

Changes

  • src/Service/SettingsTranslationService.php: rewrite hostedFieldInfo to explicitly state the Custom form prerequisite and point users to "Payment Page configurations name" for the Saferpay-hosted page styling. Wrapped in html_entity_decode(..., ENT_QUOTES, 'UTF-8') so quotes render correctly (same pattern already used for configNameDescription).

No FE/build changes — same translation key, same banner component.

Test plan

  • Open module settings → General → Styling section.
  • Verify the info banner shows the new wording with proper quotes (not ").
  • Verify all supported PS versions (1.7.x, 8.x, 9.x) render the banner correctly.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the translation string for 'hostedFieldInfo' in the SettingsTranslationService to provide a more detailed explanation of when specific styles apply, particularly concerning the 'Custom form' setting and Saferpay-hosted pages. The review feedback suggests a phrasing improvement to the new text to resolve grammatical ambiguity regarding how saved cards are referenced.

'enterConfigName' => $this->module->l('Enter configuration name', self::FILE_NAME),
'configNameDescription' => html_entity_decode($this->module->l('Name of the Payment Page Configuration created in Saferpay Backoffice (Settings > Payment Page Configuration). Max 20 characters. Allowed: letters, numbers, dots, colons, hyphens, underscores.', self::FILE_NAME), ENT_QUOTES, 'UTF-8'),
'hostedFieldInfo' => $this->module->l('Choose which hosted field will be displayed on payment option selection with supported payment methods.', self::FILE_NAME),
'hostedFieldInfo' => html_entity_decode($this->module->l('This style applies only to payment methods with "Custom form" enabled in the Payment Methods list. Methods without Custom form or paid with saved cards use the Saferpay-hosted payment page, whose appearance is controlled by "Payment Page configurations name".', self::FILE_NAME), ENT_QUOTES, 'UTF-8'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The phrase "Methods ... paid with saved cards" is slightly ambiguous and grammatically awkward, as payment methods themselves are not "paid". It would be clearer to refer to "payments made with saved cards" or "transactions using saved cards" to distinguish between the configuration of the method and the state of the transaction.

            'hostedFieldInfo' => html_entity_decode($this->module->l('This style applies only to payment methods with "Custom form" enabled in the Payment Methods list. Methods without Custom form or payments made with saved cards use the Saferpay-hosted payment page, whose appearance is controlled by "Payment Page configurations name".', self::FILE_NAME), ENT_QUOTES, 'UTF-8'),

@TLabutis
TLabutis merged commit bfab294 into SL-346/accessibility-eaa-compliance May 15, 2026
1 of 3 checks passed
@TLabutis
TLabutis deleted the BUGFIX/clarify-hosted-field-style-info branch May 15, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant