PRE-3553 refactor: Set UHF as standard payment option - #310
Conversation
There was a problem hiding this comment.
Claude Code Review
Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.
Tip: disable this comment in your organization's Code Review settings.
ReviewOverviewThis PR folds Unified Hosted Fields (UHF) into the standard
The removal of the old gateway is thorough and clean — I checked the full branch tree (not just the diff) and found no stray references to 🔴 Critical: referenced templates don't exist
hosted_fields_mode:
template: '@PayPlugSyliusPayPlugPlugin/admin/payment_method/form/hosted_fields_mode.html.twig'
hf_identifier:
template: '@PayPlugSyliusPayPlugPlugin/admin/payment_method/form/hf_identifier.html.twig'
hf_sub_merchant_id:
template: '@PayPlugSyliusPayPlugPlugin/admin/payment_method/form/hf_sub_merchant_id.html.twig'None of these three 🔴 Critical: referenced Stimulus controller doesn't exist
"hosted-fields-mode": {
"main": "admin/controllers/hosted-fields-mode_controller.js",
...
}There is no Together, these two gaps suggest the PR is missing its final commit(s) — the JS/Twig half of the "hosted fields mode" admin UI never made it in. 🟡 Test coverage gaps
The 🟢 Minor:
|
9bcad62 to
73eb298
Compare
Review Update — PR #310 (new commits pushed)New commits substantially expand the PR (+1223/−319 across 38 files now, was +489/−325 across 34). This addresses both critical blockers from the previous round and adds thorough test coverage. ✅ Previously-flagged blockers: resolved
🟢 Test coverage: now strongNew/updated test files:
🟢 Small correctness polish
🟡 Still worth a look (unchanged from last review)
SummaryBoth critical issues from the prior review are fixed, and the added test suite is unusually rigorous — including a real Symfony-forms lifecycle bug caught and regression-tested along the way. This looks mergeable modulo the |
73eb298 to
b8a94e5
Compare
b8a94e5 to
8fa4f32
Compare
Description
Le ticket PRE-3553 a été mis à jour : Unified Hosted Fields (UHF) n'est plus un moyen de paiement Sylius à part entière, mais un mode d'affichage du gateway carte classique (
PayPlugGatewayFactory, factorypayplug), au même niveau que le mode redirigé et le mode "Integrated Payment". Cette PR défait/fusionne le gateway autonomepayplug_uhfcréé dans #307/#308 dans le gatewaypayplug.PayPlugGatewayFactory: ajout deresolveDisplayMode()/resolveDisplayModeFlags()/missingHostedFieldsRequirements(), logique pure centralisant la résolution du mode d'affichage (redirected/integrated_payment/hosted_fields) à partir de la config du gateway.payplug) : nouveau champ radio non mappé (3 valeurs, aucune sélection = mode redirigé, comportement actuel par défaut) + champshfIdentifier(Account ID) ethfSubMerchantId(SubMerchant ID), toujours affichés quel que soit le mode sélectionné.integrated_payment, avec un message dédié quand un canal n'est pas compatible ;hosted_fieldsexigehfIdentifierethfSubMerchantId— erreur de formulaire si l'un des deux manque, comme demandé par le ticket._payplug.html.twiggère les 3 modes d'affichage viapayplug_display_mode(); plus de template dédié à un moyen de paiement UHF séparé.UhfGatewayFactory,UhfGatewayConfigurationType[Extension]et leurs templates/tests dédiés.payplug.Aucune migration de données requise : le gateway
payplug_uhfn'est déployé chez aucun vrai marchand ; les configspayplugexistantes (integratedPayment: true/false) restent valides telles quelles.Motivation :
Éviter la coexistence de deux gateways carte (
payplugetpayplug_uhf) alors que le ticket Jira a été reformulé pour qu'UHF ne soit qu'une option d'affichage du gateway carte classique existant — simplifie la configuration admin et le pipeline de paiement pour l'epic de migration PRE-3413.Related issue(s): Closes PRE-3553 (remplace l'approche de #307 / #308)
Type of Change
Checklist
Code Quality
Testing
PayPlugGatewayFactoryTest,PayPlugGatewayConfigurationTypeTest,PayPlugGatewayConfigurationTypeExtensionFormSubmissionTest,PayPlugExtensionTest,AbstractGatewayConfigurationTypeTest,PaymentMethodValidatorTest,IsCanSavePaymentMethodValidatorTest,PostPaymentSelectEventSubscriberTest)Security & Ops