From a70ffcdd6483025d60bccbb8cfe957c4960ef396 Mon Sep 17 00:00:00 2001 From: EugeneShab Date: Wed, 6 Dec 2023 20:32:00 +0200 Subject: [PATCH] feat: Add Payment token field. Refs: #250 --- .../Service/Transaction/Transaction.php | 18 ++++++++++++++++++ .../Transaction/TransactionInterface.php | 13 +++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/SubscribePro/Service/Transaction/Transaction.php b/src/SubscribePro/Service/Transaction/Transaction.php index f57088f..0fd2379 100644 --- a/src/SubscribePro/Service/Transaction/Transaction.php +++ b/src/SubscribePro/Service/Transaction/Transaction.php @@ -401,6 +401,24 @@ public function getRefToken() return $this->getData(self::REF_TOKEN); } + /** + * @return string|null + */ + public function getPaymentToken() + { + return $this->getData(self::PAYMENT_TOKEN); + } + + /** + * @param string $paymentToken + * + * @return $this + */ + public function setPaymentToken($paymentToken) + { + return $this->setData(self::PAYMENT_TOKEN, $paymentToken); + } + /** * @return string|null */ diff --git a/src/SubscribePro/Service/Transaction/TransactionInterface.php b/src/SubscribePro/Service/Transaction/TransactionInterface.php index 09782e7..9c1ddef 100644 --- a/src/SubscribePro/Service/Transaction/TransactionInterface.php +++ b/src/SubscribePro/Service/Transaction/TransactionInterface.php @@ -32,6 +32,7 @@ interface TransactionInterface extends DataInterface public const REF_TRANSACTION_ID = 'ref_transaction_id'; public const REF_GATEWAY_ID = 'ref_gateway_id'; public const REF_TOKEN = 'ref_token'; + public const PAYMENT_TOKEN = 'payment_token'; public const TOKEN = 'token'; public const TYPE = 'type'; public const AMOUNT = 'amount'; @@ -273,6 +274,18 @@ public function getRefGatewayId(); */ public function getRefToken(); + /** + * @return string|null + */ + public function getPaymentToken(); + + /** + * @param string $paymentToken + * + * @return $this + */ + public function setPaymentToken($paymentToken); + /** * @return string|null */