diff --git a/src/Resources/PaymentTypes/PIS.php b/src/Resources/PaymentTypes/PIS.php index e9d8136b..7aa99794 100755 --- a/src/Resources/PaymentTypes/PIS.php +++ b/src/Resources/PaymentTypes/PIS.php @@ -4,6 +4,7 @@ use UnzerSDK\Traits\CanDirectCharge; +/** @deprecated PIS (Unzer Bank Transfer) payment type is no longer supported and will be removed in a future version. */ class PIS extends BasePaymentType { use CanDirectCharge; diff --git a/test/integration/PaymentTypes/PISTest.php b/test/integration/PaymentTypes/PISTest.php deleted file mode 100755 index 7646bd81..00000000 --- a/test/integration/PaymentTypes/PISTest.php +++ /dev/null @@ -1,81 +0,0 @@ -unzer->createPaymentType(new PIS()); - $this->assertInstanceOf(PIS::class, $pis); - $this->assertNotNull($pis->getId()); - - /** @var PIS $fetchedPIS */ - $fetchedPIS = $this->unzer->fetchPaymentType($pis->getId()); - $this->assertInstanceOf(PIS::class, $fetchedPIS); - $this->assertEquals($pis->expose(), $fetchedPIS->expose()); - - return $fetchedPIS; - } - - /** - * Verify pis is chargeable. - * - * @test - * - * @param PIS $pis - * - * @return Charge - * - * @depends pisShouldBeCreatableAndFetchable - */ - public function pisShouldBeAbleToCharge(PIS $pis): Charge - { - $charge = $pis->charge(100.0, 'EUR', self::RETURN_URL); - $this->assertNotNull($charge); - $this->assertNotEmpty($charge->getId()); - $this->assertNotEmpty($charge->getRedirectUrl()); - - return $charge; - } - - /** - * Verify pis is not authorizable. - * - * @test - * - * @param PIS $pis - * - * @depends pisShouldBeCreatableAndFetchable - */ - public function pisShouldNotBeAuthorizable(PIS $pis): void - { - $this->expectException(UnzerApiException::class); - $this->expectExceptionCode(ApiResponseCodes::API_ERROR_TRANSACTION_AUTHORIZE_NOT_ALLOWED); - - $this->unzer->authorize(100.0, 'EUR', $pis, self::RETURN_URL); - } -}