From 3e50ceafee3787eb3039404b3217ffcc80f3deb5 Mon Sep 17 00:00:00 2001 From: Aymane Hlamnach Date: Wed, 30 Mar 2022 10:57:49 +0000 Subject: [PATCH] No longer require tokenization response to include trx id --- src/Models/Token.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Models/Token.php b/src/Models/Token.php index ecb2c23..a203e7e 100755 --- a/src/Models/Token.php +++ b/src/Models/Token.php @@ -11,18 +11,9 @@ class Token /** @var string */ private $id; - /** @var string */ - private $transactionId; - - public function __construct(string $id, string $transactionId) + public function __construct(string $id) { $this->id = $id; - $this->transactionId = $transactionId; - } - - public function getTransactionId(): string - { - return $this->transactionId; } public function getId(): string @@ -34,14 +25,13 @@ public static function createFromArray(array $attributes) { $hasMissingKeys = !isset( $attributes['id'], - $attributes['transaction_id'] ); if ($hasMissingKeys) { throw new InvalidArgumentException('missing keys in token response'); } - return new self($attributes['id'], $attributes['transaction_id']); + return new self($attributes['id']); } public function getPaymentURL($lang = 'en'): string