Skip to content

5.2.x#1421

Merged
Matt75 merged 64 commits intomainfrom
5.2.x
Apr 10, 2026
Merged

5.2.x#1421
Matt75 merged 64 commits intomainfrom
5.2.x

Conversation

@L3RAZ
Copy link
Copy Markdown
Collaborator

@L3RAZ L3RAZ commented Dec 9, 2025

  • Improve validation

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

  • Change headers format to fix webhooks validation issue ([PAYSHIP-3621] 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


  • 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


Self-Checks

  • I have performed a self-review of my code.
  • I have updated/added necessary technical documentation in the README file.

JIRA task link

Resolves: XXXX

Summary

QA Checklist Labels

  • Bug fix?
  • New feature?
  • Improvement?
  • Technical debt?
  • Covered by tests?

QA Checklist

Additional Context

Frontend Changes



[!] Don't forget to include JIRA task number in PR name or branch name. [!]

[!] Don't forget to update changelog.md with new changes. [!]

  • Verify if the version is correct.
  • Update demo environments used for testing.
  • Ensure changelog contains all changes.
  • Update documentation if needed.
  • Test if everything works properly.

L3RAZ and others added 2 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>
@gaelreyrol gaelreyrol marked this pull request as draft December 9, 2025 13:12
gaelreyrol and others added 27 commits December 9, 2025 16:12
### 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>
L3RAZ and others added 3 commits March 10, 2026 15:22
* 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 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.
* 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>
L3RAZ added 2 commits March 24, 2026 11:56
* Updated base node builder to generate custom_id fro cart id and timestamp

* Updated test

* Baseline update

* Fixed module version in config.xml
@seiwan seiwan requested review from Matt75, gaelreyrol and seiwan and removed request for Matt75 March 26, 2026 07:25
seiwan
seiwan previously approved these changes Mar 26, 2026
@seiwan seiwan marked this pull request as ready for review March 26, 2026 07:26
Matt75
Matt75 previously approved these changes Mar 26, 2026
gaelreyrol
gaelreyrol previously approved these changes Mar 26, 2026
@seiwan seiwan dismissed stale reviews from gaelreyrol, Matt75, and themself via 2b97441 March 26, 2026 11:05
Matt75 and others added 6 commits March 26, 2026 16:23
* 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>
#1494)

Added missing funding source eligibility service in ps9 displayPaymentByBinaries function
* Removed sentry and it's references

* Removes double new lines
@Matt75 Matt75 merged commit f5ec149 into main Apr 10, 2026
13 checks passed
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.

5 participants