alt

Important information

Please be advised that there will be a scheduled downtime across our API network on November 05 and November 07, 2024. For more information, visit our platform status portal.:
- Scheduled maintenance on November 5, 2024
- Scheduled maintenance on November 7, 2024

Unzer

Migrate to Unzer Java SDK

Migrate from old heidelpay Java SDK to the new Unzer Java SDK.

About the migration

The new Unzer Java SDK works the same as the old heidelpay Java SDK, except for changes in:

  • Class names
  • Method names
  • Payment type names
  • Deprecated code
  • The LinkPay object
  • UI components

Download

Download the new Unzer Java SDK from the Maven Central Repository.

Dependency

The dependency for the new Unzer Java SDK is:

<!-- https://search.maven.org/artifact/com.unzer.payment/java-sdk/ -->
<dependency>
    <groupId>com.unzer.payment</groupId>
    <artifactId>java-sdk</artifactId>
    <version>x.x.x.x</version>
</dependency>

Migrate to Unzer Java SDK

To migrate to the new Unzer Java SDK, you need to update the code in your project.

All migration changes
To see all Java SDK migration changes, go here.

To migrate from the latest version of the old heidelpay Java SDK to the new Unzer Java SDK, implement the following changes (in any order).

Replace class and method names

In your project, replace the names of classes and methods.

This table shows examples of changes that you need to make:

All migration changes
To see all Java SDK migration changes, go here.

ElementOldNew
Prefix of fully qualified class namecom.heidelpaycom.unzer
Class namesHeidelpayUnzer
Method namesgetHeidelpaygetUnzer

This example shows how these changes apply to your payment integration:

Heidelpay heidelpay = new Heidelpay('s-priv-xxxxxxxxxx');

Paypal paypal = new Paypal();
paypal = (Paypal) heidelpay.createPaymentType(paypal);
Unzer unzer = new Unzer('s-priv-xxxxxxxxxx');

Paypal paypal = new Paypal();
paypal = (Paypal) unzer.createPaymentType(paypal);

Replace payment type names

Replace the following payment type names:

OldNew
InvoiceGuaranteedInvoiceSecured
InvoiceFactoringInvoiceSecured
SepaDirectDebitGuaranteedSepaDirectDebitSecured
HirePurchaseDirectDebitInstallmentSecured

Replace deprecated code

In your project, replace any code marked as deprecated in the heidelpay Java SDK.

The following methods were deprecated:

  • Paypage::getBasketImage
  • Paypage::setBasketImage
  • Paypage::getDescriptionMain
  • Paypage::setDescriptionMain
  • Paypage::getDescriptionSmall
  • Paypage::setDescriptionSmall
  • Paypage::getImpressumUrl
  • Paypage::setImpressumUrl
  • JsonPaypage::getBasketImage
  • JsonPaypage::setBasketImage
  • JsonPaypage::getDescriptionMain
  • JsonPaypage::setDescriptionMain
  • JsonPaypage::getDescriptionSmall
  • JsonPaypage::setDescriptionSmall
  • JsonPaypage::getImpressumUrl
  • JsonPaypage::setImpressumUrl

LinkPay object change

The ToString() method of the LinkPay object now returns a different object representation:

OldNew
net.hpcsoft.mgw.papi.api.linkpay.model.LinkPayResponsenet.hpcsoft.papi.api.linkpay.model.LinkPayResponse

Update your UI components

To update your UI components, go here.