From ab0cd1dbb65fb732d607fc61277d36530c4257dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reu=CC=88el=20van=20der=20Steege?= Date: Thu, 30 Nov 2023 15:29:34 +0100 Subject: [PATCH] Remove unused credit card data helper. --- src/DataCreditCardHelper.php | 49 -------------------------- tests/src/DataCreditCardHelperTest.php | 43 ---------------------- 2 files changed, 92 deletions(-) delete mode 100644 src/DataCreditCardHelper.php delete mode 100644 tests/src/DataCreditCardHelperTest.php diff --git a/src/DataCreditCardHelper.php b/src/DataCreditCardHelper.php deleted file mode 100644 index 69e29ad..0000000 --- a/src/DataCreditCardHelper.php +++ /dev/null @@ -1,49 +0,0 @@ -set_field( 'CARDNO', (string) $number ); - } - - /** - * Set expiration date. - * - * @param DateTime $date Expiration date. - * - * @return DataCreditCardHelper - */ - public function set_expiration_date( DateTime $date ) { - return $this->set_field( 'ED', $date->format( Ingenico::EXPIRATION_DATE_FORMAT ) ); - } - - /** - * Set security code. - * - * @param string $security_code Security code. - * - * @return DataCreditCardHelper - */ - public function set_security_code( $security_code ) { - return $this->set_field( 'CVC', $security_code ); - } -} diff --git a/tests/src/DataCreditCardHelperTest.php b/tests/src/DataCreditCardHelperTest.php deleted file mode 100644 index 4980c41..0000000 --- a/tests/src/DataCreditCardHelperTest.php +++ /dev/null @@ -1,43 +0,0 @@ -set_number( '378282246310005' ) - ->set_expiration_date( $ed ) - ->set_security_code( '123' ); - - $this->assertEquals( - [ - 'CARDNO' => '378282246310005', - 'ED' => $ed->format( Ingenico::EXPIRATION_DATE_FORMAT ), - 'CVC' => '123', - ], - $data->get_fields() - ); - } -}