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:
- ApplicationId
- DatawireId
- GroupId
- KeyDetails
- KeyFileCRC
- KeyFileDate
- KeyFileSize
- MerchantId
- MerchantTerminalNumber
- Platform
- STAN
- TPPID
- TransactionNumber
- UpdateAvailable
- URL
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("IndexStr: " + emvkeymgr.KeyDetails[i].IndexStr); 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 Exampleemvkeymgr.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("IndexStr: " + emvkeymgr.KeyDetails[i].IndexStr); 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.
ApplicationId | Identifies the merchant application to the Datawire System. |
ClientNumber | Merchant configuration property, assigned by Paymentech. |
DatawireId | Identifies the merchant to the Datawire System. |
GroupId | The Id assigned by FDMS to identify the merchant or group of merchants. |
KeyDetails | A collection of public key details. |
KeyFileCRC | The CRC-16 checksum of the EMV public key. |
KeyFileDate | The creation date of the EMV public key. |
KeyFileSize | The total size of the EMV public key file in bytes. |
MerchantId | A unique Id used to identify the merchant. |
MerchantTerminalNumber | Used to identify a unique terminal within a merchant location. |
Password | Password for authentication with the NetConnect Server . |
Platform | The processing platform. |
Proxy | A set of properties related to proxy access. |
SequenceNumber | Sequence number of the transaction. |
SSLAcceptServerCert | Instructs the component to unconditionally accept the server certificate that matches the supplied certificate. |
SSLCert | The certificate to be used during SSL negotiation. |
SSLServerCert | The server certificate for the last established connection. |
STAN | The merchant assigned System Trace Audit Number(STAN). |
Timeout | A timeout for the component. |
TPPID | Third Party Processor Identifier assigned by FDMS. |
TransactionNumber | Uniquely identifies the transaction. |
UpdateAvailable | Whether updated public key information is available. |
URL | Location of the server to which requests are sent. |
UserId | UserId 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.
CheckForUpdate | Checks the key status to see if an update is required. |
Config | Sets or retrieves a configuration setting. |
GetKeyInfo | This 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.
Connected | Fired immediately after a connection completes (or fails). |
DataPacketIn | Fired when receiving a data packet from the transaction server. |
DataPacketOut | Fired when sending a data packet to the transaction server. |
Disconnected | Fired when a connection is closed. |
Error | Information about errors during data delivery. |
SSLServerAuthentication | Fired after the server presents its certificate to the client. |
SSLStatus | Shows the progress of the secure connection. |
Status | Shows 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.
KeyBlockSize | The maximum block size when downloading the EMV public key. |
KeyData | The EMV public key data. |
RawRequest | Returns the request sent to the server for debugging purposes. |
RawResponse | Returns the response received from the server for debugging purposes. |
AcceptEncoding | Used to tell the server which types of content encodings the client supports. |
AllowHTTPCompression | This property enables HTTP compression for receiving data. |
AllowHTTPFallback | Whether HTTP/2 connections are permitted to fallback to HTTP/1.1. |
AllowNTLMFallback | Whether to allow fallback from Negotiate to NTLM when authenticating. |
Append | Whether to append data to LocalFile. |
Authorization | The Authorization string to be sent to the server. |
BytesTransferred | Contains the number of bytes transferred in the response data. |
ChunkSize | Specifies the chunk size in bytes when using chunked encoding. |
CompressHTTPRequest | Set to true to compress the body of a PUT or POST request. |
EncodeURL | If set to true the URL will be encoded by the component. |
FollowRedirects | Determines what happens when the server issues a redirect. |
GetOn302Redirect | If set to true the component will perform a GET on the new location. |
HTTP2HeadersWithoutIndexing | HTTP2 headers that should not update the dynamic header table with incremental indexing. |
HTTPVersion | The version of HTTP used by the component. |
IfModifiedSince | A date determining the maximum age of the desired document. |
KeepAlive | Determines whether the HTTP connection is closed after completion of the request. |
KerberosSPN | The Service Principal Name for the Kerberos Domain Controller. |
LogLevel | The level of detail that is logged. |
MaxHeaders | Instructs component to save the amount of headers specified that are returned by the server after a Header event has been fired. |
MaxHTTPCookies | Instructs component to save the amount of cookies specified that are returned by the server when a SetCookie event is fired. |
MaxRedirectAttempts | Limits the number of redirects that are followed in a request. |
NegotiatedHTTPVersion | The negotiated HTTP version. |
OtherHeaders | Other headers as determined by the user (optional). |
ProxyAuthorization | The authorization string to be sent to the proxy server. |
ProxyAuthScheme | The authorization scheme to be used for the proxy. |
ProxyPassword | A password if authentication is to be used for the proxy. |
ProxyPort | Port for the proxy server (default 80). |
ProxyServer | Name or IP address of a proxy server (optional). |
ProxyUser | A user name if authentication is to be used for the proxy. |
SentHeaders | The full set of headers as sent by the client. |
StatusLine | The first line of the last response from the server. |
TransferredData | The contents of the last response from the server. |
TransferredDataLimit | The maximum number of incoming bytes to be stored by the component. |
TransferredHeaders | The full set of headers as received from the server. |
TransferredRequest | The full request as sent by the client. |
UseChunkedEncoding | Enables or Disables HTTP chunked encoding for transfers. |
UseIDNs | Whether to encode hostnames to internationalized domain names. |
UsePlatformDeflate | Whether to use the platform implementation to decompress compressed responses. |
UsePlatformHTTPClient | Whether or not to use the platform HTTP client. |
UserAgent | Information about the user agent (browser). |
CloseStreamAfterTransfer | If true, the component will close the upload or download stream after the transfer. |
CloseStreamAfterTransfer | If true, the component will close the upload or download stream after the transfer. |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallHost | Name or IP address of firewall (optional). |
FirewallListener | If true, the component binds to a SOCKS firewall as a server (IPPort only). |
FirewallListener | If true, the component binds to a SOCKS firewall as a server (IPPort only). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
Linger | When set to True, connections are terminated gracefully. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The port in the local host where the component binds. |
LocalPort | The port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
MaxTransferRate | The transfer rate limit in bytes per second. |
ProxyExceptionsList | A semicolon separated list of hosts and IPs to bypass when using a proxy. |
ProxyExceptionsList | A semicolon separated list of hosts and IPs to bypass when using a proxy. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
TcpNoDelay | Whether or not to delay when sending packets. |
TcpNoDelay | Whether or not to delay when sending packets. |
UseIPv6 | Whether to use IPv6. |
UseIPv6 | Whether to use IPv6. |
UseNTLMv2 | Whether to use NTLM V2. |
UseNTLMv2 | Whether to use NTLM V2. |
CACertFilePaths | The paths to CA certificate files when using Mono on Unix/Linux. |
CACertFilePaths | The paths to CA certificate files when using Mono on Unix/Linux. |
LogSSLPackets | Controls whether SSL packets are logged when using the internal security API. |
LogSSLPackets | Controls whether SSL packets are logged when using the internal security API. |
ReuseSSLSession | Determines if the SSL session is reused. |
ReuseSSLSession | Determines if the SSL session is reused. |
SSLCACerts | A newline separated list of CA certificate to use during SSL client authentication. |
SSLCACerts | A newline separated list of CA certificate to use during SSL client authentication. |
SSLCheckCRL | Whether to check the Certificate Revocation List for the server certificate. |
SSLCheckCRL | Whether to check the Certificate Revocation List for the server certificate. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLEnabledCipherSuites | The cipher suite to be used in an SSL negotiation. |
SSLEnabledCipherSuites | The cipher suite to be used in an SSL negotiation. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLEnableRenegotiation | Whether the renegotiation_info SSL extension is supported. |
SSLEnableRenegotiation | Whether the renegotiation_info SSL extension is supported. |
SSLIncludeCertChain | Whether the entire certificate chain is included in the SSLServerAuthentication event. |
SSLIncludeCertChain | Whether the entire certificate chain is included in the SSLServerAuthentication event. |
SSLNegotiatedCipher | Returns the negotiated ciphersuite. |
SSLNegotiatedCipher | Returns the negotiated ciphersuite. |
SSLNegotiatedCipherStrength | Returns the negotiated ciphersuite strength. |
SSLNegotiatedCipherStrength | Returns the negotiated ciphersuite strength. |
SSLNegotiatedKeyExchange | Returns the negotiated key exchange algorithm. |
SSLNegotiatedKeyExchange | Returns the negotiated key exchange algorithm. |
SSLNegotiatedKeyExchangeStrength | Returns the negotiated key exchange algorithm strength. |
SSLNegotiatedKeyExchangeStrength | Returns the negotiated key exchange algorithm strength. |
SSLNegotiatedProtocol | Returns the negotiated protocol version. |
SSLNegotiatedProtocol | Returns the negotiated protocol version. |
SSLProvider | The name of the security provider to use. |
SSLProvider | The name of the security provider to use. |
SSLSecurityFlags | Flags that control certificate verification. |
SSLSecurityFlags | Flags that control certificate verification. |
SSLServerCACerts | A newline separated list of CA certificate to use during SSL server certificate validation. |
SSLServerCACerts | A newline separated list of CA certificate to use during SSL server certificate validation. |
TLS12SignatureAlgorithms | Defines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True. |
TLS12SignatureAlgorithms | Defines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True. |
TLS12SupportedGroups | The supported groups for ECC. |
TLS12SupportedGroups | The supported groups for ECC. |
TLS13KeyShareGroups | The groups for which to pregenerate key shares. |
TLS13KeyShareGroups | The groups for which to pregenerate key shares. |
TLS13SignatureAlgorithms | The allowed certificate signature algorithms. |
TLS13SignatureAlgorithms | The allowed certificate signature algorithms. |
TLS13SupportedGroups | The supported groups for (EC)DHE key exchange. |
TLS13SupportedGroups | The supported groups for (EC)DHE key exchange. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
BuildInfo | Information about the product's build. |
GUIAvailable | Tells the component whether or not a message loop is available for processing events. |
LicenseInfo | Information about the current license. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |