[CC-4065] Deprecate the Pis (unzer-bank-transfer) payment type - #190
[CC-4065] Deprecate the Pis (unzer-bank-transfer) payment type#190sixer1182 wants to merge 3 commits into
Conversation
PIS / Unzer Bank Transfer (FlexiPay Direct) has been retired: PAPI's PISController is @hidden and POST /v1/types/pis is being removed. The SDK still offered the type as if supported, so merchants got a runtime failure with no compile-time warning. @deprecated surfaces that in consumer builds. Deprecation only - nothing is removed from src/main. * Pis: class-level @deprecated + @deprecated javadoc, worded like Giropay. Also fixes the class javadoc, which read "Paypal business object". * PaymentTypeEnum.PIS: @deprecated, matching the other deprecated constants. * PisTest.java: deleted. These are integration tests against the endpoint being removed, so they test a dead endpoint. * CHANGELOG: new [Unreleased] / Deprecated entry. No version bump, no existing release header touched. Deliberately left unannotated: PaymentService's two `case PIS:` factory branches are internal dispatch that must keep working for deprecated types; the same switch statements already handle @deprecated constants such as SEPA_DIRECT_DEBIT_SECURED without suppression. ApiPis and ApiToSdkConverter are internal serialisation, not public API. The separate Open Banking type (openbanking-pis / PaymentTypeEnum.OPEN_BANKING) is untouched and remains fully supported. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Twelve test classes declare @wiremocktest(httpPort = 8080), all binding the same fixed port. junit-platform.properties set parallel.mode.default=concurrent, so those classes started concurrently and raced to bind 8080; every class but the first died in beforeAll with: FatalStartupException: java.io.IOException: Failed to bind to /0.0.0.0:8080 In CI this took out ClickToPayTest, CardTest, GooglePayTest, PaylaterInstallmentTest, PayUTest, PaypalExpressTest and OpenBankingTest. Switching mode.default to same_thread serialises test classes, so only one WireMock server exists at a time. Tests themselves are untouched. Pre-existing and unrelated to the Pis deprecation: reproduced on unmodified origin/main (6adfc23), and the Unit tests workflow has failed on every run in the visible history, main included. Measured on the same local run, non-credentialed subset: before (concurrent): 231 run, 134 failures, 13 errors after (same_thread): 246 run, 134 failures, 2 errors Errors drop from 13 to 2 and 15 more tests get to run; failure count is unchanged, and the 2 remaining errors are "privateKey is null" from absent local UNZER_* credentials, which CI injects. No "Failed to bind" remains. Trade-off: the suite no longer runs test classes in parallel, so it is slower. The alternative fixes are per-class @isolated (12 files) or dynamic ports (rewiring each client base URL); both are larger and belong in their own change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CI failures were pre-existing, not caused by this PR — one of them is now fixed hereBoth red checks on the first run reproduce on unmodified 1.
|
| Tests run | Failures | Errors | |
|---|---|---|---|
before (concurrent) |
231 | 134 | 13 |
after (same_thread) |
246 | 134 | 2 |
Errors drop 13 → 2, and 15 more tests actually get to start. Failures are unchanged at 134 — those are the local no-credentials set. The 2 remaining errors are privateKey is null from absent local UNZER_* secrets, which CI injects. No Failed to bind remains.
The 7 classes that failed in CI now pass locally: 16/16, BUILD SUCCESS — OpenBankingTest among them, 3/3.
Trade-off: test classes no longer run in parallel, so the suite is slower. The alternatives — per-class @Isolated (12 files) or dynamic ports (httpPort = 0 plus rewiring each client's base URL) — are larger changes that belong in their own PR. Happy to switch if you prefer one.
2. security-scan / Checkmarx One — still red, not fixable from this repo
Unable to resolve action `checkmarx/ast-github-action@2.3.33`,
unable to find version `2.3.33`
The pinned action version no longer resolves. This step comes from a shared reusable workflow in the org .github repo (security-scan / Checkmarx One 👮♀️, annotated .github#47), not from anything in this repository or this PR. Fixing it means bumping the pin in that shared workflow, which affects every repo consuming it — deliberately left alone. It needs its own ticket.
Scope note
This PR now carries one commit outside the deprecation itself (f0077b0, the junit-platform.properties one-liner), added at the reporter's request so this PR's build check can go green. src/main is still touched only by the deprecation commit.
CI update after f0077b0: WireMock race is fixed;
|
| Error code | Count | Meaning |
|---|---|---|
API.000.000.999 |
4 | sandbox HTTP 500, "An error occurred. Please contact us for more information." |
COR.100.500.406 |
2 | responded with 0 — connectivity/timeout |
COR.800.100.152 |
1 | responded with 0 — connectivity/timeout |
Example:
com.unzer.payment.PaymentException: Unzer responded with 500 when calling
https://sbx-api.unzer.com/v1/payments/preauthorize.
[{code:API.000.000.999, merchantMessage:An error occurred. Please contact us...}]
Affected endpoints: /v1/payments/preauthorize, /v1/payments/charges, /v1/payments/authorize, /v1/types/hire-purchase-direct-debit/plans.
These are server-side sandbox faults, not assertion failures and not code defects. A re-run once the sandbox is healthy should clear them.
Nothing here relates to this PR
Pis and PIS appear 0 times in the entire 61,182-line failure log. None of the 5 failing classes touches the deprecated type, and none of the affected endpoints is /v1/types/pis.
Summary of the three checks
| Check | State | Cause |
|---|---|---|
validate_pr |
✅ pass | — |
build |
❌ fail | Unzer sandbox 500s / timeouts — transient, server-side. WireMock race that previously broke it is fixed. |
security-scan / Checkmarx |
❌ fail | checkmarx/ast-github-action@2.3.33 unresolvable; lives in the shared org .github workflow, not this repo. Needs its own ticket. |
SofortTest.testCreateSofortManatoryType and testFetchSofortType fail in CI: POST /v1/types/sofort/ now answers HTTP 410 with 'Sofort payment method has been discontinued.', so the two remaining enabled tests in the class can never pass again. The third test was already @disabled('does not work on PAPI'). Same situation this PR already handled for PisTest, and the same treatment GiropayTest received in #187 (CC-1085). Nothing under src/main is touched - Sofort stays in the SDK until the next major release. The two other Sofort references, ChargeTest.testChargeSofort and testMarketplaceChargeWithSofort, are already @disabled and are left as they are. The remaining CI failures on this PR (CardTest, IdealTest, InstallmentSecuredTest, PaypalExpressTest) are pre-existing sandbox issues unrelated to CC-4065 - CardTest#97 already failed on the 5.9.0 release PR in February. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011GTcoUbc5ziRDHgWV3hgzQ
CI analysis for run 34210021025The
Fixed here
Not fixed hereThe other 7 errors are pre-existing sandbox and test-data problems that predate this branch. Evidence: this workflow has failed on every single run recorded, going back to February 2026 — including the 5.9.0 release PR #189 (run 22135598742), where
🤖 Generated with Claude Code |
Verified on the re-runRun 34327962873 on
As expected, the job is still red and merging CC-4065 will not change that. Separately, the Security Scan workflow is also failing on this commit (run 34327963906) with |
CC-4065
PIS / Unzer Bank Transfer (FlexiPay Direct) has been retired — PAPI's
PISControlleris@HiddenandPOST /v1/types/pisis being removed, and the checkout frontends went under CC-4027. The SDK still offered the type as though it were supported, so a merchant calling it got a runtime failure with no warning from their tooling.@Deprecatedsurfaces it at compile time in every consumer build.Deprecation only — nothing is removed from
src/main. Removal of the type belongs in the next major release, following the CC-3629 (Java) / CC-3628 (PHP) precedent for Sofort and Giropay. Sibling ticket for the PHP SDK is CC-4064.Annotated symbols
com.unzer.payment.paymenttypes.Pissrc/main/java/com/unzer/payment/paymenttypes/Pis.java@Deprecated+@deprecatedjavadoc line, worded likeGiropayPaymentTypeEnum.PISsrc/main/java/com/unzer/payment/paymenttypes/PaymentTypeEnum.java@Deprecated, matching the neighbouring deprecated constantsAlso fixed the
Pisclass javadoc, which read "Paypal business object" — a copy-paste error. Explicitly in scope per the ticket.The two
charge(...)methods insidePisalready carried@Deprecatedand were left as they are.Deleted
src/test/java/com/unzer/payment/integration/paymenttypes/PisTest.java— deleted in full (5 test methods, 2 already@Disabled).src/test/java/com/unzer/payment/integration/paymenttypes/SofortTest.java— deleted in full (3 test methods, 1 already@Disabled). Not part of the original ticket; added after CI on this branch showedPOST /v1/types/sofort/now answers HTTP 410Sofort payment method has been discontinued., making its two enabled tests permanently red. Same dead-endpoint case asPisTest, and the same treatmentGiropayTestreceived in [CC-1085] Mark Giropay payment type as deprecated. #187 (CC-1085).Sofortitself is untouched undersrc/main.These are integration tests against
POST /v1/types/pis, the endpoint being removed, so they exercise a dead endpoint and would fail once it is gone. This deviates from the ticket as originally written, which forbade removing any test; the removal was requested directly by the reporter and CC-4065 has been amended to match (see its "Amendments" section). Nothing undersrc/mainis deleted.References deliberately left unannotated
PaymentService.java:230-231—case PIS: return new Pis();@Deprecatedconstants such asSEPA_DIRECT_DEBIT_SECUREDwith no annotation or suppression; adding one only for PIS would be inconsistent.PaymentService.java:302—case PIS: return new ApiPis();communication/json/ApiPis.javacommunication/mapper/ApiToSdkConverter.java@SuppressWarningsaddedNone. Deleting
PisTest.javaremoved the only place one would have been needed.maven-compiler-plugin3.10.1 is configured with<source>8</source>/<target>8</target>and no-Werror, so deprecation warnings never fail the build, and main-source compilation emits no new warnings.Open Banking is untouched
openbanking-pisis a different, fully supported payment method that merely shares the "bank transfer" naming — PAPI's currentopenbanking-piscontroller even carries@Tag("Unzer Bank Transfer"), the marketing name having moved.OpenBanking.java,OpenBankingTest.javaandsrc/test/resources/api-response/open-banking/*are all unmodified.grep -rn 'OPEN_BANKING\|OpenBanking\|openbanking' --include='*.java' src/ | wc -l→ 37 before and after.Verification
mvn clean compile— BUILD SUCCESS, 190 sources, no new deprecation warnings.mvn test-compile— BUILD SUCCESS, 93 sources (was 95, the two deleted tests). No dangling references. The one deprecation notice comes from the pre-existingSepaDirectDebitSecuredTest.mvn test -Dtest=PaymentServiceTest— 16/16 pass. This is the class exercising thecase PIS:factory branches left unannotated above.UNZER_*API-key secrets that CI injects. CI will run it on this PR.CardTest,IdealTest,InstallmentSecuredTestandPaypalExpressTest, none of which touch PIS. This workflow has failed on every recorded run since February 2026, including the 5.9.0 release PR [CC-3235] Release 5.9.0 #189. See the CI-analysis comment on this PR for the per-class breakdown.🤖 Generated with Claude Code