All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Add
companyfield to\UnzerSDK\Resources\EmbeddedResources\Addressclass. - Add PHP 8.5 to supported versions in
composer.json.
- Allow
nullreturn forgetCompany()in\UnzerSDK\Resources\EmbeddedResources\Address. - Remove deprecated
curl_closeand\ReflectionMethod::setAccessiblecalls to address PHP 8.5 deprecation warnings. - Drop support for PHP 7.4 and PHP 8.0.
- Mark
\UnzerSDK\Resources\PaymentTypes\Giropayas deprecated.
- Add the SCA (Strong Customer Authentication) transaction type.
- Add class
\UnzerSDK\Resources\TransactionTypes\Sca. - Add methods in
\UnzerSDK\Unzerclass:performSca(Sca $sca, $paymentType, $customer = null, ?Metadata $metadata = null, ?Basket $basket = null): Sca- Perform an SCA transaction.fetchSca(Sca $sca): Sca- Fetch an SCA transaction.fetchScaById($payment, string $scaId): Sca- Fetch an SCA transaction by ID.chargeScaTransaction($payment, Charge $charge, $customer = null, ?Metadata $metadata = null, ?Basket $basket = null): Charge- Charge an SCA transaction.authorizeScaTransaction($payment, Authorization $authorization, $customer = null, ?Metadata $metadata = null, ?Basket $basket = null): Authorization- Authorize an SCA transaction.
- Add methods in
\UnzerSDK\Resources\Paymentclass:getSca(bool $lazy = false): ?Sca- Get the SCA transaction.setSca(Sca $sca): self- Set the SCA transaction.
- Add class
- Add
subscriptionAgreementproperty for v2 Paypage creation to\UnzerSDK\Resources\EmbeddedResources\Paypage\Urls
- Added chargeback handling for
fetchResourceFromEvent()method.
- Added support for payment method
Wero.
- Ensure type hints of nullable function parameters are explicitly defined as such to address deprecation warnings.
- Change paypage v2 test domain ending from ".io" to ".com".
- Add Styling properties for v2 Paypage
\UnzerSDK\Resources\V2\Paypage:basketBackgroundColorpaymentFormBackgroundColor
- Add prototypes for v2 Customer:
\UnzerSDK\Resources\V2\Customer. - Add prototypes for v3 Basket:
\UnzerSDK\Resources\V3\Basket.
- Add support for
preauthorizetransaction. - Enable PHP 8.4 in composer.json.
- Add support for Linkpay v2.
- Added support for Open Banking payment method.
- Update paypage v2 styling parameter to match API changes.
- Update paypage v2 styling parameter to match API changes.
Support for Paypage v2 is added to SDK.
- Added athorization for Paypage v2.
- Added
\UnzerSDK\Unzer::createPaypagemethod to create Paypage v2. - Added
\UnzerSDK\Unzer::fetchPaypageV2to fetch payment status information for the given Paypage v2.
Support for Click To Pay payment method is added to SDK.
- Added
\UnzerSDK\Resources\PaymentTypes\ClickToPaypayment method. - Added constant
\UnzerSDK\Constants\ExemptionType::TRANSACTION_RISK_ANALYSISfor exemption type "tra".
Twint payment method is added to SDK.
- Added
\UnzerSDK\Resources\PaymentTypes\Twintpayment method.
This version adds support for Google Pay.
- Add
\UnzerSDK\Resources\PaymentTypes\Googlepaypayment type. - Add Example for Google Pay.
- Add PHP 8.3 version to composer.json
Revert deprecation of Sepa Direct Debit type.
- Revert deprecation of
\UnzerSDK\Resources\PaymentTypes\SepaDirectDebit.
This version adds support for Paylater Direct Debit payment method.
- Add
\UnzerSDK\Resources\PaymentTypes\PaylaterDirectDebitpayment type. - Add Example for Direct Debit payment type.
- Add constants
\UnzerSDK\Constants\CustomerRegistrationLevelfor valid "registrationLevel" values. Relevant for setting riskData. - Add riskData to PaylaterInstallment example.
- Add riskData to PaylaterInvoice example.
- Add bank account information to
\UnzerSDK\Resources\PaymentTypes\Sofortclass.
- Allow
nullfor setters in\UnzerSDK\Traits\HasAccountInformationtrait to avoid error when e.g. API response contains empty bic. - Apple Pay example: Moved merchant identifier to constant in
_enableExamples.phpwhere it can be configured.
\UnzerSDK\Resources\PaymentTypes\SepaDirectDebit, please use\UnzerSDK\Resources\PaymentTypes\PaylaterDirectDebit.\UnzerSDK\Resources\PaymentTypes\SepaDirectDebitSecured, please use\UnzerSDK\Resources\PaymentTypes\PaylaterDirectDebit.
- Chargeback transaction type.
- Add class
\UnzerSDK\Resources\TransactionTypes\Chargeback. - Add methods
\UnzerSDK\Unzer::fetchChargebackand\UnzerSDK\Unzer::fetchChargebackByIdto fetch chargeback information.
- Add class
- Add
\UnzerSDK\Resources\PaymentTypes\PayUpayment type. - Add example for PayU payment type.
- Support for "Paylater Installment" payment type.
- Add payment type "PaylaterInstallment"
- Add
\UnzerSDK\Unzer::fetchPaylaterInstallmentPlansmethod to get available installment plans.
- Add "Paylater Installment" example.
\UnzerSDK\Resources\Payment::getCancellation, please usegetCancellationmethod of\UnzerSDK\Resources\TransactionTypes\Chargeor\UnzerSDK\Resources\TransactionTypes\Authorizationinstead, depending on your use-case.\UnzerSDK\Resources\PaymentTypes\InstallmentSecured, will be replaced by\UnzerSDK\Resources\PaymentTypes\PaylaterInstallmentin the future.
- Remove test-only constants and functions from
\UnzerSDK\Services\EnvironmentServiceand move them to\UnzerSDK\test\Helper\TestEnvironmentService. \UnzerSDK\Unzer::fetchPayPage()method no longer automatically fetches linked Paypage to avoid issues with expired payment pages.
- Add payment types "Post Finance Card" and "Post Finance eFinance".
- Add setter/getter to PayPage for
recurrenceTypeandexemptionType.
- Make setter and getter for
PayPage::AdditionalAttributespublic to allow adding information manually.
- Enable PHP version 8.2 in composer.json.
- Add paypage property to
Paymentclass. - Add class
\UnzerSDK\Resources\EmbeddedResources\CardTransactionData. Set as "card" field of additionalTransactionData - Add constants
\UnzerSDK\Constants\LiabilityShiftIndicatorfor valid liability shift indicator values, relevant for card payment.- Charge and authorize transactions with card can contain that indicator in Api Response. (
CardTransactionData::$liability)
- Charge and authorize transactions with card can contain that indicator in Api Response. (
- Switch SDK to 3-digit versioning. First digit, formerly representing API version gets omitted (1.3.0.0 -> 3.0.0).
- Add Type declaration to methods where applicable.
- Enable
Unzer::fetchPaymentRefundandUnzer::fetchPaymentReversalto use resource ID as parameter. - Raise minimum PHP version to 7.4 in composer.json
- Handling of additionalTransactionData:
additionalTransactionData.cardfrom API responses will be mapped on\UnzerSDK\Resources\EmbeddedResources\CardTransactionDatanow.- Remove
paymentTypeparameter of\UnzerSDK\Traits\HasRecurrenceType::setRecurrenceType, it will always be set forcardfield ofadditionalTransactionData.
- Resource ID fields won't be sent in payment request if they are empty anymore.
-
Add support for express checkout via PayPal.
- Add support to set
checkoutTypefor charge/authorize request. - Add transaction status
resumed. - Add
updateChargeandupdateAuthorizationmethod toUnzerclass
- Add support to set
-
Add missing "payment" webhook event.
-
Add
invoiceIdto Cancellation class.
- Marked unsecured
Invoiceclass as deprecated.
- Sandbox API-URL will automatically be used for API calls depending on the private key.
- Adjust calculations of
Unzer::cancelPaymentmethod to avoid float precision issues.
- Allow fetching payment type config for paylater invoice.
- Add payment type "Klarna".
- Provide Example for "Klarna" payment method.
- Add
languageproperty to Customer class which is required for klarna payments.
- Update UPL Invoice Example to display the "my consent" link in payment form.
- Update examples to display shortId on success page also for payments done via payment pages.
- Add background and logo image URLs to examples, which can be adjusted in the
_enableExamples.phpfile. - General adjustments of examples:
- Ensure all payment forms use correct css class.
- Place submit button into an extra div element.
- Disable submit button by default if a payment type has mandatory input fields.
- The
activateRecurringmethod for Card and SepaDirectDebit types is deprecated.- For Card recurring please use
Charge|Authorization::setRecurrenceTypeand perform a charge or authorization. - For Sepa Direct Debit a successful charge will automatically set the type resource as recurring.
- For Card recurring please use
- Add payment type Paylater Invoice.
- Add properties
companyTypeandownertoCompanyInfoclass. - Add
shippingTypeproperty toAddressclass. - Allow setting the clientIp manually.
- Allow setting
riskDatafor authorize request. - Allow setting shipping data for charge request such as
deliveryTrackingId,deliveryServiceandreturnTrackingId. - Add new methods for
authorizeandchargetransactions that use prepared objects only:Unzer::performAuthorization()Unzer::performCharge()Unzer::performChargeOnPayment()
- Add new methods to cancel payments done via paylater-invoice type:
Unzer::cancelAuthorizedPayment()Unzer::cancelChargedPayment()
- Add new methods to fetch cancellations of payment done via paylater-invoice type:
Unzer::fetchPaymentReversal()Unzer::fetchPaymentRefund()
- Add Paylater Invoice example including the function to capture an authorized payment.
- Remove redundant
currencyparameter fromUnzer::chargePayment()method. - Add
geoLocationproperty to all payment type classes. - Several minor improvements.
- Add account information coming from PAPI to Authorize class.
- Classes:
- Mark
InvoiceSecuredas deprecated, will be replaced byPaylaterInvoice.
- Mark
- Methods:
- Mark
Unzer::authorize()as deprecated. Please useUnzer::performAuthorization()instead. - Mark
Unzer::charge()as deprecated. Please useUnzer::performCharge()instead. - Mark
Unzer::chargePayment()as deprecated. Please useUnzer::performChargeOnPayment()instead. - Mark
Unzer::chargeAuthorization()as deprecated. Please useUnzer::performChargeOnPayment()instead.
- Mark
- Add Support for basket
v2resource.
- Add support for payment state
createwhich can occur when using payment pages. - Examples:
- Use
v2/basketresource for secured payment methods and payment pages. - Remove broken image-URLs of payment page examples.
- Use
- Several minor improvements.
- Enable PHP 8.1 compatibility.
- Fix an issue that can cause an exception when fetching a payment that contained a "cancel-authorize" transaction even though the payment has no authorization transaction.
- Update broken documentation links in readme.
- Several minor improvements.
- Added Apple Pay example.
- Adjust
cancelAmountlogic to work properly with Invoice Secured payments. - Updated jQuery and frameworks used in examples.
- Fixed failing card tests.
- Several minor improvements.
- Enable recurrence type to be set for
charge,authorizeandactivateRecurringPaymentmethods.
- Enable recurring examples (card paypal)to trigger subsequent transaction from success page.
- Enable card recurring example to use recurrence type.
- Several minor improvements.
- Enable PHP 8.0 compatibility.
- Allow PHPUnit version 8.x and 9.x in composer dev requirements and adjust tests accordingly.
- Payment Page examples: Add missing customer information that are required for payment with Instalment (address, dob, salutation).
\UnzerSDK\Services\HttpService::handleErrorsexplicitly casts response code to int, to ensure same behaviour on all PHP versions.- Several minor changes.
- Introduce the payment type Applepay.
- Examples:
- Card Examples - Ensure that error messages are displayed just one time.
- Configuration - Change default protocol to https.
- Configuration - Correct vendor name of path constant
UNZER_PAPI_FOLDER.
- Update documentation links.
- Change debug logging of failed tests that depend on another one to work as expected.
- PayPal recurring example: Response handling changed to check the recurring status of the payment type.
- Extended testing for Instalment payment type.
- Cards (extended) example using email UI element.
- Remove PhpUnit 8 support.
- Card recurring example using email UI element.
- Card example and paypage examples use a dummy customer-email to ensure they work with 3ds2.
- Several minor changes.
- Add email property to payment type
cardto meet 3Ds2.x regulations. - Several minor changes.
- Rebranding of the SDK.
- Removed payment type string from URL when fetching a payment type resource.
- Replace payment methods guaranteed/factoring by secured payment methods, i.e.:
InvoiceGuaranteedandInvoiceFactoringreplaced byInvoiceSecured.SepaDirectDebitGuaranteedreplaced bySepaDirectDebitSecured.HirePurchaseDirectDebitreplaced byInstallmentSecured.- Basket is now mandatory for all those payment types above.
- Added mapping of old payment type ids to the new payment type resources.
- Constant in
\UnzerSDK\Constants\ApiResponseCodesgot renamed:API_ERROR_IVF_REQUIRES_CUSTOMERrenamed toAPI_ERROR_FACTORING_REQUIRES_CUSTOMER.API_ERROR_IVF_REQUIRES_BASKETrenamed toAPI_ERROR_FACTORING_REQUIRES_BASKET.
- Several minor changes.
- Remove deprecated methods:
- getAmountTotal
- setAmountTotal
- getCardHolder
- setHolder
- cancel
- cancelAllCharges
- cancelAuthorization
- getResource
- fetchResource
- Remove deprecated constants:
- API_ERROR_AUTHORIZE_ALREADY_CANCELLED
- API_ERROR_CHARGE_ALREADY_CHARGED_BACK
- API_ERROR_BASKET_ITEM_IMAGE_INVALID_EXTENSION
- ENV_VAR_NAME_DISABLE_TEST_LOGGING