diff --git a/src/Crypt/PayFlexCPV4Crypt.php b/src/Crypt/PayFlexCPV4Crypt.php index e1572770..b1d4f40b 100644 --- a/src/Crypt/PayFlexCPV4Crypt.php +++ b/src/Crypt/PayFlexCPV4Crypt.php @@ -37,7 +37,7 @@ public function create3DHash(AbstractPosAccount $posAccount, array $requestData) */ public function check3DHash(AbstractPosAccount $posAccount, array $data): bool { - return true; + throw new NotImplementedException(); } /** diff --git a/src/DataMapper/ResponseDataMapper/PayFlexV4PosResponseDataMapper.php b/src/DataMapper/ResponseDataMapper/PayFlexV4PosResponseDataMapper.php index 5a3503ca..bd72e345 100644 --- a/src/DataMapper/ResponseDataMapper/PayFlexV4PosResponseDataMapper.php +++ b/src/DataMapper/ResponseDataMapper/PayFlexV4PosResponseDataMapper.php @@ -91,7 +91,7 @@ public function map3DPaymentData(array $raw3DAuthResponseData, ?array $rawPaymen */ public function map3DPayResponseData(array $raw3DAuthResponseData, string $txType, array $order): array { - return $this->map3DPaymentData($raw3DAuthResponseData, $raw3DAuthResponseData, $txType, $order); + throw new NotImplementedException(); } /** @@ -99,7 +99,7 @@ public function map3DPayResponseData(array $raw3DAuthResponseData, string $txTyp */ public function map3DHostResponseData(array $raw3DAuthResponseData, string $txType, array $order): array { - return $this->map3DPayResponseData($raw3DAuthResponseData, $txType, $order); + throw new NotImplementedException(); } /** diff --git a/tests/Unit/Crypt/PayFlexCP4CryptTest.php b/tests/Unit/Crypt/PayFlexCP4CryptTest.php index 4c5ed83c..2aa9f976 100644 --- a/tests/Unit/Crypt/PayFlexCP4CryptTest.php +++ b/tests/Unit/Crypt/PayFlexCP4CryptTest.php @@ -7,6 +7,7 @@ use Mews\Pos\Crypt\PayFlexCPV4Crypt; use Mews\Pos\Entity\Account\PayFlexAccount; +use Mews\Pos\Exceptions\NotImplementedException; use Mews\Pos\Factory\AccountFactory; use Mews\Pos\PosInterface; use PHPUnit\Framework\TestCase; @@ -14,6 +15,7 @@ /** * @covers \Mews\Pos\Crypt\PayFlexCPV4Crypt + * @covers \Mews\Pos\Crypt\AbstractCrypt */ class PayFlexCP4CryptTest extends TestCase { @@ -47,7 +49,20 @@ public function testCreate3DHash(array $requestData, string $expected): void $this->assertSame($expected, $actual); } - public function hashCreateDataProvider(): array + public function testCreateHash(): void + { + $this->expectException(NotImplementedException::class); + $this->crypt->createHash($this->account, []); + } + + public function testCheck3DHash(): void + { + $this->expectException(NotImplementedException::class); + + $this->crypt->check3DHash($this->account, []); + } + + public static function hashCreateDataProvider(): array { return [ [ @@ -62,7 +77,7 @@ public function hashCreateDataProvider(): array ]; } - public function threeDHashCreateDataProvider(): array + public static function threeDHashCreateDataProvider(): array { return [ [ diff --git a/tests/Unit/DataMapper/RequestDataMapper/PayFlexV4PosRequestDataMapperTest.php b/tests/Unit/DataMapper/RequestDataMapper/PayFlexV4PosRequestDataMapperTest.php index a24f0afa..05053f6a 100644 --- a/tests/Unit/DataMapper/RequestDataMapper/PayFlexV4PosRequestDataMapperTest.php +++ b/tests/Unit/DataMapper/RequestDataMapper/PayFlexV4PosRequestDataMapperTest.php @@ -248,6 +248,18 @@ public function testCreate3DFormData(): void $this->assertEquals($expectedValue, $actualData); } + public function testCreateOrderHistoryRequestData(): void + { + $this->expectException(\Mews\Pos\Exceptions\NotImplementedException::class); + $this->requestDataMapper->createOrderHistoryRequestData($this->account, []); + } + + public function testCreateHistoryRequestData(): void + { + $this->expectException(\Mews\Pos\Exceptions\NotImplementedException::class); + $this->requestDataMapper->createHistoryRequestData($this->account, []); + } + /** * @return array */