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
TibcEMVKeyMgr
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 KeyDetail* properties 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("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 KeyDetail* properties 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://netconnectvar.paymentech.net/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.
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. |
KeyDetailCount | The number of records in the KeyDetail arrays. |
KeyDetailCheckSum | The checksum of the public key values. |
KeyDetailExpDate | The expiration date of the public key. |
KeyDetailExponent | The exponent of the public key. |
KeyDetailFallbackAllowed | Whether the terminal is allowed to fall back to magnetic stripe when there is a problem reading the chip. |
KeyDetailIndex | This property identifies the public key in conjunction with RID . |
KeyDetailModulus | The modulus of the public key. |
KeyDetailRID | The registered application provider identifier (RID) for which the public key applies. |
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. |
ProxyAuthScheme | This property is used to tell the component which type of authorization to perform when connecting to the proxy. |
ProxyAutoDetect | This property tells the component whether or not to automatically detect and use proxy system settings, if available. |
ProxyPassword | This property contains a password if authentication is to be used for the proxy. |
ProxyPort | This property contains the TCP port for the proxy Server (default 80). |
ProxyServer | If a proxy Server is given, then the HTTP request is sent to the proxy instead of the server otherwise specified. |
ProxySSL | This property determines when to use SSL for the connection to the proxy. |
ProxyUser | This property contains a user name, if authentication is to be used for the proxy. |
SequenceNumber | Sequence number of the transaction. |
SSLAcceptServerCertEncoded | The certificate (PEM/base64 encoded). |
SSLCertEncoded | The certificate (PEM/base64 encoded). |
SSLCertStore | The name of the certificate store for the client certificate. |
SSLCertStorePassword | If the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store. |
SSLCertStoreType | The type of certificate store for this certificate. |
SSLCertSubject | The subject of the certificate used for client authentication. |
SSLServerCertEncoded | The certificate (PEM/base64 encoded). |
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. |
AllowIdenticalRedirectURL | Allow redirects to the same URL. |
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. |
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. |
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. |
MaxRedirectAttempts | Limits the number of redirects that are followed in a request. |
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. |
TransferredDataLimit | The maximum number of incoming bytes to be stored by the component. |
TransferredHeaders | The full set of headers as received from the server. |
UseChunkedEncoding | Enables or Disables HTTP chunked encoding for transfers. |
ChunkSize | Specifies the chunk size in bytes when using chunked encoding. |
UserAgent | Information about the user agent (browser). |
KerberosSPN | The Service Principal Name for the Kerberos Domain Controller. |
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. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The TCP port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
RecordLength | The length of received data records. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
UseIPv6 | Whether to use IPv6. |
TcpNoDelay | Whether or not to delay when sending packets. |
TLS12SignatureAlgorithms | Defines the allowed TLS 1.2 signature algorithms when UseManagedSecurityAPI is True. |
ReuseSSLSession | Determines if the SSL session is reused. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLProvider | The name of the security provider to use. |
SSLSecurityFlags | Flags that control certificate verification. |
OpenSSLCADir | The path to a directory containing CA certificates. |
OpenSSLCAFile | Name of the file containing the list of CA's trusted by your application. |
OpenSSLCipherList | A string that controls the ciphers to be used by SSL. |
OpenSSLPrngSeedData | The data to seed the pseudo random number generator (PRNG). |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
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. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The TCP port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
RecordLength | The length of received data records. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
UseIPv6 | Whether to use IPv6. |
TcpNoDelay | Whether or not to delay when sending packets. |
TLS12SignatureAlgorithms | Defines the allowed TLS 1.2 signature algorithms when UseManagedSecurityAPI is True. |
ReuseSSLSession | Determines if the SSL session is reused. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLProvider | The name of the security provider to use. |
SSLSecurityFlags | Flags that control certificate verification. |
OpenSSLCADir | The path to a directory containing CA certificates. |
OpenSSLCAFile | Name of the file containing the list of CA's trusted by your application. |
OpenSSLCipherList | A string that controls the ciphers to be used by SSL. |
OpenSSLPrngSeedData | The data to seed the pseudo random number generator (PRNG). |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
CodePage | The system code page used for Unicode to Multibyte translations. |