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

EMVKeyMgr Component

Properties   Methods   Events   Configuration Settings   Errors  

The EMVKeyMgr component simplifies the process of downloading EMV public keys for FDMS Rapid Connect and Paymentech.

Syntax

DPayments.DPaymentsSDK.Emvkeymgr

Remarks

This component connects with either FDMS Rapid Connect or Paymentech to check the status of, and download EMV public key information.

To begin set Platform to specify FDMS Rapid Connect or Paymentech. Next set the appropriate merchant properties for the selected platform.

FDMS Rapid Connect

After calling GetKeyInfo the KeyFileCRC, KeyFileSize, and KeyFileDate should all be saved for use when calling CheckForUpdate at a later time.

To check whether an update is available set KeyFileCRC, KeyFileSize, and KeyFileDate to the values from the current key. If no values are known simply leave these empty. Call CheckForUpdate to determine if an update is applicable. The UpdateAvailable property will be populated and can be queried to determine if an update is available. If an update is available simply call GetKeyInfo to obtain the new public key information.

After calling GetKeyInfo the KeyDetails property will hold details about each of the keys returned.

The applicable properties and methods for FDMS Rapid Connect are:

Properties:

Methods:

EMVKeyMgr for FDMS Rapid Connect Code Example

emvkeymgr.TPPID = "AAA000";
emvkeymgr.MerchantTerminalNumber = "00000001";
emvkeymgr.MerchantId = "1234";
emvkeymgr.GroupId = "20001";
emvkeymgr.DatawireId = "00011122233344455566";
emvkeymgr.ApplicationId = "RAPIDCONNECTVXN";
emvkeymgr.URL = "https://stg.dw.us.fdcnet.biz/rc";

emvkeymgr.STAN = "112";
emvkeymgr.TransactionNumber = "120013";

emvkeymgr.KeyFileDate = "03262014120000";
emvkeymgr.KeyFileSize = 123; 
emvkeymgr.KeyFileCRC = "0000";

//Check if an update is available
emvkeymgr.CheckForUpdate();

if (emvkeymgr.UpdateAvailable)
{
  emvkeymgr.GetKeyInfo();

  //Save these values to provide in the next CheckForUpdate call
  string origKeyCRC = emvkeymgr.KeyFileCRC;
  int origKeySize = emvkeymgr.KeyFileSize;
  string origKeyDate = emvkeymgr.KeyFileDate;

  //Iterate over the key details
  for (int i = 0; i < emvkeymgr.KeyDetails.Count; i++)
  {
    Console.WriteLine("RID: " + emvkeymgr.KeyDetails[i].RID);
    Console.WriteLine("ExpDate: " + emvkeymgr.KeyDetails[i].ExpDate);
    Console.WriteLine("Index: " + emvkeymgr.KeyDetails[i].Index);
    Console.WriteLine("Checksum: " + emvkeymgr.KeyDetails[i].CheckSum);
    Console.WriteLine("Modulus: " + emvkeymgr.KeyDetails[i].Modulus);
    Console.WriteLine("Exponent: " + emvkeymgr.KeyDetails[i].Exponent);
    Console.WriteLine("********************************");
  }
}

Paymentech

Call the GetKeyInfo method to retrieve available public key information. After calling GetKeyInfo the KeyDetails property will hold details about each of the keys returned.

The applicable properties and methods for Paymentech are:

Properties:

Methods:

Events: EMVKeyMgr for Paymentech Code Example
emvkeymgr.Platform = EmvkeymgrPlatforms.kpPaymentech;
emvkeymgr.URL = "https://netconnectvar1.chasepaymentech.com/NetConnect/controller";
emvkeymgr.UserId = "userid";
emvkeymgr.Password = "password";
emvkeymgr.MerchantId = "700000000125";
emvkeymgr.MerchantTerminalNumber = "001";
emvkeymgr.ClientNumber = "0002";    

emvkeymgr.GetKeyInfo();

//Iterate over the key details
for (int i = 0; i < emvkeymgr.KeyDetails.Count; i++)
{
  Console.WriteLine("RID: " + emvkeymgr.KeyDetails[i].RID);
  Console.WriteLine("Index: " + emvkeymgr.KeyDetails[i].Index);
  Console.WriteLine("Checksum: " + emvkeymgr.KeyDetails[i].CheckSum);
  Console.WriteLine("Modulus: " + emvkeymgr.KeyDetails[i].Modulus);
  Console.WriteLine("Exponent: " + emvkeymgr.KeyDetails[i].Exponent);
  Console.WriteLine("Fallback Allowed: " + emvkeymgr.KeyDetails[i].FallbackAllowed);
  Console.WriteLine("********************************");
}

Property List


The following is the full list of the properties of the component with short descriptions. Click on the links for further details.

