Changelog
6.3.0 - 2026-05-29
Added
- Add typed response support for Online Payments v3.1 under the new `Paymentorder\V3` namespace
- Add `Client::setApiVersion()` and `getApiVersion()`; when an API version is set, the `Content-Type` header becomes `application/json;version=<version>` (default behaviour unchanged)
- Add v3.1 request classes `Paymentorder\V3\Request\{Purchase, Verify, UnscheduledPurchase, UpdateOrder, GetPaymentorder, TransactionCapture, TransactionCancel, TransactionReversal}`
- Add top-level v3.1 response DTO `Paymentorder\V3\Resource\PaymentOrder` (factory-resolved from the `paymentOrder` JSON key)
- Add post-purchase response wrapper `Paymentorder\V3\Resource\Response\PaymentorderResponse` with `getPaymentOrder()`, `getOperations()`, and a `getLatestFinancialTransaction()` convenience helper
- Add typed `Paid` resource (with `Details` sub-object) and `FinancialTransactions` resource (with `FinancialTransaction` items in a `FinancialTransactionsListCollection`)
- Add link-only sub-resource DTOs: `OrderItems`, `Urls`, `PayeeInfo`, `Payer`, `History`, `Failed`, `Aborted`, `Cancelled`, `Reversed`, `FailedAttempts`, `PostPurchaseFailedAttempts`, `Metadata` — all sharing `LinkResourceTrait`
- Add `Paymentorder\V3\Resource\Response\CallbackPayload` for typed parsing of v3.1 webhook bodies
- Add the field `countryCode` to the class `SwedbankPay\Api\Service\Paymentorder\Resource\PaymentorderPayer` with methods `PaymentorderPayer::setCountryCode()` and `::getCountryCode()` to allow passing the customer's country code to the API.

Fixed
- `ResourceFactory::findFileByNamespace()` now resolves resource classes via the active autoloader (`class_exists`) instead of a path-based `file_exists` check, fixing resolution when the SDK is consumed through tooling that prefixes namespaces (e.g. PHP-Scoper) without rewriting the on-disk directory layout
- Fix an issue where `SwedbankPay\Api\Service\Paymentorder\Resource\PaymentorderPayer::getLastName()` was incorrectly returning the first name.

6.2.0 - 2026-02-26
Added
- Add `setClientInfo()` and `getClientInfo()` for Paymentorder
- Add Constructor for `Paymentorder` that sets the ClientInfo with the Integration SDK name and version
- Add `ClientInfoInterface` interface with `getIntegrationSdkName()`, `getIntegrationSdkVersion()`, `getClientType()`, `setClientType()` `getPlatformName()`, `setPlatformName()`, `getPresentationSdkName()`, `setPresentationSdkName()`, `getPresentationSdkVersion()`, `setPresentationSdkVersion()`, `getIntegrationModuleName()`, `setIntegrationModuleName()`, `getIntegrationModuleVersion()` and `setIntegrationModuleVersion()` methods
- Add `ClientInfo` class implementing `ClientInfoInterface` with a constructor that sets the Integration SDK name and version, and methods to get and set the client type, platform name, presentation SDK name and version

6.1.0 - 2024-04-23
- Removed CURLOPT_CAINFO in the client

6.0.0 - 2023-04-17
Added
- Checkout v3 classes and methods
- Add `setImplementation()` and `getImplementation()` for Paymentorder
- Add classes `TransactionCancelV3`, `TransactionCaptureV3`, `TransactionReversalV3`
- Add methods `getFirstName()`, `setFirstName()`, `getLastName()`, `setLastName()`, `getDigitalProducts()`, `setDigitalProducts()`, `getShippingAddressRestrictedToCountryCodes()`, `setShippingAddressRestrictedToCountryCodes()` in `PaymentorderPayer`

5.6.0 - 2023-04-07
Added
- Add `setProductName()` and `getProductName()` for Paymentorder

Changelog
5.5.0 - 2023-03-11
Added
- Add UnscheduledPurchase for Paymentorder

5.4.1 - 2022-10-15
Fixed
- Fix deprecated warning in PHP 8

5.4.0 - 2022-08-15
Fixed
- Fix ArrayAccess deprecation notices on php 8.1

5.3.0 - 2022-06-15
Changed
- System User Agent Fixes
- Access Token masking in debug

5.2.0 - 2022-02-21
Changed
- Fixes for Windows Platform
- Update cacert.pem

5.1.0 - 2021-11-23
Added
- Add RestrictedToInstruments
- Add codeception tests

Changed
- Remove invalid usage of sprintf under PHP 8
- Change token name in exception message
- Suppress PHP warnings on is_readable

5.0.1 - 2021-08-31
Added
- PaymentorderPayeeInfo: getSubsite(), setSubsite()

Changed
- Updated `VerificationObject` class
- Updated `VerificationObjectInterface` interface

5.0.0 - 2021-06-04
Added
- PaymentCardholder: getBillingAddress(), setBillingAddress(), getAccountInfo(), setAccountInfo()
- PaymentPurchase: getRecurrenceToken(), setRecurrenceToken(), isGenerateRecurrenceToken(), setGenerateRecurrenceToken()
- PaymentRecur: getRecurrenceToken(), setRecurrenceToken()
- PaymentVerify: isGeneratePaymentToken(), setGeneratePaymentToken(), isGenerateRecurrenceToken(), setGenerateRecurrenceToken()
- Paymentorder: isGenerateUnscheduledToken(), setGenerateUnscheduledToken(), getRecurrenceToken(), setRecurrenceToken()
- `CardholderAccountInfo` class
- `PaymentPrefillInfo` class
- Added resources for Transaction in Payment response if it's expanded
- Added expands to build request endpoint

Changed
- Updated `Recur` class
- Updated `PaymentorderMetadata` class
- Renamed `CardholderShippingAddress` class to `CardholderAddress` class

4.0.1 - 2021-02-12
Added
- Add InitiatingSystemUserAgent for `Payment`
- Add InitiatingSystemUserAgent for `Paymentorder`

4.0.0 - 2020-12-15
Added
- Implemented classes which allows to test api credentials `Test`
- Support for MobilePay
- Support for Trustly
- Support for `metadata`
- 3-D Secure 2 fields to the SDK
- `setOperationRel()` and `getOperationRel()` for `Request` class
- `getPayerReference()` and `setPayerReference()` methods for `Paymentorder` class
- `Metadata` class
- `setReceiptReference()` and `getReceiptReference()` for `CaptureInterface` of Invoice
- Cardholder & RiskIndicator resources for Card payments
- RiskIndicator field to Paymentorder resource
- Payer & RiskIndicator resources for 3D Secure 2
- OrderItems, PaymentUrl & improves functionalities

Changed
- Renamed `setMerchantToken()` to `setAccessToken()` of `Client` class
- Got rid of the direct url building
- Added http code to `Exception` code
- Fixed a bug in `prefillInfo`.
- Added back the `Response` class that was removed before
- Removed `CreateAuthorization` for Vipps

3.4.0 - 2019-10-08
Added
- Adds request resources for creditcard, invoice, swish and vipps payment methods

Changed
- Reworked payment transactions resources for supporting 1-phase payments
