diff --git a/composer-require-checker.json b/composer-require-checker.json index c0e91fdb96..f3f9c63aa3 100644 --- a/composer-require-checker.json +++ b/composer-require-checker.json @@ -101,7 +101,6 @@ "Payum\\Core\\Security\\TokenInterface", "Payum\\Core\\Security\\Util\\Random", "Payum\\Core\\Storage\\AbstractStorage", - "Payum\\Core\\Storage\\IdentityInterface", "PHPUnit\\Framework\\ExpectationFailedException", "PHPUnit\\Framework\\MockObject\\MockObject", "PHPUnit\\Framework\\TestCase", diff --git a/src/Sylius/Bundle/PayumBundle/Model/PaymentSecurityToken.php b/src/Sylius/Bundle/PayumBundle/Model/PaymentSecurityToken.php index 5c6e183db4..1a69a95a0c 100644 --- a/src/Sylius/Bundle/PayumBundle/Model/PaymentSecurityToken.php +++ b/src/Sylius/Bundle/PayumBundle/Model/PaymentSecurityToken.php @@ -13,17 +13,15 @@ declare(strict_types=1); namespace Sylius\Bundle\PayumBundle\Model; -use Payum\Core\Model\Identity; use Payum\Core\Security\Util\Random; -use Payum\Core\Storage\IdentityInterface; class PaymentSecurityToken implements PaymentSecurityTokenInterface { /** @var string */ protected $hash; - /** @var array|null */ - protected ?array $details = null; + /** @var object|null */ + protected $details; /** @var string|null */ protected $afterUrl; @@ -46,28 +44,11 @@ class PaymentSecurityToken implements PaymentSecurityTokenInterface public function setDetails($details): void { - if ($details instanceof IdentityInterface) { - $this->details = ['id' => $details->getId(), 'class' => $details->getClass()]; - - return; - } - - if (is_object($details)) { - $this->details = (array) $details; - - return; - } - $this->details = $details; } - /** @return IdentityInterface|array|null */ - public function getDetails(): array|IdentityInterface|null + public function getDetails() { - if (is_array($this->details) && isset($this->details['id'], $this->details['class'])) { - return new Identity($this->details['id'], $this->details['class']); - } - return $this->details; }