diff --git a/tests/Functional/ToslaPosTest.php b/tests/Functional/ToslaPosTest.php index 1766ee8d..97de83d1 100644 --- a/tests/Functional/ToslaPosTest.php +++ b/tests/Functional/ToslaPosTest.php @@ -244,7 +244,6 @@ function (RequestDataPreparedEvent $requestDataPreparedEvent) use (&$eventIsThro $this->pos->customQuery($customQuery, 'https://prepentegrasyon.tosla.com/api/Payment/GetCommissionAndInstallmentInfo'); $response = $this->pos->getResponse(); - dump($response); $this->assertIsArray($response); $this->assertNotEmpty($response); $this->assertArrayHasKey('BankCode', $response); diff --git a/tests/Unit/Gateways/AkbankPosTest.php b/tests/Unit/Gateways/AkbankPosTest.php index 757e88c5..dd73cafe 100644 --- a/tests/Unit/Gateways/AkbankPosTest.php +++ b/tests/Unit/Gateways/AkbankPosTest.php @@ -864,7 +864,7 @@ public static function threeDFormDataProvider(): iterable 'order' => AkbankPosRequestDataMapperTest::threeDFormDataProvider()['3d_pay_form_data']['order'], 'paymentModel' => PosInterface::MODEL_3D_PAY, 'txType' => PosInterface::TX_TYPE_PAY_AUTH, - 'isWithCard' => false, + 'isWithCard' => true, 'formData' => AkbankPosRequestDataMapperTest::threeDFormDataProvider()['3d_pay_form_data']['expected'], 'gateway_url' => 'https://virtualpospaymentgateway.akbank.com/securepay', ]; @@ -873,7 +873,7 @@ public static function threeDFormDataProvider(): iterable 'order' => AkbankPosRequestDataMapperTest::threeDFormDataProvider()['3d_form_data']['order'], 'paymentModel' => PosInterface::MODEL_3D_SECURE, 'txType' => PosInterface::TX_TYPE_PAY_AUTH, - 'isWithCard' => false, + 'isWithCard' => true, 'formData' => AkbankPosRequestDataMapperTest::threeDFormDataProvider()['3d_form_data']['expected'], 'gateway_url' => 'https://virtualpospaymentgateway.akbank.com/securepay', ]; diff --git a/tests/Unit/Gateways/EstPosTest.php b/tests/Unit/Gateways/EstPosTest.php index 2b4f150a..68f373f5 100644 --- a/tests/Unit/Gateways/EstPosTest.php +++ b/tests/Unit/Gateways/EstPosTest.php @@ -156,10 +156,10 @@ public function testInit(): void public function testGet3DFormData( bool $isWithCard ): void { - $card = $isWithCard ? $this->card : null; - $order = ['id' => '124']; - $paymentModel = PosInterface::MODEL_3D_SECURE; - $txType = PosInterface::TX_TYPE_PAY_AUTH; + $card = $isWithCard ? $this->card : null; + $paymentModel = $isWithCard ? PosInterface::MODEL_3D_SECURE : PosInterface::MODEL_3D_HOST; + $order = ['id' => '124']; + $txType = PosInterface::TX_TYPE_PAY_AUTH; $this->requestMapperMock->expects(self::once()) ->method('create3DFormData') diff --git a/tests/Unit/Gateways/GarantiPosTest.php b/tests/Unit/Gateways/GarantiPosTest.php index 730fa52c..f35d6998 100644 --- a/tests/Unit/Gateways/GarantiPosTest.php +++ b/tests/Unit/Gateways/GarantiPosTest.php @@ -141,15 +141,14 @@ public function testInit(): void /** * @testWith [true] - * [false] */ public function testGet3DFormData( bool $isWithCard ): void { - $card = $isWithCard ? $this->card : null; - $order = ['id' => '124']; - $paymentModel = PosInterface::MODEL_3D_SECURE; - $txType = PosInterface::TX_TYPE_PAY_AUTH; + $card = $isWithCard ? $this->card : null; + $paymentModel = $isWithCard ? PosInterface::MODEL_3D_SECURE : PosInterface::MODEL_3D_HOST; + $order = ['id' => '124']; + $txType = PosInterface::TX_TYPE_PAY_AUTH; $this->requestMapperMock->expects(self::once()) ->method('create3DFormData') diff --git a/tests/Unit/Gateways/InterPosTest.php b/tests/Unit/Gateways/InterPosTest.php index 4aae3c5a..faf79179 100644 --- a/tests/Unit/Gateways/InterPosTest.php +++ b/tests/Unit/Gateways/InterPosTest.php @@ -153,10 +153,11 @@ public function testInit(): void public function testGet3DFormData( bool $isWithCard ): void { - $card = $isWithCard ? $this->card : null; - $order = ['id' => '124']; - $paymentModel = PosInterface::MODEL_3D_SECURE; - $txType = PosInterface::TX_TYPE_PAY_AUTH; + $card = $isWithCard ? $this->card : null; + $paymentModel = $isWithCard ? PosInterface::MODEL_3D_SECURE : PosInterface::MODEL_3D_HOST; + $gatewayUrl = $isWithCard ? 'https://test.inter-vpos.com.tr/mpi/Default.aspx' : 'https://test.inter-vpos.com.tr/mpi/3DHost.aspx'; + $order = ['id' => '124']; + $txType = PosInterface::TX_TYPE_PAY_AUTH; $this->requestMapperMock->expects(self::once()) ->method('create3DFormData') @@ -165,7 +166,7 @@ public function testGet3DFormData( $order, $paymentModel, $txType, - 'https://test.inter-vpos.com.tr/mpi/Default.aspx', + $gatewayUrl, $card ) ->willReturn(['formData']); diff --git a/tests/Unit/Gateways/PayFlexCPV4PosTest.php b/tests/Unit/Gateways/PayFlexCPV4PosTest.php index 609d107d..d8b1a489 100644 --- a/tests/Unit/Gateways/PayFlexCPV4PosTest.php +++ b/tests/Unit/Gateways/PayFlexCPV4PosTest.php @@ -154,7 +154,7 @@ public function testGet3DFormDataSuccess(): void { $enrollmentResponse = PayFlexCPV4PosRequestDataMapperTest::threeDFormDataProvider()->current()['queryParams']; $txType = PosInterface::TX_TYPE_PAY_AUTH; - $paymentModel = PosInterface::MODEL_3D_SECURE; + $paymentModel = PosInterface::MODEL_3D_PAY; $requestData = ['request-data']; $card = $this->card; $order = $this->order; @@ -207,7 +207,7 @@ public function testGet3DFormDataSuccess(): void public function testGet3DFormDataEnrollmentFail(): void { $txType = PosInterface::TX_TYPE_PAY_AUTH; - $paymentModel = PosInterface::MODEL_3D_SECURE; + $paymentModel = PosInterface::MODEL_3D_PAY; $card = $this->card; $order = $this->order; $requestData = ['request-data']; diff --git a/tests/Unit/Gateways/PayForTest.php b/tests/Unit/Gateways/PayForTest.php index 212f2a91..31999ba3 100644 --- a/tests/Unit/Gateways/PayForTest.php +++ b/tests/Unit/Gateways/PayForTest.php @@ -152,7 +152,6 @@ public function testSetTestMode(): void /** * @testWith [true, "3d", "https://vpostest.qnbfinansbank.com/Gateway/Default.aspx"] - * [false, "3d", "https://vpostest.qnbfinansbank.com/Gateway/Default.aspx"] * [false, "3d_host", "https://vpostest.qnbfinansbank.com/Gateway/3DHost.aspx"] */ public function testGet3DFormData( diff --git a/tests/Unit/Gateways/PosNetV1PosTest.php b/tests/Unit/Gateways/PosNetV1PosTest.php index f94ac4b7..14941f59 100644 --- a/tests/Unit/Gateways/PosNetV1PosTest.php +++ b/tests/Unit/Gateways/PosNetV1PosTest.php @@ -153,15 +153,14 @@ public function testGetApiURLException(): void /** * @testWith [true] - * [false] */ public function testGet3DFormData( bool $isWithCard ): void { $card = $isWithCard ? $this->card : null; + $paymentModel = $isWithCard ? PosInterface::MODEL_3D_SECURE : PosInterface::MODEL_3D_HOST; $order = ['id' => '124']; - $paymentModel = PosInterface::MODEL_3D_SECURE; $txType = PosInterface::TX_TYPE_PAY_AUTH; $this->requestMapperMock->expects(self::once())