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.
- Require PHP 8.1 minimum
- Fix the tests
- Remove deprecation warnings
- Require PHP 7.1 minimum
- Fix the tests
- Properly support Guzzle 6 & 7
- Support case-insensitive HTTP headers.
4.2.3 - 2020-02-14
- HTTP Transport: Oceania Base URLs (playground and production)
4.2.2 - 2019-11-05
- Remove "src" folder from a PSR4 autoload definition as fallback directory.
4.2.1 - 2019-10-15
- Test against php 7.3
- CURL Transport: Add processing of multiple HTTP headers in response.Caught exception: Response is missing a Content-Type header #44;
- Fix exception namespace and PHPDoc
- Stores the KEY ID field in order to restore the ID after fetching data without the KEY field. Payments Session ID is reset after fetch() #37
4.2.0 - 2019-06-11
This release has a number of [no-backward-compatibility] flags. But these incompatible changes related
only to the "under the hood" files. It means, if you operate only with high-level instances, like
Connector
and Rest\
/Checkout/Payments/OrderManagement/etc
resources (you have the code,
like in the example files) - you are safe for upgrade.
If you have your own implementation of REST API Services, HTTP Transport or Base Resource instance, you need to check the code before go live.
- Add new HTTP Transport
CURLTransport
. This transport does not require any package dependencies - Add PHP SDK SPL Autoloader
- Add
ApiResponse
class to unify an HTTP Transport reponse
- Decouple the HTTP Transport Connector interface. Remove Guzzle hardcoded dependency [no-backward-compatibility]
- Decouple
ConnectorException
. Remove Guzzle hardcoded dependency [partial-backward-compatibility]- Change the constructor signature. Replace
RequestException
exception withint $code
getResponse
method is not longer return GuzzleResponseInterface
. This method marked as deprecated and returnnull
- Change the constructor signature. Replace
- Rename
Klarna/Rest/Transport/Connector.php
toKlarna/Rest/Transport/GuzzleConnector.php
to
make the name explicit. [backward-compatible] TheKlarna/Rest/Transport/Connector.php
still exists, but marked as deprecated - Change the structure and return values for all the methods in
GuzzleConnector
(exConnector
) to follow the new Connector interface. [no-backward-compatibility] - Exception throwing behavior: [partial-backward-compatibility]
GuzzleConnector
(exConnector
) no longer throws Guzzle relatedRuntimeException
exceptions. The Connector throws onlyRuntimeException
- The only two types of exceptions can be thrown by SDK now:
RuntimeException
ConnectorException
- Extend
ResponseValidator
withexpectSuccessfull
andisSuccessfull
methods. The methods allows to validate the reponse code and parse the Klarna Error Message if possible
4.1.5 - 2019-05-21
- Add
.gitattributes
file to remove needless load from composer imports - Examples: Add "How to set a discount" example.
- Remove unused phpunit/phpcov package;
- Examples: Checkout API: Add more callback URLs;
- Debug mode: Request body and headers were not displayed when getting 400 HTTP response code.
- Examples: Checkout API: Fix typo in the attachments file;
4.1.4 - 2019-03-15
- Add full support of Instant Shopping API
- Repo now has an Apache 2.0 LICENSE file on its root
- HTTP Transport: Add support of PUT method
- Examples: Add Instant Shopping examples.
- HTTP Transport: Stop throwing an exception when an API service return a bad structured Error;
4.1.3 - 2019-01-23
- HPP API: Add support for disabling an HPP session;
- Customer Token API: Add ability to use Klarna-Idempotency-Key when creating order
- Customer Token API: Add new feature: Update token status;
- Examples: Add example of changing the User-Agent.
4.1.2 - 2018-11-22
- Order management API threw Error Notice when fetching an order with refunds.
4.1.1 - 2018-10-31
- Add support of Merchant Card Service API
- HPP: HPP service changed API completely without backward compatibility. Adopt SDK to the new changes.
Mark
getSessionStatus
as@deprecated
. Replaced by fetch function. Return data was changed by HPP API service. [partial-backward-compatibility]
4.0.0 - 2018-08-27 (Major release)
OrderManagement
:- Add ability to fetch Captures;
- Add support of Refunds [partial-backward-compatibility];
- Add full support of Customer Token API;
- Add full support of Settlements API;
- Add full support of Payments API;
- Add full support of Hosted Payment Page API;
- Add 'Debug Mode' to be able to debug requests and responses;
- Put SDK References documentation to GH Pages: https://klarna.github.io/kco_rest_php/
- More Examples for all Klarna Services.
- OrderManagementAPI: Changed
refund
function. Before returned$this
, now returns -Refund
object; - OrderManagementAPI: Order object now has an
array
ofRefund
objects instead of just array of data. [backward-compatible]
- Fix: Settlements API Unexpected Header #15;
3.0.1 - 2017-01-16
- smaller fixes
3.0.0 - 2017-12-12
- support for guzzle >6.0
- NEW META-13 Allow for 201 response on refund - Joakim.L
2.1.0 - 2015-07-29
- NEW MINT-2262 Support Guzzle 5.x versions - Omer.K, Joakim.L
2.0.0 - 2015-06-10
- NEW MINT-2214 Add base URLs for North America - Joakim.L
- NEW MINT-2203 Use order id instead of URL for checkout orders - Joakim.L
1.0.1 - 2015-03-30
- NEW MINT-2097 Add apigen and custom styling - Petros.G
- FIX MINT-2002 Handle errors with an empty payload - David.K
- NEW MINT-1804 Support checkout v3 and ordermanagement v1 APIs - Joakim.L