4D Payments SDK 2016 .NET Edition

Questions / Feedback?

Sale Method

Performs a sale transaction.


public void Sale();
Public Sub Sale()


This method performs a sale transaction. Once a sale is performed no further action is needed, the funds will automatically be captured by FDMS.

After this method returns check the value of Code to determine if the transaction was successful.

Important Note: You must ping your list of service provider URLs and update the URL property to the service provider with the shortest response time every 100 transactions, as well as when your application initially starts. This is not a normal ICMP ping - to determine the fastest transaction URL you must use the special Ping method inside the FDMSRegister component. (You may update your list of service provider URLs with the FDMSRegister component's ServiceDiscovery method).

ECommerce Sale Code Example

fdmsrcecommerce.IndustryType = FdmsrcecommerceIndustryTypes.fitEcommerce;
fdmsrcecommerce.TPPID = "AAA000";
fdmsrcecommerce.MerchantTerminalNumber = "00000001";
fdmsrcecommerce.MerchantId = "1234";
fdmsrcecommerce.MerchantURL = "mywebsite";
fdmsrcecommerce.GroupId = "20001";
fdmsrcecommerce.DatawireId = "00011122233344455566";
fdmsrcecommerce.ApplicationId = "RAPIDCONNECTVXN";
fdmsrcecommerce.URL = "https://stg.dw.us.fdcnet.biz/rc";

fdmsrcecommerce.STAN = "112";
fdmsrcecommerce.TransactionNumber = "120013";
fdmsrcecommerce.OrderNumber = "12000503";
fdmsrcecommerce.ReferenceNumber = "123";

fdmsrcecommerce.Card.Number = "36185900055556";
fdmsrcecommerce.Card.ExpMonth = 4;
fdmsrcecommerce.Card.ExpYear = 2016;
fdmsrcecommerce.Card.CVVData = "123";

fdmsrcecommerce.CustomerAddress = "1307 Broad Hollow Road";
fdmsrcecommerce.CustomerZip = "11747";

fdmsrcecommerce.TransactionAmount = "1200";

//Save the detail aggregate to use with Capture or Reverse later
string aggregate = fdmsrcecommerce.GetDetailAggregate();

.NET Standard Notes

To call this method in an asynchronous manner call SaleAsync instead. When the method completes (or an error is encountered) the SaleCompleted event will fire.

Copyright (c) 2021 4D Payments Inc. - All rights reserved.
4D Payments SDK 2016 .NET Edition - Version 16.0 [Build 7809]