Skip to content

5.3.x#1467

Open
L3RAZ wants to merge 94 commits intomainfrom
5.3.x
Open

5.3.x#1467
L3RAZ wants to merge 94 commits intomainfrom
5.3.x

Conversation

@L3RAZ
Copy link
Copy Markdown
Collaborator

@L3RAZ L3RAZ commented Feb 25, 2026

No description provided.

L3RAZ and others added 30 commits December 9, 2025 12:54
* Improve validation

* Fix Cardinality violation: 1242 Subquery returns more than 1 row

* Change headers format to fix webhooks validation issue (#1396)

* change headers format

* Fix Checkout headers format

* Apply PHP-CS-Fixer changes

* Fix header key

* Added missing fields for webhook validation

* Apply PHP-CS-Fixer changes

* Added missing dependency injection configs

* Commented order creation steps for webhook

* Imrpoved readability

* Added check if order exists

* Review fixes

* Added cart Id check before creating order

* Added missing dependency injection config

* Typo fix

---------

Co-authored-by: Sébastien BIDAULT <sebastien.bidault@prestashop.com>
Co-authored-by: seiwan <seiwan@users.noreply.github.com>
Co-authored-by: Matt75 <5262628+Matt75@users.noreply.github.com>
Co-authored-by: L3RAZ <laurynas.sedys@invertus.eu>
Co-authored-by: L3RAZ <L3RAZ@users.noreply.github.com>

* change dateTimeImmuable into datetime and send the date string instead of dateTimeImmuable

* Cast cart->id_customer to int before calling getFundingSourceTokens, as in third party checkout context, id_customer may be empty on initial checkout form load.

* Fix payment method name on save order

* Bump module v5.0.6

* Add webhook processing exception to logs

* Avoid to replace funding source value

* [PAYSHIP-3698] Fix amount breakdown computation with gift wrapping price

* WIP concurency fixes

* [PAYSHIP-3701] Fix ApplePayInstaller definition

* [PAYSHIP-3702] Fix undefined variable on payment controller

* Changed approved webhook handler and added soft delete for PayPal orders

* Replaced hardcoded tag with constant

* Removed captured status from create controller

* Modified order fetch function

* Added amount with breakdown value normatization

* Apply PHP-CS-Fixer changes

* Added additional checks for order approved event handler

* Fixed eligible country list for apple and google pay

---------

Co-authored-by: Matt75 <5262628+Matt75@users.noreply.github.com>
Co-authored-by: PSebou <98540591+PSebou@users.noreply.github.com>
Co-authored-by: Sébastien BIDAULT <sebastien.bidault@prestashop.com>
Co-authored-by: seiwan <seiwan@users.noreply.github.com>
Co-authored-by: L3RAZ <L3RAZ@users.noreply.github.com>
Co-authored-by: sgodard <sebastien.godard@prestashop.com>
Co-authored-by: zelarg <peter.sliacky@gmail.com>
Co-authored-by: Mathieu Ferment <mathieu.ferment@prestashop.com>
* Added workflow for running tests

* Changed infra test bootstrap path

* Apply PHP-CS-Fixer changes

* Added docker instance for tests

* changed workflow so all tests run

* updated integration bootstrap ad db creation scripts

* Apply PHP-CS-Fixer changes

* Added step for creating test database

* Apply PHP-CS-Fixer changes

* Set PS to auto install

* Changed host in create-test database script for all module versions

* Changed to fail workflow when tests fail

* Changed when the workflow runs

* Moved cs fixer workflow

---------

Co-authored-by: L3RAZ <L3RAZ@users.noreply.github.com>
### Description
- Introduced `docker-compose.local.yml.dist` and `.cloudflared.yml.dist` templates for easier configuration of local services.
- Refactored Makefile for better organization, adding `install`, `lint`, and `test` commands.
- Enhanced README with development guide and PHP version matrix for more clarity.
- Simplified `.env.dist` with new variables `SSL_ENABLED` and `CLOUDFLARED_CREDENTIALS_FILE`.
- Updated `.gitignore` to include the new configuration files.
- Added `PayPalIntentConfiguration` class to define intent constants (`CAPTURE`, `AUTHORIZE`) for better maintainability.
- Updated usages of hardcoded intent values (`CAPTURE`) to use the new constants across the codebase.
- Improved fallback handling for `PS_CHECKOUT_INTENT` in `PayPalSdkConfiguration`.
- Refined test cases and factory methods to align with the updated configuration approach.
…onstants

feat: introduce PayPal intent configuration constants
### Description
- Introduced `phpstan-baseline.neon` to suppress existing errors and warnings in static code analysis.
- The baseline will help developers focus on new issues without being overwhelmed by legacy errors.
- No changes to application behavior, purely affects development tooling.
refactor: Improve Docker configuration and streamline Makefile commands
* Added authorization create action

* Apply PHP-CS-Fixer changes

* Added new table columns for authorization

* Moved intent class

---------

Co-authored-by: L3RAZ <L3RAZ@users.noreply.github.com>
…-paypal-sdk

[PAYSHIP-3714] Set intent value for PayPal JS SDK
* Added authorization create action

* Apply PHP-CS-Fixer changes

* Added new table columns for authorization

* Removed seller_protection column

* Added unit test for authorize order action

* Apply PHP-CS-Fixer changes

* PHPStan fixes

* Apply PHP-CS-Fixer changes

* Added column check in DatabaseTableInstaller

* PHPStan fix

* Updated phpstan baselines for 1.7 and 9

* PHPStan fixes - variable types

* PHPStan fix

* Apply PHP-CS-Fixer changes

* PHPStan fix

* ps17 phpstan-baseline fix

* Update ps9 phpstan-baseline

* Fixed phpstan baselines

---------

Co-authored-by: L3RAZ <L3RAZ@users.noreply.github.com>
### Description
- Removed unused `phpstan/phpstan`, `phpstan/extension-installer`, and `phpstan/phpstan-phpunit` dependencies.
- Updated PHP requirements in `composer.json` and `composer.lock` to align with supported versions (`^8.1` or `>=8.2` in places).
- Upgraded various dependencies (`symfony/*`, `guzzlehttp/*`, `composer/semver`, etc.) to their latest stable versions.
- Adjusted `composer.json` configuration to improve compatibility and build consistency.
* feat(api): introduce reauthorization support for PayPal payments

- Added `ReauthorizeAuthorizationAction` to handle the reauthorization process for PayPal orders.
- Implemented DTO classes, including `AuthorizationStatus`, `AuthorizationLinkRelation`, `ReauthorizeAuthorizationRequestDto`, and `PaymentAuthorizationResponseDto`.
- Extended `PaymentHttpClient` to support fetching and reauthorizing authorizations via PayPal API.
- Modified `PayPalOrderResponse` to return order authorizations and related details.

These changes enable the handling of reauthorization logic for PayPal payments.

* chore: integrate PHP-CS-Fixer and consolidate lint workflows

- Removed `php-cs-fix.yml` CI workflow and replaced it with consolidated `lint.yml`.
- Updated PHP-CS-Fixer rules and paths in `.php-cs-fixer.php`.
- Added new composer scripts (`cs`, `cs:fix`, `cs:ci`) for running code style checks and autofixes.
- Updated `Makefile` to use composer scripts for PHP-CS-Fixer.
- Added `.php-cs-fixer.cache` to `.gitignore`.
- Updated `composer.json` and `composer.lock` to include PHP-CS-Fixer as a dev dependency.

* chore: update composer dependencies and lock file

- Added `composer.lock` file to ensure consistent dependency versions.

* chore: clean up unused imports and fix/ignore phpstan issues

* chore: apply reviews
* Added authorization capture logic

---------

Co-authored-by: L3RAZ <L3RAZ@users.noreply.github.com>
* Added authorization capture logic

* Apply PHP-CS-Fixer changes

* Added unit test for capture authorization action

* Apply PHP-CS-Fixer changes

* Removed fetch authorization function

* Added new action DI config

* WIP

* Removed new authorization saving on auth capture

* ps8 phpstan fixes

* Apply PHP-CS-Fixer changes

* PHPStan baseline fix

* Added additional check for empty payload

* PHPStan fixes

* Apply PHP-CS-Fixer changes

* phpstan baselines

* Added void authorization action

* phpstan fixes

* PHPStan fixes

* Apply PHP-CS-Fixer changes

* Removed unused imports and added DI config

* Added authorization capture logic

* Apply PHP-CS-Fixer changes

* Added unit test for capture authorization action

* Apply PHP-CS-Fixer changes

* Removed fetch authorization function

* Added new action DI config

* WIP

* Removed new authorization saving on auth capture

* ps8 phpstan fixes

* Apply PHP-CS-Fixer changes

* PHPStan baseline fix

* Added additional check for empty payload

* PHPStan fixes

* Apply PHP-CS-Fixer changes

* phpstan baselines

* Added explicit column selection in authorozation repository

* PHPStan fix

* PHPStan fixes

* PHPStan fixes

* ps8 baseline

* ps17 baseline

* payment source array phpstan fix

* Fixed nullable array keys

* Merge fix

* Merge fixes

---------

Co-authored-by: L3RAZ <L3RAZ@users.noreply.github.com>
gaelreyrol and others added 30 commits March 17, 2026 09:34
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Added order status logic for authorization refunds

* fix(core): use order total to determine refund status for authorization orders

Full refund of a partial capture no longer sets the order to "Refunded".
The order is only marked as "Refunded" when the full order amount was
captured and then fully refunded. Otherwise it is "Partially refunded".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: format

* fix: phpstan errors

---------

Co-authored-by: Gaël Reyrol <me@gaelreyrol.dev>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…arked as Refunded (#1484)

fix: use PayPal order amount for authorization refund state calculation

getTotalPaid() returns only the captured amount, not the full authorized
amount, causing partial-capture refunds to be marked as "Refunded"
instead of "Partially refunded". Use getOrderAmountValue() from the
PayPal response which returns the correct full authorized amount.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: save payment token on AUTHORIZE intent, not just CAPTURE

savePaymentTokenAction was only called inside capturePayPalOrder(),
so vaulted cards were lost when the PayPal order intent was AUTHORIZE.
Refactored to call it after both AUTHORIZE and CAPTURE branches.

Fixes: https://forge.prestashop.com/browse/PAYSHIP-3946

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: link payment token to PayPal order for correct vault status display

isTokenSaved() checked vault attributes in paymentSource, but those only
exist in capture/authorize API responses — not in "get order" responses.
Now sets paymentTokenId on the PayPal order entity when saving a token,
and isTokenSaved() simply checks that field. Works for both CAPTURE and
AUTHORIZE intents.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: add module log file path to CLAUDE.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* [PAYSHIP-3956] Persist paymentSource after capture/authorize API response

The payment_source column in ps_pscheckout_order was not updated after
capture/authorize, causing the order summary to show the PrestaShop
customer email instead of the actual PayPal account email.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: reorder AuthorizePayPalOrderAction constructor params

Move PayPalOrderRepositoryInterface before LoggerInterface for
consistency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* [PAYSHIP-3898] Svix / Maasland webhook handling (#1463)

* Added event type mapping and constants

* Added maasland and svix webhook handling logic

* Fixes

* Fixed svix webhook validation

* Added webhook api error handling

* CS fix

* Added http exception as previous for webhook exception

* Replaced strings with constants

* Review fixes

* phpstan fixes

* Test fixes

* Aded orderId resolver and fixed failing tests

* PHPStan fix

* Fixed getById function in capture repository

* fix(controller): enhance exception handling in DispatchWebHook across ps8, ps9, and ps17

- Replaced `WebhookException` with a generic `Exception` catch block.
- Improved logging with detailed error context (message and trace).
- Standardized HTTP response code to `400` on exceptions.
- Augmented JSON error response to include both `message` and `code`.

This update ensures more robust error handling and consistent responses across versions.

---------

Co-authored-by: Gaël Reyrol <me@gaelreyrol.dev>

* Fixed PayPalOrderProvider dependency config

* [PAYSHIP-3725] Updated funding source eligibility (#1475)

* Updated funding source eligibility

* phpstan fix

* Updated ideal min cost to match PayPal documentation

* Updated min and max cart amount logic

* Fix fatal error when purchase unit has no items key (#1469)

Fix fatal error when PayPal purchase unit has no items key

When PayPal returns a purchase unit without the `items` key,
accessing `$purchaseUnit['items']` returns null, causing a TypeError
in `PayPalOrderPurchaseUnit::__construct()` which expects an array.

Use null coalescing operator to default to an empty array.

* [PAYSHIP-3945] Pay Upon Invoice improvements & fixes (#1480)

* Fixed PUI translation

* Added missing funding source setting for amount breakdown builder

* made PUI disabled by default

* Removed soft handling of errors in PUI node builder

* CS fix

* Translate customer service instructions in PUI builder

* Fix OrderAuthorizationValidator

* Update phpdoc

* Update OrderAuthorizationValidatorTest

* Added phpstan baseline

* Fixed some tests

* Removed ignored errors

* Test fixes

* phpstan fix

* Added phone number handling for PUI (#1481)

* Added phone input label translation

* Added maasland URLs to dist .env

---------

Co-authored-by: L3RAZ <laurynas.sedys@invertus.eu>
Co-authored-by: Laurynas Šedys <laurynas.sedys.96@gmail.com>

* prerelease CI fix

* [PAYSHIP-3962] generate unique custom_id (#1487)

* Updated base node builder to generate custom_id fro cart id and timestamp

* Updated test

* Baseline update

* Fixed module version in config.xml

* Added additional order check in payment controller (#1489)

* Add webhook headers in logs (#1490)

* Merge 5.1.x to 5.2.x (#1492)

* Improve validation

* Change headers format to fix webhooks validation issue (#1396)

* change headers format

* Fix Checkout headers format

* Apply PHP-CS-Fixer changes

* Fix header key

* Added missing fields for webhook validation

* Apply PHP-CS-Fixer changes

* Added missing dependency injection configs

* Commented order creation steps for webhook

* Imrpoved readability

* Added check if order exists

* Review fixes

* Added cart Id check before creating order

* Added missing dependency injection config

* Typo fix

---------

Co-authored-by: Sébastien BIDAULT <sebastien.bidault@prestashop.com>
Co-authored-by: seiwan <seiwan@users.noreply.github.com>
Co-authored-by: Matt75 <5262628+Matt75@users.noreply.github.com>
Co-authored-by: L3RAZ <laurynas.sedys@invertus.eu>
Co-authored-by: L3RAZ <L3RAZ@users.noreply.github.com>

* [PAYSHIP-3739] 5.0.x -> 5.1.x (#1419)

* Fix Cardinality violation: 1242 Subquery returns more than 1 row

* change dateTimeImmuable into datetime and send the date string instead of dateTimeImmuable

* Cast cart->id_customer to int before calling getFundingSourceTokens, as in third party checkout context, id_customer may be empty on initial checkout form load.

* Fix payment method name on save order

* Bump module v5.0.6

* Add webhook processing exception to logs

* Avoid to replace funding source value

* [PAYSHIP-3698] Fix amount breakdown computation with gift wrapping price

* WIP concurency fixes

* [PAYSHIP-3701] Fix ApplePayInstaller definition

* [PAYSHIP-3702] Fix undefined variable on payment controller

* Changed approved webhook handler and added soft delete for PayPal orders

* Replaced hardcoded tag with constant

* Removed captured status from create controller

* Modified order fetch function

* Added amount with breakdown value normatization

* Apply PHP-CS-Fixer changes

* Added additional checks for order approved event handler

* Fixed eligible country list for apple and google pay

---------

Co-authored-by: Matt75 <5262628+Matt75@users.noreply.github.com>
Co-authored-by: sgodard <sebastien.godard@prestashop.com>
Co-authored-by: PSebou <98540591+PSebou@users.noreply.github.com>
Co-authored-by: zelarg <peter.sliacky@gmail.com>
Co-authored-by: Mathieu Ferment <mathieu.ferment@prestashop.com>
Co-authored-by: L3RAZ <L3RAZ@users.noreply.github.com>

* Testing zip workflow

* BNPL + VENMO + PUI (#1453)

* [PAYSHIP-3554] BNPL Configurator / Adds new PayLater configuration handling (#1388)

* Added new PayLater configuration handling and removed old configuration references

* Apply PHP-CS-Fixer changes

* Code review feedback

* Apply PHP-CS-Fixer changes

* Fixed default config

* Removed hardcoded country for debugging

* changed the way json config is handled

* Bumped muodle version

* Bump module version

* Remove useless import

* Improve the PayPalPayLaterConfiguration

* Added validation for merchant country/locale/currency

* Apply PHP-CS-Fixer changes

* Updated default configuration to enable messages

* Fixed upgrade file config name

---------

Co-authored-by: L3RAZ <L3RAZ@users.noreply.github.com>
Co-authored-by: Matt75 <5262628+Matt75@users.noreply.github.com>

* Venmo payment method implementation (#1433)

* Added venmo to funding source repository

* Added venmo payment source building

* Changed the way US state names are handled in shipping node

* Modified Payment node builder

* injection fix

* Fixed full name on shipping node

* Removed gender from shipping address full_name property

* Bumbed module version

---------

Co-authored-by: Invertus <developers@invertus.eu>
Co-authored-by: Gytautas Zumaras <gytautaszumaras@Mac.localdomain>

* Pay Upon Invoice implementation (#1432)

* feat: PUI implementations for rendering and payload corrections

* feat: PUI order creation logic improved

* fix: fix validation by adding correct status

* Apply PHP-CS-Fixer changes

* birthday autofill for ps17 and ps9

* fix translations for pui

* fix upgrades

* bump version

* add error message for pay upon invoice available range

* Do not display Ratepay logo

* Update DE translations

* Apply PHP-CS-Fixer changes

* Update DE translations - 2

---------

Co-authored-by: Gytautas Zumaras <gytautaszumaras@Mac.localdomain>
Co-authored-by: GytisZum <GytisZum@users.noreply.github.com>
Co-authored-by: Gytautas Zumaras <gytautaszumaras@Gytautass-MacBook-Pro.local>
Co-authored-by: Mathieu Ferment <mathieu.ferment@prestashop.com>
Co-authored-by: matks <matks@users.noreply.github.com>

* Apply PHP-CS-Fixer changes

* Removed testing funding source

* Added Pay upon Invoice translation

* Made PUI and venmo disabled by default

---------

Co-authored-by: L3RAZ <L3RAZ@users.noreply.github.com>
Co-authored-by: Matt75 <5262628+Matt75@users.noreply.github.com>
Co-authored-by: Gytautas Zumaras <96050852+GytisZum@users.noreply.github.com>
Co-authored-by: Invertus <developers@invertus.eu>
Co-authored-by: Gytautas Zumaras <gytautaszumaras@Mac.localdomain>
Co-authored-by: GytisZum <GytisZum@users.noreply.github.com>
Co-authored-by: Gytautas Zumaras <gytautaszumaras@Gytautass-MacBook-Pro.local>
Co-authored-by: Mathieu Ferment <mathieu.ferment@prestashop.com>
Co-authored-by: matks <matks@users.noreply.github.com>

* [PAYSHIP-3716] Hummingbird fixes (#1414)

* Added fixes for hummingbird
* Added opacity to disabled payment buttons

* [PAYSHIP-3873] OrderState Action to add a check on order (#1456)

[PAYSHIP-3873] Fix SetDeclinedOrderStateAction to add a check on order

* [PAYSHIP-3888] Reject webhook requests with HTTP method != POST (#1457)

* [PAYSHIP-3895] Fix WebhookHeaderProvider incorrect header keys Nginx (#1458)

* [PAYSHIP-3896] TypeError on declined card transactions (#1459)

* [PAYSHIP-3905] Fix BNPL configuration TypeError (#1461)

* Fix creation of dynamic property on LinkAdapter

* [PAYSHIP-3900] Improve logging and error handling across controllers (#1460)

* Added missing Pay upon Invoice translations (#1466)

Adds missing Pay upon invoice translations

* Bump module version

* PHPstan baseline

---------

Co-authored-by: PSebou <98540591+PSebou@users.noreply.github.com>
Co-authored-by: Sébastien BIDAULT <sebastien.bidault@prestashop.com>
Co-authored-by: seiwan <seiwan@users.noreply.github.com>
Co-authored-by: L3RAZ <laurynas.sedys@invertus.eu>
Co-authored-by: L3RAZ <L3RAZ@users.noreply.github.com>
Co-authored-by: Laurynas Šedys <laurynas.sedys.96@gmail.com>
Co-authored-by: sgodard <sebastien.godard@prestashop.com>
Co-authored-by: zelarg <peter.sliacky@gmail.com>
Co-authored-by: Mathieu Ferment <mathieu.ferment@prestashop.com>
Co-authored-by: Gytautas Zumaras <96050852+GytisZum@users.noreply.github.com>
Co-authored-by: Invertus <developers@invertus.eu>
Co-authored-by: Gytautas Zumaras <gytautaszumaras@Mac.localdomain>
Co-authored-by: GytisZum <GytisZum@users.noreply.github.com>
Co-authored-by: Gytautas Zumaras <gytautaszumaras@Gytautass-MacBook-Pro.local>
Co-authored-by: matks <matks@users.noreply.github.com>

* Merge bd05dc2

* Code review improvements

---------

Co-authored-by: L3RAZ <l3raz@users.noreply.github.com>
Co-authored-by: Gaël Reyrol <me@gaelreyrol.dev>
Co-authored-by: Louis Bels <louisbels@hotmail.com>
Co-authored-by: Matthias RAIGNE <5262628+Matt75@users.noreply.github.com>
Co-authored-by: PSebou <98540591+PSebou@users.noreply.github.com>
Co-authored-by: Sébastien BIDAULT <sebastien.bidault@prestashop.com>
Co-authored-by: seiwan <seiwan@users.noreply.github.com>
Co-authored-by: sgodard <sebastien.godard@prestashop.com>
Co-authored-by: zelarg <peter.sliacky@gmail.com>
Co-authored-by: Mathieu Ferment <mathieu.ferment@prestashop.com>
Co-authored-by: Gytautas Zumaras <96050852+GytisZum@users.noreply.github.com>
Co-authored-by: Invertus <developers@invertus.eu>
Co-authored-by: Gytautas Zumaras <gytautaszumaras@Mac.localdomain>
Co-authored-by: GytisZum <GytisZum@users.noreply.github.com>
Co-authored-by: Gytautas Zumaras <gytautaszumaras@Gytautass-MacBook-Pro.local>
Co-authored-by: matks <matks@users.noreply.github.com>
* Adds back 5.2.0 upgrade

* Added voided order state creation
)

* Removed duplicate service definitions

* Added PUI translations

* Fixed duplicate config, moved correct config to shared from front
…pture (#1509)

* fix(core): transition order to Payment accepted after full multi-capture

The order stayed stuck in "Partial payment" even when multiple partial
captures summed to the full authorization amount. Two bugs caused this:
the hasBeenPaid() guard exited early for partially-paid orders, and
getCapture() only compared the first capture instead of summing all.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(core): filter only COMPLETED captures when summing captured amount

Prevents non-settled captures (PENDING, DECLINED, FAILED, REVERSED)
from being counted toward the total captured amount, which could cause
incorrect order state transitions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(core): use order history instead of current state to guard completed transition

Prevents re-applying Completed state on orders that were already completed
and subsequently transitioned by another module (e.g., to Shipped).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(core): include refunded captures when summing total captured amount

Captures that were later refunded (PARTIALLY_REFUNDED, REFUND) still
represent money that was captured. Filtering only COMPLETED status
would undercount the total and prevent the order from transitioning
to Payment accepted.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test(core): add integration tests for SetCompletedOrderStateAction edge cases

Cover history-based guard (already completed order not regressed),
refunded capture statuses counting toward total, pending captures
excluded, overpayment, and null order early return.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(core): harden authorization capture, void, and reauthorize actions

Validate json_decode result in CaptureAuthorizationAction before accessing
fields to prevent undefined index errors on malformed PayPal responses. Fix
capture payload in admin controllers to only include amount when value is
present, avoiding invalid PayPal API requests. Wrap array_filter with
array_values in ReauthorizeAuthorizationAction to prevent index mismatch.
Add LoggerInterface to CaptureAuthorizationAction and VoidAuthorizationAction
for action-level debugging. Replace hardcoded 'AUTHORIZE' string with
PayPalOrderIntent::AUTHORIZE constant, fix invalid PHPDoc |empty type, and
correct copy-paste comment in VoidAuthorizationAction.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(tests): add missing LoggerInterface mock to authorization action tests

The CaptureAuthorizationAction and VoidAuthorizationAction constructors
were updated to require a LoggerInterface parameter, but the unit tests
were not updated accordingly, causing PHPStan errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Updated phpdoc and added previous exception
* [PAYSHIP-3959] TypeError on unexpected HTTP response from API

* Adds tests on HttpClient

* Update phpstan baseline

* fix: update phpstan baselines

---------

Co-authored-by: Gaël Reyrol <gael.reyrol@prestashop.com>
* Improved refund error handling

* Apply suggestions from code review

Co-authored-by: Matthias RAIGNE <5262628+Matt75@users.noreply.github.com>

---------

Co-authored-by: Matthias RAIGNE <5262628+Matt75@users.noreply.github.com>
…1503)

* Use translator service in hook hookDisplayPaymentTop

* Fix review feedbacks
* Express checkout fixes

* PHPStan fix

* Reused error message
…1513)

* [XO-2933] Fix untranslated authorization confirmation modal messages

Use Translator service instead of legacy module->l() for capture, void,
and reauthorize success messages so they go through the translation
catalogues. Add missing French translations for all three strings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: adjust phpstan baseline

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Added int casting for order state
* Remove from translations the sequence %. which makes the BO transaction interface to fail

* Remove 100% from translations

* Update FundingSourceTranslationProvider

* Update TranslationModule

---------

Co-authored-by: Matt75 <5262628+Matt75@users.noreply.github.com>
* [XO-2955] Translations cause error during the payment process

* Update translations

* Fixed translation keys

* 1.7 phpstan baseline

---------

Co-authored-by: L3RAZ <laurynas.sedys@invertus.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants