From efd0f4cdf71625946773c5fa93679b4d1fdd60e3 Mon Sep 17 00:00:00 2001 From: Simon Gabriel <15432768+sixer1182@users.noreply.github.com> Date: Tue, 8 Sep 2026 08:54:49 +0200 Subject: [PATCH 1/2] [CC-4064] Mark PIS (Unzer Bank Transfer) payment type as deprecated. The unzer-bank-transfer (PIS / FlexiPay Direct) payment method has been retired. PAPI's PISController is @Hidden and POST /v1/types/pis is being removed; the checkout frontends were retired under CC-4027. Add a class-level @deprecated docblock to PIS so merchants see the warning in their IDE and static analysis instead of a runtime failure. Deprecation only - nothing is removed. Removal belongs in the next major release, the way CC-3628 handled Sofort and Giropay. Mirrors the Giropay deprecation exactly: the annotation lives on the class only, and no other reference site is modified. Note: this does not affect the separate openbanking-pis payment method (UnzerSDK\Resources\PaymentTypes\OpenbankingPis), which remains supported despite now carrying the "Unzer Bank Transfer" marketing name in PAPI. Co-Authored-By: Claude Opus 5 (1M context) --- src/Resources/PaymentTypes/PIS.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Resources/PaymentTypes/PIS.php b/src/Resources/PaymentTypes/PIS.php index e9d8136bd..7aa99794b 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; From 16242022065a1b7a10cfc248c2eef30d7c6cdb0a Mon Sep 17 00:00:00 2001 From: Simon Gabriel <15432768+sixer1182@users.noreply.github.com> Date: Tue, 8 Sep 2026 08:59:01 +0200 Subject: [PATCH 2/2] [CC-4064] Remove the PIS integration test class. Deletes test/integration/PaymentTypes/PISTest.php. The tests exercised POST /v1/types/pis against the live sandbox, an endpoint PAPI is removing, so the coverage cannot hold once the endpoint is gone. Note this deviates from CC-4064 as originally written, which forbade removing any test and required a diff with no test-case deletions. Removal was requested explicitly by the ticket reporter; the ticket has been updated to record the override. The PIS rows in test/unit/Services/ResourceServiceTest.php are kept - that is a shared file covering many payment types, and those cases assert the id-string to class mapping that ResourceService still performs. Co-Authored-By: Claude Opus 5 (1M context) --- test/integration/PaymentTypes/PISTest.php | 81 ----------------------- 1 file changed, 81 deletions(-) delete mode 100755 test/integration/PaymentTypes/PISTest.php diff --git a/test/integration/PaymentTypes/PISTest.php b/test/integration/PaymentTypes/PISTest.php deleted file mode 100755 index 7646bd81b..000000000 --- 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); - } -}