This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
The SDK has received major improvements to its architecture, and the error handling around network requests. As a result, most of the classes and functionality of the old architecture have been deprecated and will be removed in a future breaking release.
Please see the migration guide in the documentation folder to find more information about the new architecture.
Please note that additional classes, functions and properties have been deprecated which are not related to the architecture change.
Added:
- A new entry point for the SDK:
ConnectSDK
. It should be initialized by callinginitialize
. After that, an instance ofClientApi
can be obtained to make requests to the Connect API. Calling any other function onConnectSDK
before initialization was called will result in aConnectSDKError.connectSDKNotInitialized
error. Theprepare
function that used to be called viaSession
, has been made available throughConnectSDK.encryptPaymentRequest
. - Along with the new entry points, the following configuration classes were added:
ConnectSDKConfiguration
,PaymentConfiguration
andSessionConfiguration
- A new class that performs network requests with improved error handling is introduced:
ClientApi
. This class replaces most of the functionality of theSession
class. ConnectSDKError
has been added, a type of this error will be thrown in case an error occurs in the SDK.- A migration guide that explains how to work with the new architecture.
ApiErrorResponse
andApiErrorItem
classes have been added. These classes contain information about the error in the apiFailure callback.ConvertedAmountResponse
class has been added. This class contains the converted amount of a successful convert amount API call.- Raw String values were added to
AccountOnFileAttributeStatus
,FieldType
,FormElementType
andPreferredInputType
. These raw values are the values returned from the API and help determine which enum case should be set in its object. errorMessageIds
property toPaymentRequest
.errorMessageIds
property toPaymentProductField
.validateValue(PaymentRequest)
andvalidateValue(String)
functions toPaymentProductField
.applyMask(value)
function onPaymentProductField
.removeMask(value)
function onPaymentProductField
.maskedFieldValues
property onPaymentRequest
.ValidationErrorInvalidPaymentProduct
has been added. This object will be added to theerrorMessageIds
inPaymentRequest
when the request’s payment product is invalid.errorMessage
,paymentProductFieldId
andrule
properties to theValidationError
class and all its sub-classes.ValidationRule
protocol that contains validate functions.ValidationType
enum that contains all different validation types.validationType
andmessageId
properties to theValidator
class and all its sub-classes.deviceFingerprintEnabled
andallowsInstallments
properties toBasicPaymentProductGroup
.
Fixed:
- Fixed an issue with assigning the status of the
IINDetailsResponse
whereexistingButNotAllowed
status was set incorrectly.
Removed:
- The classes
CustomerDetails
andCustomerDetailsError
have been removed, as well as thecustomerDetails
method inC2SCommunicator
, andSession
. This functionality was not used by any payment products.
Changed:
- All domain model objects now implement the (de)codable protocol.
- The GooglePay product is no longer excluded when retrieving payment products.
PaymentProductGroup
now inherits fromBasicPaymentProductGroup
. You can still use all properties fromPaymentProductGroup
since these were already defined inBasicPaymentProductGroup
as well.- The GooglePay product is no longer excluded when retrieving payment products.
Deprecated:
Session
,C2SCommunicator
,C2SCommunicatorConfiguration
andAlamofireWrapper
have been deprecated in favour of the new SDK entry pointConnectSDK
and networking with improved error handling viaClientApi
.AssetManager
andFileManager
have been deprecated. Images will be loaded directly from their URL instead.Util
has been deprecated.Encryptor
andJOSEEncryptor
have been deprecated since they will be made internal to the SDK in a future release.SessionError
has been deprecated, aConnectSDKError
will be thrown instead.ResponseObjectSerializable
protocol has been deprecated since it is no longer needed with the new Codable structure. All the classes conforming to this protocol have itsinit(json)
initialisers deprecated too.- Empty initialiser
init()
has been deprecated for the following classes:AccountOnFileDisplayHints
,BasicPaymentProductsGroups
,BasicPaymentProducts
,DataRestrictions
,DirectoryEntries
,Validator
,ValidatorEmailAddress
,ValidatorExpirationDate
,ValidatorIBAN
,ValidatorLength
,ValidatorLuhn
,ValidatorResidentIdNumber
andValidatorTermsAndConditions
. - The following initialisers have also been deprecated:
IINDetail.init(String, Bool)
,IINDetailsResponse.init(IINStatus)
,IINDetailsResponse.init(String, IINStatus, [IINDetail], String, Bool)
,DisplayElement.init(String, DisplayElementType, String)
,PaymentItems.init(BasicPaymentProducts, BasicPaymentProductGroups?)
,ValidatorFixedList.init([String])
,ValidatorLength.init(Int?, Int?)
,ValidatorRange.init(Int?, Int?)
andValidatorRegularExpression.init(NSRegularExpression)
. CustomerDetailsError
class has been deprecated. Errors returned from the API for the Customer Details call - and all other calls - will be stored in anApiErrorResponse
object instead.numberFormatter
andnumericStringCheck
properties inPaymentProductField
have been deprecated.errors
inPaymentRequest
has been deprecated, useerrorMessageIds
instead.errors
inPaymentProductField
has been deprecated, useerrorMessageIds
instead.validateValue(value, for)
has been deprecated forValidator
and all its sub-classes. UsevalidateValue(for)
orvalidateValue(value)
instead.validate(value, for)
has been deprecated forValidator
and all its sub-classes. Usevalidate(field, in)
instead.- The
ValidationErrorInteger
andValidationErrorNumericString
classes have been deprecated. - ‘acquirerCountry
on
BasicPaymentProductGroup` has been deprecated, since it is not returned from the API. allowsTokenization
,allowsRecurring
andautoTokenized
onPaymentProductGroup
have been deprecated, since these are not returned from the API.