From 1a54f7444407d5f384917fffcc666fc9e905d201 Mon Sep 17 00:00:00 2001 From: David Owusu Date: Thu, 5 Nov 2026 13:14:07 +0100 Subject: [PATCH 1/2] [CC-4253] Deprecate Sofort and remaining payment-type enum constants Add class-level @Deprecated to Sofort (mirroring Giropay) and @Deprecated to the un-annotated PaymentTypeEnum constants SOFORT, GIROPAY, INVOICE and HIRE_PURCHASE_RATE_PLAN. Internal PaymentService dispatch branches are left unannotated, consistent with the already-deprecated constants. PIS is intentionally untouched (handled by CC-4065). Changelog updated under [Unreleased]. Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 10 ++++++++++ .../unzer/payment/paymenttypes/PaymentTypeEnum.java | 4 ++++ .../java/com/unzer/payment/paymenttypes/Sofort.java | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60b496dc..6e51f6ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Deprecated + +* Deprecated Sofort payment type (`com.unzer.payment.paymenttypes.Sofort`). +* Deprecated `PaymentTypeEnum.SOFORT`. +* Deprecated `PaymentTypeEnum.GIROPAY`. +* Deprecated `PaymentTypeEnum.INVOICE`. Use `PaymentTypeEnum.UNZER_PAYLATER_INVOICE` (`com.unzer.payment.paymenttypes.PaylaterInvoice`) instead. +* Deprecated `PaymentTypeEnum.HIRE_PURCHASE_RATE_PLAN`. Use `PaymentTypeEnum.PAYLATER_INSTALLMENT` (`com.unzer.payment.paymenttypes.PaylaterInstallment`) instead. + ## [5.9.0](https://github.com/unzerdev/java-sdk/compare/5.8.2..5.9.0) ### Added diff --git a/src/main/java/com/unzer/payment/paymenttypes/PaymentTypeEnum.java b/src/main/java/com/unzer/payment/paymenttypes/PaymentTypeEnum.java index 641eaf86..ca9a9fcb 100644 --- a/src/main/java/com/unzer/payment/paymenttypes/PaymentTypeEnum.java +++ b/src/main/java/com/unzer/payment/paymenttypes/PaymentTypeEnum.java @@ -6,9 +6,11 @@ public enum PaymentTypeEnum { CARD("crd"), CLICK_TO_PAY("ctp"), EPS("eps"), + @Deprecated GIROPAY("gro"), GOOGLE_PAY("gop"), IDEAL("idl"), + @Deprecated INVOICE("ivc"), @Deprecated INVOICE_GUARANTEED("ivg"), @@ -25,11 +27,13 @@ public enum PaymentTypeEnum { SEPA_DIRECT_DEBIT_GUARANTEED("ddg"), @Deprecated SEPA_DIRECT_DEBIT_SECURED("dds"), + @Deprecated SOFORT("sft"), PIS("pis"), ALIPAY("ali"), WECHATPAY("wcp"), APPLEPAY("apl"), + @Deprecated HIRE_PURCHASE_RATE_PLAN("hdd"), @Deprecated INSTALLMENT_SECURED_RATE_PLAN("ins"), diff --git a/src/main/java/com/unzer/payment/paymenttypes/Sofort.java b/src/main/java/com/unzer/payment/paymenttypes/Sofort.java index 8510d3f1..7b29af83 100644 --- a/src/main/java/com/unzer/payment/paymenttypes/Sofort.java +++ b/src/main/java/com/unzer/payment/paymenttypes/Sofort.java @@ -11,6 +11,13 @@ import java.net.URL; import java.util.Currency; +/** + * Sofort business object + * + * @author Unzer E-Com GmbH + * @deprecated Sofort payment type is no longer supported and will be removed in a future version. + */ +@Deprecated public class Sofort extends BasePaymentType { @Override From 7a336e37595d966834b525df015a41bbae27a92c Mon Sep 17 00:00:00 2001 From: David Owusu Date: Thu, 5 Nov 2026 15:48:52 +0100 Subject: [PATCH 2/2] [CC-4253] Remove changelog entry; consolidated into CC-4252 release PR Changelog and version edits are scoped to the release ticket (CC-4252), so this feature branch no longer touches CHANGELOG and won't conflict. --- CHANGELOG.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e51f6ad..60b496dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,16 +6,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [Unreleased] - -### Deprecated - -* Deprecated Sofort payment type (`com.unzer.payment.paymenttypes.Sofort`). -* Deprecated `PaymentTypeEnum.SOFORT`. -* Deprecated `PaymentTypeEnum.GIROPAY`. -* Deprecated `PaymentTypeEnum.INVOICE`. Use `PaymentTypeEnum.UNZER_PAYLATER_INVOICE` (`com.unzer.payment.paymenttypes.PaylaterInvoice`) instead. -* Deprecated `PaymentTypeEnum.HIRE_PURCHASE_RATE_PLAN`. Use `PaymentTypeEnum.PAYLATER_INSTALLMENT` (`com.unzer.payment.paymenttypes.PaylaterInstallment`) instead. - ## [5.9.0](https://github.com/unzerdev/java-sdk/compare/5.8.2..5.9.0) ### Added