From 91540e8304f2704ad6064e274de4a0776e48d647 Mon Sep 17 00:00:00 2001 From: Miguel Vargas Date: Fri, 24 Nov 2023 16:08:10 -0500 Subject: [PATCH] feat: remove capture expiration date attribute --- src/Utils/HasTransactionStatus.php | 6 +----- .../WebpayPlus/Responses/TransactionDetail.php | 12 ++---------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/Utils/HasTransactionStatus.php b/src/Utils/HasTransactionStatus.php index 9282efb4..74e0169c 100644 --- a/src/Utils/HasTransactionStatus.php +++ b/src/Utils/HasTransactionStatus.php @@ -18,7 +18,6 @@ trait HasTransactionStatus public $cardDetail; public $transactionDate; public $balance; - public $captureExpirationDate; /** * @param mixed $amount @@ -203,10 +202,7 @@ public function setTransactionStatusFields($json) $this->installmentsAmount = isset($json['installments_amount']) ? $json['installments_amount'] : null; $this->installmentsNumber = isset($json['installments_number']) ? $json['installments_number'] : null; $this->balance = isset($json['balance']) ? $json['balance'] : null; - $this->captureExpirationDate = isset($json['capture_expiration_date']) ? $json['capture_expiration_date'] : null; - if (is_null($this->captureExpirationDate)) { - unset($this->captureExpirationDate); - } + } /** diff --git a/src/Webpay/WebpayPlus/Responses/TransactionDetail.php b/src/Webpay/WebpayPlus/Responses/TransactionDetail.php index 725f2dc7..242fc0e3 100644 --- a/src/Webpay/WebpayPlus/Responses/TransactionDetail.php +++ b/src/Webpay/WebpayPlus/Responses/TransactionDetail.php @@ -16,7 +16,6 @@ class TransactionDetail public $installmentsAmount; public $commerceCode; public $buyOrder; - public $captureExpirationDate; /** * TransactionDetail constructor. @@ -29,7 +28,6 @@ class TransactionDetail * @param $installmentsNumber * @param $commerceCode * @param $buyOrder - * @param $captureExpirationDate */ public function __construct( $amount, @@ -40,8 +38,7 @@ public function __construct( $installmentsNumber, $installmentsAmount, $commerceCode, - $buyOrder, - $captureExpirationDate + $buyOrder ) { $this->amount = $amount; $this->status = $status; @@ -52,10 +49,6 @@ public function __construct( $this->installmentsAmount = $installmentsAmount; $this->commerceCode = $commerceCode; $this->buyOrder = $buyOrder; - $this->captureExpirationDate = $captureExpirationDate; - if (is_null($captureExpirationDate)) { - unset($this->captureExpirationDate); - } } public static function createFromArray(array $array) @@ -69,10 +62,9 @@ public static function createFromArray(array $array) $installmentsAmount = isset($array['installments_amount']) ? $array['installments_amount'] : null; $commerceCode = isset($array['commerce_code']) ? $array['commerce_code'] : null; $buyOrder = isset($array['buy_order']) ? $array['buy_order'] : null; - $captureExpirationDate = isset($array['capture_expiration_date']) ? $array['capture_expiration_date'] : null; return new static($amount, $status, $authorizationCode, $paymentTypeCode, $responseCode, $installmentsNumber, - $installmentsAmount, $commerceCode, $buyOrder, $captureExpirationDate); + $installmentsAmount, $commerceCode, $buyOrder); } public function isApproved()