[ECP-9693] Add payment method title override configuration#3285
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a feature allowing merchants to override payment method titles in the checkout via a new dynamic table in the Magento admin configuration. The implementation includes backend logic for JSON serialization of these overrides and a helper method to apply the custom titles to the payment methods list returned by the API. A review comment identifies an issue with the use of addslashes() in the admin block renderer, noting that it is unnecessary and potentially harmful since the framework's select block already handles HTML escaping.
|
|
||
| class PaymentMethodTitles extends AbstractFieldArray | ||
| { | ||
| private ?PaymentMethodType $_paymentMethodTypeRenderer = null; |
There was a problem hiding this comment.
Could you please change the property name to conform with Sonar rules?
| */ | ||
| public function beforeSave(): static | ||
| { | ||
| $value = $this->getValue(); |
There was a problem hiding this comment.
What would you think about adding a validator to check the uniqueness of the values? So that, each payment method can only have one override per store.
…rease test coverage
|



Description
This PR adds a dynamic configuration table under Accepting Payments > Online Checkout that allows merchants to override payment method titles returned by the /paymentMethods API response.
Fixes #2858