Release/2.2.0#302
Conversation
* PRE-3224 feat: Add Wero payment method * PRE-3224: fix the refund from back-office * PRE-3224: adding Unit tests for Wero and fixing QA url --------- Co-authored-by: Julien Hoarau <jhoarau@payplug.com>
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, push a new commit or reopen this pull request to trigger a review.
There was a problem hiding this comment.
Pull request overview
This release branch primarily adds the new Wero by PayPlug gateway end-to-end (admin configuration, shop payment selection UI, payment-method availability filtering, and refund support), plus some CI/workflow and validation adjustments.
Changes:
- Introduce the Wero gateway (factory, form type, service registrations, shop/admin templates/hooks, translations).
- Extend payment/refund processing allow-lists and add PHPUnit coverage for Wero.
- CI/workflow tweaks (branch targets, Symfony matrix input) and minor robustness/type-hinting adjustments.
Reviewed changes
Copilot reviewed 37 out of 38 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| translations/validators.it.yml | Adds Wero + PayPlug LIVE access validation messages (it). |
| translations/validators.fr.yml | Adds Wero + PayPlug LIVE access validation messages (fr). |
| translations/validators.en.yml | Adds Wero + PayPlug LIVE access validation messages (en). |
| translations/messages.it.yml | Adds Wero gateway label (it). |
| translations/messages.fr.yml | Adds Wero gateway label (fr). |
| translations/messages.en.yml | Adds Wero gateway label (en). |
| tests/PHPUnit/PaymentProcessing/RefundPaymentProcessorTest.php | Adds refund-processing test coverage for Wero. |
| tests/PHPUnit/Creator/PayPlugPaymentDataCreatorTest.php | Adds payment payload test coverage for Wero payment_method. |
| templates/shop/select_payment/_wero.html.twig | Adds Wero logo/label rendering for shop payment selection. |
| templates/shop/integrated/index.html.twig | Renames Twig variable for route params (readability/consistency). |
| templates/admin/payment_method/actions/cancel.html.twig | Adds a reusable “back” button for payment method create/update. |
| src/Validator/PaymentMethodValidator.php | Adds Wero-specific payment method validation path. |
| src/Resolver/WeroPaymentMethodsResolverDecorator.php | Adds Wero filtering to supported payment methods resolution. |
| src/Provider/WeroSupportedRefundPaymentMethodsProviderDecorator.php | Adds Wero support in refund payment-method provider chain. |
| src/PaymentProcessing/RefundPaymentProcessor.php | Allows Wero through refund processing gateway allow-list. |
| src/OrderPay/Provider/CaptureHttpResponseProvider.php | Tags Wero to use the existing capture response provider. |
| src/MessageHandler/RefundPaymentGeneratedHandler.php | Allows Wero through refund generated handling allow-list. |
| src/Gateway/WeroGatewayFactory.php | Defines Wero gateway constants for Payum/Sylius integration. |
| src/Gateway/Validator/Constraints/IsOneyEnabledValidator.php | Adjusts exception handling to produce consistent violations. |
| src/Gateway/Validator/Constraints/IsCanSavePaymentMethodValidator.php | Reorders logic for permission/live-mode checks (introduces a regression noted in comments). |
| src/Gateway/Form/Type/WeroGatewayConfigurationType.php | Adds Wero gateway configuration type for the admin UI. |
| src/Creator/PayPlugPaymentDataCreator.php | Maps Wero gateway to PayPlug API payment_method field. |
| src/Controller/CompleteInfoController.php | Adds type annotation for form field types. |
| src/Command/Provider/StatusPaymentRequestCommandProvider.php | Registers Wero command provider tag for STATUS action. |
| src/Command/Provider/NotifyPaymentRequestCommandProvider.php | Registers Wero command provider tag for NOTIFY action. |
| src/Command/Provider/CapturePaymentRequestCommandProvider.php | Registers Wero command provider tag for CAPTURE action. |
| src/Action/Admin/Auth/UnifiedAuthenticationController.php | Makes OAuth callback config assignment null-safe. |
| ruleset/phpstan-baseline.neon | Adds phpstan baseline entry for the new resolver decorator. |
| public/assets/wero/logo.svg | Adds Wero logo asset. |
| config/twig_hooks/shop.yaml | Hooks Wero payment choice details template in shop checkout. |
| config/twig_hooks/admin.yaml | Hooks cancel/back action + Wero admin gateway section. |
| config/services/gateway.xml | Registers Payum gateway factory builder for Wero. |
| config/services/client.xml | Registers API client service for Wero. |
| config/services.yaml | Registers Sylius payment request command/response providers for Wero. |
| composer.json | Adds Symfony Flex auto-scripts to extra config. |
| .github/workflows/release.yml | Passes Symfony version(s) input to reusable PHPUnit workflow. |
| .github/workflows/ci.yml | Updates PR base branches and Symfony version(s) input. |
| .github/copilot-instructions.md | Adds repository-specific Copilot review instructions (incl. headless guidance). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| try { | ||
| $checker = new CanSavePayplugPaymentMethodChecker($this->apiClientFactory->createForPaymentMethod($value)); | ||
| if (!$checker->isLive()) { | ||
| $this->context->buildViolation(sprintf($constraint->noTestKeyMessage, $factoryName))->addViolation(); | ||
|
|
||
| if (in_array($factoryName, self::GATEWAYS_SKIP, true)) { | ||
| return; | ||
| } | ||
|
|
| #[AutoconfigureTag( | ||
| 'payplug_sylius_payplug_plugin.http_response_provider.payplug_wero', | ||
| ['action' => PaymentRequestInterface::ACTION_CAPTURE], | ||
| )] |
Description
Motivation:
Related issue(s): Closes #
Type of Change
Checklist
Code Quality
Testing
Security & Ops