-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PAYSHIP-3149] PrestaShop 9 compatibility #1304
Conversation
b887836
to
1a1d7f0
Compare
14ae80f
to
67e5f16
Compare
src/Order/Matrice/CommandHandler/UpdateOrderMatriceCommandHandler.php
Outdated
Show resolved
Hide resolved
src/PayPal/PaymentToken/Query/GetCustomerPaymentTokensQueryHandler.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @L3RAZ for this huge work
I have a few questions, sorry if they don't make sens it's probably because I lack knowledge on this module's code 😅
$this->fundingSourceTranslationProvider = $fundingSourceTranslationProvider; | ||
$this->configuration = $configuration; | ||
} | ||
|
||
public function __invoke(AddOrderPaymentCommand $command) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, if you use the AsCommandHandler
you shouldn't need to add this __invoke
method, but again I'm really aware of this module's architecture and context If the command/query buses are used in FO/legacy context this auto-configuration will probably not work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will check if this works on front controllers
.php-cs-fixer.cache
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You added this file in the gitignore, don't forget to remove it. 😉
ps_checkout.php
Outdated
@@ -101,8 +101,8 @@ class Ps_checkout extends PaymentModule | |||
* @var \PrestaShop\ModuleLibServiceContainer\DependencyInjection\ServiceContainer | |||
*/ | |||
private $serviceContainer; | |||
private static $merchantIsValid; | |||
private static $currencyIsAllowed; | |||
private ?bool $merchantIsValid; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's pretty weird to define boolean property which can be nullable. In my opinion, we should set this property as false in the __construct() method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole point is to not check if merchant is valid multiple times. If it's null - we set the value. If it's bool - we know if it's valid or not
@@ -746,13 +746,13 @@ public function hookActionAdminControllerSetMedia() | |||
*/ | |||
public function merchantIsValid() | |||
{ | |||
if (static::$merchantIsValid === null) { | |||
if ($this->merchantIsValid === null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we set the value as false in the __construct() method, it should be :
if ($this->merchantIsValid === null) { | |
if (!$this->merchantIsValid) { |
src/Builder/Configuration/MaaslandHttpClientConfigurationBuilder.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.