From 7ad373452e33e24c0628d4425bfb332d34a84a0f Mon Sep 17 00:00:00 2001 From: Garth Brantley Date: Wed, 6 Dec 2023 16:28:36 -0500 Subject: [PATCH] feat: add third_party_payment_token field to Transaction Refs: subscribepro/subscribepro-magento2-ext#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 0fd2379..c786d5a 100644 --- a/src/SubscribePro/Service/Transaction/Transaction.php +++ b/src/SubscribePro/Service/Transaction/Transaction.php @@ -419,6 +419,24 @@ public function setPaymentToken($paymentToken) return $this->setData(self::PAYMENT_TOKEN, $paymentToken); } + /** + * @return string|null + */ + public function getThirdPartyPaymentToken() + { + return $this->getData(self::THIRD_PARTY_PAYMENT_TOKEN); + } + + /** + * @param string $paymentToken + * + * @return $this + */ + public function setThirdPartyPaymentToken($paymentToken) + { + return $this->setData(self::THIRD_PARTY_PAYMENT_TOKEN, $paymentToken); + } + /** * @return string|null */ diff --git a/src/SubscribePro/Service/Transaction/TransactionInterface.php b/src/SubscribePro/Service/Transaction/TransactionInterface.php index 9c1ddef..d4dc243 100644 --- a/src/SubscribePro/Service/Transaction/TransactionInterface.php +++ b/src/SubscribePro/Service/Transaction/TransactionInterface.php @@ -33,6 +33,7 @@ interface TransactionInterface extends DataInterface public const REF_GATEWAY_ID = 'ref_gateway_id'; public const REF_TOKEN = 'ref_token'; public const PAYMENT_TOKEN = 'payment_token'; + public const THIRD_PARTY_PAYMENT_TOKEN = 'third_party_payment_token'; public const TOKEN = 'token'; public const TYPE = 'type'; public const AMOUNT = 'amount'; @@ -286,6 +287,18 @@ public function getPaymentToken(); */ public function setPaymentToken($paymentToken); + /** + * @return string|null + */ + public function getThirdPartyPaymentToken(); + + /** + * @param string $paymentToken + * + * @return $this + */ + public function setThirdPartyPaymentToken($paymentToken); + /** * @return string|null */