Skip to content

Commit

Permalink
Fixed Astound\Affirm\Gateway\Validator\Client\PaymentActionsValidator…
Browse files Browse the repository at this point in the history
…Void class. (#132)

Problem of class was simple:
constructor, used there never called parent's constructor, so Depenedcy Injections of parent constructor was ingored.
This lead to `$this->createResult(...` at 71 line, causing error, because it calls parent's `createResult` from `Magento\Payment\Gateway\Validator\AbstractValidator`, and it uses `$this->resultInterfaceFactory`, which is unexpeted null, because parent constuctor never set up this value, because of parent::__construc() was never called, and DI's values wass never passed there.

Co-authored-by: artur vinogradov <[email protected]>
  • Loading branch information
artur1214 and artur1214 authored May 8, 2024
1 parent 096791d commit 5039307
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Gateway/Validator/Client/PaymentActionsValidatorVoid.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@

use Magento\Payment\Gateway\Helper\SubjectReader;
use Astound\Affirm\Helper\ErrorTracker;

use Astound\Affirm\Gateway\Helper\Util;
use Magento\Payment\Gateway\Validator\ResultInterface;
use Magento\Payment\Gateway\Validator\ResultInterfaceFactory;
/**
* Class PaymentActionsValidatorVoid
*/
Expand All @@ -42,10 +44,12 @@ class PaymentActionsValidatorVoid extends PaymentActionsValidator
public $errorTracker;

public function __construct(
\Astound\Affirm\Helper\ErrorTracker $errorTracker
ResultInterfaceFactory $resultFactory,
ErrorTracker $errorTracker,
Util $util
)
{
$this->errorTracker = $errorTracker;
parent::__construct($resultFactory, $errorTracker, $util);
}

/**
Expand Down

0 comments on commit 5039307

Please sign in to comment.