From 697b04595f0f14d23e7aa2ae14fa57bbd805624d Mon Sep 17 00:00:00 2001 From: "david.owusu" Date: Wed, 18 Feb 2026 17:01:26 +0100 Subject: [PATCH] [CC-3035] Mark Giropay as deprecated. --- src/Resources/PaymentTypes/Giropay.php | 1 + test/integration/PaymentTypes/GiropayTest.php | 79 ------------------- 2 files changed, 1 insertion(+), 79 deletions(-) delete mode 100755 test/integration/PaymentTypes/GiropayTest.php diff --git a/src/Resources/PaymentTypes/Giropay.php b/src/Resources/PaymentTypes/Giropay.php index 9d2a6f26e..975fea636 100755 --- a/src/Resources/PaymentTypes/Giropay.php +++ b/src/Resources/PaymentTypes/Giropay.php @@ -4,6 +4,7 @@ use UnzerSDK\Traits\CanDirectCharge; +/** @deprecated Giropay payment type is no longer supported and will be removed in a future version. */ class Giropay extends BasePaymentType { use CanDirectCharge; diff --git a/test/integration/PaymentTypes/GiropayTest.php b/test/integration/PaymentTypes/GiropayTest.php deleted file mode 100755 index c6b53510a..000000000 --- a/test/integration/PaymentTypes/GiropayTest.php +++ /dev/null @@ -1,79 +0,0 @@ -unzer->createPaymentType($giropay); - $this->assertInstanceOf(Giropay::class, $giropay); - $this->assertNotNull($giropay->getId()); - } - - /** - * Verify that an exception is thrown when giropay authorize is called. - * - * @test - */ - public function giroPayShouldThrowExceptionOnAuthorize(): void - { - $this->expectException(UnzerApiException::class); - $this->expectExceptionCode(ApiResponseCodes::API_ERROR_TRANSACTION_AUTHORIZE_NOT_ALLOWED); - - $giropay = $this->unzer->createPaymentType(new Giropay()); - $this->unzer->authorize(1.0, 'EUR', $giropay, self::RETURN_URL); - } - - /** - * Verify that GiroPay is chargeable. - * - * @test - */ - public function giroPayShouldBeChargeable(): void - { - /** @var Giropay $giropay */ - $giropay = $this->unzer->createPaymentType(new Giropay()); - $charge = $giropay->charge(1.0, 'EUR', self::RETURN_URL); - $this->assertNotNull($charge); - $this->assertNotNull($charge->getId()); - $this->assertNotEmpty($charge->getRedirectUrl()); - - $fetchCharge = $this->unzer->fetchChargeById($charge->getPayment()->getId(), $charge->getId()); - $this->assertEquals($charge->setCard3ds(false)->expose(), $fetchCharge->expose()); - } - - /** - * Verify a GiroPay object can be fetched from the api. - * - * @test - */ - public function giroPayCanBeFetched(): void - { - $giropay = $this->unzer->createPaymentType(new Giropay()); - $fetchedGiropay = $this->unzer->fetchPaymentType($giropay->getId()); - $this->assertInstanceOf(Giropay::class, $fetchedGiropay); - $this->assertEquals($giropay->getId(), $fetchedGiropay->getId()); - } -}