ApplicationIdIdentifies the merchant application to the Datawire System.
ClientNumberMerchant configuration property, assigned by Paymentech.
DatawireIdIdentifies the merchant to the Datawire System.
GroupIdThe Id assigned by FDMS to identify the merchant or group of merchants.
KeyDetailsA collection of public key details.
KeyFileCRCThe CRC-16 checksum of the EMV public key.
KeyFileDateThe creation date of the EMV public key.
KeyFileSizeThe total size of the EMV public key file in bytes.
MerchantIdA unique Id used to identify the merchant.
MerchantTerminalNumberUsed to identify a unique terminal within a merchant location.
PasswordPassword for authentication with the NetConnect Server .
PlatformThe processing platform.
ProxyA set of properties related to proxy access.
SequenceNumberSequence number of the transaction.
SSLAcceptServerCertInstructs the component to unconditionally accept the server certificate that matches the supplied certificate.
SSLCertThe certificate to be used during SSL negotiation.
SSLServerCertThe server certificate for the last established connection.
STANThe merchant assigned System Trace Audit Number(STAN).
TimeoutA timeout for the component.
TPPIDThird Party Processor Identifier assigned by FDMS.
TransactionNumberUniquely identifies the transaction.
UpdateAvailableWhether updated public key information is available.
URLLocation of the server to which requests are sent.
UserIdUserId for authentication with the NetConnect Server .

Method List


The following is the full list of the methods of the component with short descriptions. Click on the links for further details.

CheckForUpdateChecks the key status to see if an update is required.
ConfigSets or retrieves a configuration setting .
GetKeyInfoThis method retrieves the EMV public key information.

Event List


The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.

ConnectedFired immediately after a connection completes (or fails).
DataPacketInFired when receiving a data packet from the transaction server.
DataPacketOutFired when sending a data packet to the transaction server.
DisconnectedFired when a connection is closed.
ErrorInformation about errors during data delivery.
SSLServerAuthenticationFired after the server presents its certificate to the client.
SSLStatusShows the progress of the secure connection.
StatusShows the progress of the FDMS/Datawire connection.

Configuration Settings


The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.

