Version 2024 Upgrade Guide


Upgrading from a previous version is usually as simple as referencing the updated library versions. We have minimized breaking changes to ensure a straightforward upgrade process. The sections below offer helpful details for upgrading your project.

Download Products

This guide discusses changes to the 2024 version with technical details.

Contents

Upgrade Guide

Class and Namespace Capitalization

Class names have been capitalized in a standard way. In many editions no changes are required. Only affected editions have been listed. Please see below for details about the impact to each edition.

.NET

Component class names have been renamed to use a standard capitalization. For instance Fdmsretail and Tsysretail have been renamed to FDMSRetail and TSYSRetail. This change also applies to enum types that contain the component name. For instance FdmsretailIndustryTypes has been renamed to FDMSRetailIndustryTypes.

Java

Component class names have been renamed to use a standard capitalization. For instance Fdmsretail and Tsysretail classes have been renamed to FDMSRetail and TSYSRetail.

Exception Classes

In editions such as .NET where exception objects are instances of a class defined by the library, the exception classes have been consolidated to a single type. Previously exception classes existed for both individual components and the toolkit as a whole. The individual component exception classes have been removed across the board to simplify exception handling.

In addition, a new Source property has been added to all exception classes which reports the name of the component from which the exception was thrown.

The component specific exception classes such as DPaymentsSDKFdmsretailException have been removed. Update code to use DPaymentsSDKException. For instance:

The component specific exception classes such as DPaymentsSDKFdmsretailException have been removed. Update code to use DPaymentsSDKException. For instance: catch (DPaymentsSDKException ex) { Console.WriteLine(ex.Message); Console.WriteLine(ex.Code); Console.WriteLine(ex.Source); //Outputs "FDMSRetail" }
Java editions did not previously make use of component specific exceptions. However, the Source property is now available. For instance: catch (dpaymentssdk.DPaymentsSDKException ex) { System.out.println(ex.getMessage()); System.out.println(ex.getCode()); System.out.println(ex.getSource()); }
Component specific exception classes such as EdpaymentssdkFDMS have been removed. Update code to use EDPaymentsSDK. For instance: except on E:EDPaymentsSDK do begin ShowMessage(E.Message); ShowMessage(E.Code); ShowMessage(E.Source); end;
Component specific exception classes such as DPaymentsSDKFdmsretailError have been removed. Update code to use DPaymentsSDKError. For instance: except DPaymentsSDKError as e: print(e.message) print(e.code) print(e.source)
PHP is not affected by this change. Exceptions thrown by the component are of the standard Exception type. For instance: catch (Exception $ex) { echo $ex->getMessage(); }

C++ does not use exception objects, instead error handling is performed by checking the return code of methods, or by calling the component.GetLastError() and component.GetLastErrorCode() methods.

if (http.GetLastErrorCode()) { printf("[%i] %s\n", http.GetLastErrorCode(), http.GetLastError()); }

Included .NET Platforms

In version 2024 the lib\net40 directory contains a .NET 4.0 library suitable for Windows development and includes design-time support for Visual Studio. The lib\net6.0 directory contains a .NET 6.0 library designed for cross-platform support. The lib\netstandard2.0 directory contains a .NET Standard 2.0 library for use with older cross-platform applications.

The .NET Framework 2.0 library is no longer included by default, but is available on demand for legacy projects.

Upgrading to the latest version is designed to be a quick process and involve only minimal code changes while offering additional functionality and options for new and existing users. Please contact us at support@4dpayments.com with any questions or comments.

We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@4dpayments.com.