How to Use 4D Payments SDK 16.0 Build 6863 for Delphi .NET ActiveX COM Edition to Process Credit Card Transactions
4D Payments SDK is a set of components that allows developers to easily integrate credit card processing functionality into their applications. It supports direct communication with major Internet payment processors, such as FDMS, Paymentech, Global Payments, Heartland and TSYS, eliminating the need for intermediate gateways and fees. It also supports various transaction types, such as FSA/Healthcare, Retail, Grocery, Restaurant, Hotel/Lodging, Auto Rental, Direct Marketing, E-Commerce, Debit, EBT, GiftCard, Level II and Level III.
In this article, we will show you how to use 4D Payments SDK 16.0 Build 6863 for Delphi .NET ActiveX COM Edition to process credit card transactions in your Delphi applications. We will use the FDMSRetail component as an example, but you can use any other component that suits your processor and transaction type.
4D Payments SDK 16.0 Build 6863 for Delphi .NET ActiveX COM Edition
To install 4D Payments SDK 16.0 Build 6863 for Delphi .NET ActiveX COM Edition, you need to download the setup file from https://4dpayments.com/payments-sdk/ and run it on your machine. Follow the instructions on the screen to complete the installation. You will also need an approved merchant account with one of the supported processors.
Step 2: Add the FDMSRetail Component to Your Project
To add the FDMSRetail component to your project, open your Delphi IDE and create a new VCL Forms Application. Then, go to the Component menu and select Import Component. Choose Import ActiveX Control and click Next. From the list of registered ActiveX controls, select FDMSRetail and click Next. Choose Install to New Package and click Next. Enter a package name and click Next. Click Finish to create and install the package.
Now you can find the FDMSRetail component in the Tool Palette under the category that matches your package name. Drag and drop it onto your form. You can also rename it if you want.
Step 3: Configure the FDMSRetail Component Properties
To configure the FDMSRetail component properties, select it on your form and go to the Object Inspector. You need to set the following properties:
MerchantNumber: This is your merchant number assigned by your processor.
MerchantTerminalNumber: This is your terminal number assigned by your processor.
GroupId: This is your group ID assigned by your processor.
DatawireId: This is your Datawire ID assigned by your processor.
LiveTransactions: This determines whether you are sending live or test transactions. Set it to True for live transactions.
SSLAcceptServerCert: This is a certificate object that contains the server certificate that you trust. You can use the default one provided by the component or load your own.
SSLCert: This is a certificate object that contains your client certificate that you use to authenticate yourself to the server. You can use the default one provided by the component or load your own.
Timeout: This is the timeout value in seconds for sending and receiving data.
You can also set other properties that are optional or specific to your transaction type, such as InvoiceNumber, CustomerNumber, TaxAmount, etc. For more details on each property, please refer to the online documentation at https://cdn.nsoftware.com/help/TSY/fdmsretail.htm.
Step 4: Process a Credit Card Transaction
To process a credit card transaction, you need to set some properties of the FDMSRetail component that represent the transaction data, such as CardNumber, ExpMonth, ExpYear, Amount, etc. Then you need to call one 29c81ba772