KeyBlockSizeThe maximum block size when downloading the EMV public key.
KeyDataThe EMV public key data.
RawRequestReturns the request sent to the server for debugging purposes.
RawResponseReturns the response received from the server for debugging purposes.
AcceptEncodingUsed to tell the server which types of content encodings the client supports.
AllowHTTPCompressionThis property enables HTTP compression for receiving data.
AllowHTTPFallbackWhether HTTP/2 connections are permitted to fallback to HTTP/1.1.
AllowNTLMFallbackWhether to allow fallback from Negotiate to NTLM when authenticating.
AppendWhether to append data to LocalFile.
AuthorizationThe Authorization string to be sent to the server.
BytesTransferredContains the number of bytes transferred in the response data.
EncodeURLIf set to true the URL will be encoded by the component.
FollowRedirectsDetermines what happens when the server issues a redirect.
GetOn302RedirectIf set to true the component will perform a GET on the new location.
HTTPVersionThe version of HTTP used by the component.
HTTP2HeadersWithoutIndexingHTTP2 headers that should not update the dynamic header table with incremental indexing.
IfModifiedSinceA date determining the maximum age of the desired document.
KeepAliveDetermines whether the HTTP connection is closed after completion of the request.
LogLevelThe level of detail that is logged.
MaxHeadersInstructs component to save the amount of headers specified that are returned by the server after a Header event has been fired.
MaxHTTPCookiesInstructs component to save the amount of cookies specified that are returned by the server when a SetCookie event is fired.
MaxRedirectAttemptsLimits the number of redirects that are followed in a request.
NegotiatedHTTPVersionThe negotiated HTTP version.
OtherHeadersOther headers as determined by the user (optional).
ProxyAuthorizationThe authorization string to be sent to the proxy server.
ProxyAuthSchemeThe authorization scheme to be used for the proxy.
ProxyPasswordA password if authentication is to be used for the proxy.
ProxyPortPort for the proxy server (default 80).
ProxyServerName or IP address of a proxy server (optional).
ProxyUserA user name if authentication is to be used for the proxy.
TransferredDataThe contents of the last response from the server.
TransferredDataLimitThe maximum number of incoming bytes to be stored by the component.
TransferredHeadersThe full set of headers as received from the server.
UseChunkedEncodingEnables or Disables HTTP chunked encoding for transfers.
ChunkSizeSpecifies the chunk size in bytes when using chunked encoding.
UsePlatformHTTPClientWhether or not to use the platform HTTP client.
UserAgentInformation about the user agent (browser).
KerberosSPNThe Service Principal Name for the Kerberos Domain Controller.
ConnectionTimeoutSets a separate timeout value for establishing a connection.
FirewallAutoDetectTells the component whether or not to automatically detect and use firewall system settings, if available.
FirewallHostName or IP address of firewall (optional).
FirewallListenerIf true, the component binds to a SOCKS firewall as a server (IPPort only).
FirewallPasswordPassword to be used if authentication is to be used when connecting through the firewall.
FirewallPortThe TCP port for the FirewallHost;.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
KeepAliveTimeThe inactivity time in milliseconds before a TCP keep-alive packet is sent.
KeepAliveIntervalThe retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.
LingerWhen set to True, connections are terminated gracefully.
LingerTimeTime in seconds to have the connection linger.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe port in the local host where the component binds.
MaxLineLengthThe maximum amount of data to accumulate when no EOL is found.
MaxTransferRateThe transfer rate limit in bytes per second.
ProxyExceptionsListA semicolon separated list of hosts and IPs to bypass when using a proxy.
TCPKeepAliveDetermines whether or not the keep alive socket option is enabled.
UseIPv6Whether to use IPv6.
UseNTLMv2Whether to use NTLM V2.
CloseStreamAfterTransferIf true, the component will close the upload or download stream after the transfer.
TcpNoDelayWhether or not to delay when sending packets.
CACertFilePathsThe paths to CA certificate files when using Mono on Unix/Linux.
LogSSLPacketsControls whether SSL packets are logged when using the internal security API.
ReuseSSLSessionDetermines if the SSL session is reused.
SSLCipherStrengthThe minimum cipher strength used for bulk encryption.
SSLEnabledProtocolsUsed to enable/disable the supported security protocols.
SSLIncludeCertChainWhether the entire certificate chain is included in the SSLServerAuthentication event.
SSLProviderThe name of the security provider to use.
SSLSecurityFlagsFlags that control certificate verification.
SSLEnabledCipherSuitesThe cipher suite to be used in an SSL negotiation.
TLS12SignatureAlgorithmsDefines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True.
TLS12SupportedGroupsThe supported groups for ECC.
TLS13KeyShareGroupsThe groups for which to pregenerate key shares.
TLS13SupportedGroupsThe supported groups for (EC)DHE key exchange.
TLS13SignatureAlgorithmsThe allowed certificate signature algorithms.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
ConnectionTimeoutSets a separate timeout value for establishing a connection.
FirewallAutoDetectTells the component whether or not to automatically detect and use firewall system settings, if available.
FirewallHostName or IP address of firewall (optional).
FirewallListenerIf true, the component binds to a SOCKS firewall as a server (IPPort only).
FirewallPasswordPassword to be used if authentication is to be used when connecting through the firewall.
FirewallPortThe TCP port for the FirewallHost;.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
KeepAliveTimeThe inactivity time in milliseconds before a TCP keep-alive packet is sent.
KeepAliveIntervalThe retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.
LingerWhen set to True, connections are terminated gracefully.
LingerTimeTime in seconds to have the connection linger.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe port in the local host where the component binds.
MaxLineLengthThe maximum amount of data to accumulate when no EOL is found.
MaxTransferRateThe transfer rate limit in bytes per second.
ProxyExceptionsListA semicolon separated list of hosts and IPs to bypass when using a proxy.
TCPKeepAliveDetermines whether or not the keep alive socket option is enabled.
UseIPv6Whether to use IPv6.
UseNTLMv2Whether to use NTLM V2.
CloseStreamAfterTransferIf true, the component will close the upload or download stream after the transfer.
TcpNoDelayWhether or not to delay when sending packets.
CACertFilePathsThe paths to CA certificate files when using Mono on Unix/Linux.
LogSSLPacketsControls whether SSL packets are logged when using the internal security API.
ReuseSSLSessionDetermines if the SSL session is reused.
SSLCipherStrengthThe minimum cipher strength used for bulk encryption.
SSLEnabledProtocolsUsed to enable/disable the supported security protocols.
SSLIncludeCertChainWhether the entire certificate chain is included in the SSLServerAuthentication event.
SSLProviderThe name of the security provider to use.
SSLSecurityFlagsFlags that control certificate verification.
SSLEnabledCipherSuitesThe cipher suite to be used in an SSL negotiation.
TLS12SignatureAlgorithmsDefines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True.
TLS12SupportedGroupsThe supported groups for ECC.
TLS13KeyShareGroupsThe groups for which to pregenerate key shares.
TLS13SupportedGroupsThe supported groups for (EC)DHE key exchange.
TLS13SignatureAlgorithmsThe allowed certificate signature algorithms.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
GUIAvailableTells the component whether or not a message loop is available for processing events.
UseBackgroundThreadWhether threads created by the component are background threads.
UseInternalSecurityAPITells the component whether or not to use the system security libraries or an internal implementation.

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