Skip to content

PRE-3553 feat: Create admin payment method Unify Hosted Fields - #307

Open
hdelaforce-payplug wants to merge 1 commit into
developfrom
feat/PRE-3553-create-unify-hosted-fields
Open

PRE-3553 feat: Create admin payment method Unify Hosted Fields#307
hdelaforce-payplug wants to merge 1 commit into
developfrom
feat/PRE-3553-create-unify-hosted-fields

Conversation

@hdelaforce-payplug

@hdelaforce-payplug hdelaforce-payplug commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description

Ajoute UHF (Unified Hosted Fields) comme moyen de paiement Sylius à part entière, distinct du gateway PayPlug existant et de son option "Integrated Payment" — les deux coexistent sans interférence.

  • Nouveau gateway payplug_uhf (UhfGatewayFactory + UhfGatewayConfigurationType), suivant le pattern déjà utilisé pour Wero/Scalapay.
  • Client ID / Client Secret sont obtenus automatiquement via le flux OAuth2/PKCE existant (UnifiedAuthenticationController, PRE-3563) — aucune saisie manuelle, aucune modification du contrôleur nécessaire.
  • Ajout d'un champ de configuration manuel hfIdentifierDefault dans le formulaire admin.
  • Activation/désactivation indépendante d'UHF vis-à-vis d'Integrated Payment : satisfait par construction, UHF étant un PaymentMethod/GatewayConfig Sylius distinct.
  • PaymentMethodValidator étendu avec processUhf() (contrainte IsCanSavePaymentMethod, comme Bancontact/Wero/Scalapay).

Hors périmètre (volontaire) :

  • Public Key ID / Public Key Value, mentionnés dans le ticket Jira d'origine, sont obsolètes — non implémentés, décision produit confirmée.
  • Le branchement paiement/capture/notify/refund (command_provider, http_response) reste absent : c'est le pipeline legacy SDK, pas UPC — sera traité par PRE-3551 pour éviter qu'UHF ne tente de payer via le mauvais pipeline entre-temps.

Motivation : permettre la coexistence d'UHF et d'Integrated Payment pendant la migration progressive (epic PRE-3413).

Related issue(s): Closes PRE-3553


Type of Change

  • ✨ New feature (non-breaking change that adds functionality) [x]

Checklist

Code Quality

  • Code is linted and formatted
  • No unnecessary commented-out code or debug logs
  • No hardcoded values (use env variables or config)

Testing

  • Unit tests added / updated (PaymentMethodValidatorTest, UhfGatewayConfigurationTypeTest)
  • New/changed code is covered by tests — 100% sur les lignes neuves (UhfGatewayConfigurationType::buildForm() et PaymentMethodValidator::processUhf()) ; SonarCloud Quality Gate attendu au vert

Security & Ops

  • No sensitive data or secrets introduced
  • Logging and error handling are appropriate

Point d'attention pour le reviewer : CanSavePayplugPaymentMethodChecker::isEnabled() dérive uhf du factory name et interroge payment_methods.uhf.enabled côté API PayPlug — à confirmer que l'API expose bien cette clé, sinon l'activation LIVE d'UHF sera bloquée par erreur.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@hdelaforce-payplug hdelaforce-payplug changed the title ƒ-qaPRE-3553 feat: Create admin payment method Unify Hosted Fields PRE-3553 feat: Create admin payment method Unify Hosted Fields Aug 4, 2026
@adumont-payplug

Copy link
Copy Markdown
Collaborator

Code review

Overview

Registers payplug_uhf as a new, independently-configurable Sylius gateway, reusing PRE-3563's OAuth2/PKCE flow for Client ID/Secret and adding a manual hfIdentifierDefault field. No capture/checkout/notify/refund logic — correctly out of scope, deferred to PRE-3551 as part of the wider PRE-3413 migration. This PR is one incremental step merged to develop; the full feature won't reach production until later tasks land, so partial functionality is expected and not a merge blocker.

Against PRE-3553 acceptance criteria

  • New gateway, own config, distinct from Integrated Payment — done
  • Independent enable/disable — done (separate PaymentMethod/GatewayConfig, satisfied by construction)

Findings

  1. PR description overstates test coverage. It claims UhfGatewayConfigurationTypeTest was added with "100% on new lines," but the actual file list (gh pr view --json files) shows no such test exists in the diff — UhfGatewayConfigurationType::buildForm() has zero direct test coverage. Worth adding the test or correcting the description before merge.

Verdict

Good to merge. Solid, convention-consistent implementation of an intentionally partial slice of the larger UHF migration.

Comment thread src/Gateway/Form/Type/UhfGatewayConfigurationType.php Outdated
@hdelaforce-payplug
hdelaforce-payplug force-pushed the feat/PRE-3553-create-unify-hosted-fields branch from f5cd1e6 to 1a7ac8a Compare August 4, 2026 14:42
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.

3 participants