4D Payments SDK 2016 .NET Edition
4D Payments SDK 2016 .NET Edition
Questions / Feedback?

ServiceDiscovery Method

Retrieves transaction URLs from Datawire.

Syntax

[VB.NET]
Public Sub ServiceDiscovery(ByVal url As String)
[C#]
public void ServiceDiscovery(string url);

Remarks

Service Discovery is the means by which you retrieve the actual transaction URLs, used for making credit card authorizations and sending batch settlements.

For the North, Nashville, and Omaha platforms: The response to a successful call to the Register method will return a PrimaryDiscoveryURL and SecondaryDiscoveryURL. After the account has been activated, call the ServiceDiscovery method with either of these URLs as the URL parameter. A successful ServiceDiscovery will provide a list of Service Provider URL's necessary to transport transactions from the application through the Datawire VXN to the FDMS payment processor and back. This list of URL's returned will be stored in the ServiceProviders array property. You should Ping each of these URLs to determine which one has the shortest PingResponseTime, and use that URL for subsequent credit card transactions (note that you should re-Ping each of the URLs received in the ServiceProviders array every 100 transactions, and when first initializing your software).

For example:


  FDMSRegister.MerchantNumber = "000000999990";
  FDMSRegister.MerchantTerminalNumber = "555555";
  FDMSRegister.TransactionNumber = "0000001V002500"; //any unique number will do; check TransactionNumber property for format
  FDMSRegister.URL = "https://stagingsupport.datawire.net/staging_expresso/SRS.do";
  FDMSRegister.Register(); 
  FDMSRegister.TransactionNumber = "0000002V002500"; //any unique number will do; check TransactionNumber property for format
  FDMSRegister.Activate();
  FDMSRegister.ServiceDiscovery(FDMSRegister.PrimaryDiscoveryURL);
  for (int i = 0; i < FDMSRegister.ServiceProviders.Length; i++) {
    FDMSRegister.Ping(FDMSRegister.ServiceProviders[i]);
    Console.WriteLine(FDMSRegister.ServiceProviders[i] + " = " + FDMSRegister.PingResponseTime);
  }

For the Rapid Connect platform: ServiceDiscovery will be the first step in provisioning a merchant. FDMS will supply you with a MerchantNumber, MerchantTerminalNumber, and GroupId. After setting these properties, ServiceDiscovery should be called. The default URL, when URL parameter is set to "" (empty string), is "https://prod.dw.us.fdcnet.biz/sd/srsxml.rc". A successful ServiceDiscovery will provide the URL, accessible via URL, necessary to provision a merchant account.

For example:


  FDMSRegister.MerchantNumber = "000000999990";
  FDMSRegister.MerchantTerminalNumber = "555555";
  FDMSRegister.Config("GroupId=10001");
  FDMSRegister.TransactionNumber = "0000001VRC1234"; //any unique number will do; check TransactionNumber property for format
  FDMSRegister.ServiceDiscovery("https://prod.dw.us.fdcnet.biz/sd/srsxml.rc");
  FDMSRegister.ApplicationId = "RAPIDCONNECTSRS";
  FDMSRegister.TransactionNumber = "0000002VRC1234" //any unique number will do; check TransactionNumber property for format
  FDMSRegister.Register(); 
  FDMSRegister.TransactionNumber = "0000003VRC1234" //any unique number will do; check TransactionNumber property for format
  FDMSRegister.Activate();

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