Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

5.13.0

Latest
Compare
Choose a tag to compare
@IngenicoEPayments IngenicoEPayments released this 15 Feb 15:40
· 1 commit to master since this release

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 calling initialize. After that, an instance of ClientApi can be obtained to make requests to the Connect API. Calling any other function on ConnectSDK before initialization was called will result in a ConnectSDKError.connectSDKNotInitialized error. The prepare function that used to be called via Session, has been made available through ConnectSDK.encryptPaymentRequest.
  • Along with the new entry points, the following configuration classes were added: ConnectSDKConfiguration, PaymentConfiguration and SessionConfiguration
  • A new class that performs network requests with improved error handling is introduced: ClientApi. This class replaces most of the functionality of the Session 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 and ApiErrorItem 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 and PreferredInputType. These raw values are the values returned from the API and help determine which enum case should be set in its object.
  • errorMessageIds property to PaymentRequest.
  • errorMessageIds property to PaymentProductField.
  • validateValue(PaymentRequest) and validateValue(String) functions to PaymentProductField.
  • applyMask(value) function on PaymentProductField.
  • removeMask(value) function on PaymentProductField.
  • maskedFieldValues property on PaymentRequest.
  • ValidationErrorInvalidPaymentProduct has been added. This object will be added to the errorMessageIds in PaymentRequest when the request’s payment product is invalid.
  • errorMessage, paymentProductFieldId and rule properties to the ValidationError class and all its sub-classes.
  • ValidationRule protocol that contains validate functions.
  • ValidationType enum that contains all different validation types.
  • validationType and messageId properties to the Validator class and all its sub-classes.
  • deviceFingerprintEnabled and allowsInstallments properties to BasicPaymentProductGroup.

Fixed:

  • Fixed an issue with assigning the status of the IINDetailsResponse where existingButNotAllowed status was set incorrectly.

Removed:

  • The classes CustomerDetails and CustomerDetailsError have been removed, as well as the customerDetails method in C2SCommunicator, and Session. 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 from BasicPaymentProductGroup. You can still use all properties from PaymentProductGroup since these were already defined in BasicPaymentProductGroup as well. 
  • The GooglePay product is no longer excluded when retrieving payment products.

Deprecated:

  • Session, C2SCommunicator, C2SCommunicatorConfiguration and AlamofireWrapper have been deprecated in favour of the new SDK entry point ConnectSDK and networking with improved error handling via ClientApi.
  • AssetManager and FileManager have been deprecated. Images will be loaded directly from their URL instead.
  • Util has been deprecated.
  • Encryptor and JOSEEncryptor have been deprecated since they will be made internal to the SDK in a future release.
  • SessionError has been deprecated, a ConnectSDKError 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 its init(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 and ValidatorTermsAndConditions.
  • 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?) and ValidatorRegularExpression.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 an ApiErrorResponse object instead.
  • numberFormatter and numericStringCheck properties in PaymentProductField have been deprecated.
  • errors in PaymentRequest has been deprecated, use errorMessageIds instead.
  • errors in PaymentProductField has been deprecated, use errorMessageIds instead.
  • validateValue(value, for) has been deprecated for Validator and all its sub-classes. Use validateValue(for) or validateValue(value) instead.
  • validate(value, for) has been deprecated for Validator and all its sub-classes. Use validate(field, in) instead.
  • The ValidationErrorInteger and ValidationErrorNumericString classes have been deprecated.
  • ‘acquirerCountryonBasicPaymentProductGroup` has been deprecated, since it is not returned from the API.
  • allowsTokenization, allowsRecurring and autoTokenized on PaymentProductGroup have been deprecated, since these are not returned from the API.