FDMSRcECommerce Class
Properties Methods Events Configuration Settings Errors
The FDMSRcECommerce component is an advanced tool used to authorize credit cards in both Mail Order (Direct Marketing) and eCommerce environments, where the customer is ordering products or services via the telephone or Internet. This component makes authorizing these types of transactions very easy.
Class Name
InPayDirect_FDMSRcECommerce
Procedural Interface
inpaydirect_fdmsrcecommerce_open(); inpaydirect_fdmsrcecommerce_close($res); inpaydirect_fdmsrcecommerce_register_callback($res, $id, $function); inpaydirect_fdmsrcecommerce_get_last_error($res); inpaydirect_fdmsrcecommerce_get_last_error_code($res); inpaydirect_fdmsrcecommerce_set($res, $id, $index, $value); inpaydirect_fdmsrcecommerce_get($res, $id, $index); inpaydirect_fdmsrcecommerce_do_authonly($res); inpaydirect_fdmsrcecommerce_do_capture($res); inpaydirect_fdmsrcecommerce_do_config($res, $configurationstring); inpaydirect_fdmsrcecommerce_do_credit($res); inpaydirect_fdmsrcecommerce_do_getdetailaggregate($res); inpaydirect_fdmsrcecommerce_do_interrupt($res); inpaydirect_fdmsrcecommerce_do_reset($res); inpaydirect_fdmsrcecommerce_do_reverse($res); inpaydirect_fdmsrcecommerce_do_sale($res); inpaydirect_fdmsrcecommerce_do_setdetailaggregate($res, $aggregate); inpaydirect_fdmsrcecommerce_do_verifycard($res);
Remarks
This class connects to the First Data Merchant Services (FDMS) processor, by way of the Datawire VXN transaction transport network. Transactions originating with these classs go through Datawire, to the FDMS processor where the transaction is authorized. The result is then returned back through Datawire and received by the class. This class can be integrated into web pages or stand-alone Point Of Sale applications. Because all SSL communications are handled inside the class, any application or web page can be deployed without the need for expensive dedicated SSL servers.
The FDMSRcECommerce class makes authorizing Card-Not-Present Mail Order and E-Commerce transactions very easy by adding an additional layer of abstraction between the programmer and the protocol. There is no need to deal with raw sockets, TLS/SSL handshakes, or data packet formatting. The steps to setting up the class and authorizing a transaction are outlined below:
Datawire Setup
First, you must register and activate your account with Datawire. FDMS Rapid Connect will provide you with the following values:
The FDMSRegister class must be used to activate the merchant and receive a DatawireId. Once you acquire the DatawireId and receive your transaction URLs through ServiceDiscovery, you may begin to authorize transactions. For instance:
FDMSRegister.FDMSPlatform = FdmsregisterFDMSPlatforms.fpRapidConnect; FDMSRegister.MerchantNumber = "000000999990"; FDMSRegister.MerchantTerminalNumber = "555555"; FDMSRegister.Config("GroupId=20001"); //Required for Rapid Connect FDMSRegister.TransactionNumber = "1"; //any unique number will do. FDMSRegister.URL = "https://stagingsupport.datawire.net/staging_expresso/SRS.do"; FDMSRegister.Register(); FDMSRegister.TransactionNumber = FDMSRegister.TransactionNumber + 1; 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); }
To authorize a credit card set the MerchantId, MerchantTerminalNumber, and GroupId properties with the values supplied by FDMS Rapid Connect. Set the DatawireId property with the value retrieved by the FDMSRegister class after activating your merchant account. Set the URL property with one of the URLs you retrieved during ServiceDiscovery.
Transaction Processing
To being processing transactions first set the required merchant values. For instance:
fdmsrcecommerce.IndustryType = FdmsrcecommerceIndustryTypes.fitEcommerce; fdmsrcecommerce.TPPID = "AAA000"; fdmsrcecommerce.MerchantTerminalNumber = "00000001"; fdmsrcecommerce.MerchantId = "1234"; fdmsrcecommerce.GroupId = "20001"; fdmsrcecommerce.DatawireId = "00011122233344455566"; fdmsrcecommerce.MerchantURL = "mywebsite"; //Required for ECommerce transactions fdmsrcecommerce.ApplicationId = "RAPIDCONNECTVXN"; fdmsrcecommerce.URL = "https://stg.dw.us.fdcnet.biz/rc";
Next specify transaction specific information. These values uniquely identify the transaction to Datawire and FDMS.
fdmsrcecommerce.STAN = "112"; fdmsrcecommerce.TransactionNumber = "120013"; fdmsrcecommerce.OrderNumber = "12000503"; fdmsrcecommerce.ReferenceNumber = "123";Then specify customer card and address information along with the transaction amount:
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"; //$12.00
Finally, submit the transaction by calling the Sale method.
fdmsrcecommerce.Sale();
The ResponseCode property indicates the result of the transaction. A code of 000 indicates success. For all other values please see the Response Codes section. Additional Response properties such as ResponseApprovalCode, ResponseAuthorizedAmount, ResponseText, ResponseAVSResult, ResponseCVVResult, and more, provide further details about the transaction response.
To perform subsequent operations on a transaction, such as calling Reverse to reverse a Sale, or calling Capture to capture a previous AuthOnly transaction the GetDetailAggregate method must be used to get details about the original transaction. This aggregate must be stored securely, it will contain cardholder information that is required for subsequent transactions. For instance:
fdmsrcecommerce.AuthOnly(); //Save the detail aggregate to use with Capture string aggregate = fdmsrcecommerce.GetDetailAggregate(); //The aggregate must then be stored securely. //At a later time the aggregate is retrieved in order to perform a capture. //Capture fdmsrcecommerce = new Fdmsrcecommerce(); ... //Specify the detail aggregate from the original transaction fdmsrcecommerce.SetDetailAggregate(aggregate); fdmsrcecommerce.Capture();
Transaction Types
In addition to a basic sale transaction, additional transaction types exist for other common operations. Not all transaction types are applicable for all classs. Check the method list for applicable transaction types.
AuthOnly | An authorization that must be Captured later. |
BalanceInquiry | Inquire about available balance. |
Capture | Captures a previous AuthOnly transaction for settlement. |
Credit | Credits funds to the cardholder. This is not based on a previous transaction. |
Reverse | Reverse a previous transaction. This is also used for timeout reversals. |
Sale | A basic sale, no other steps are required to complete the payment. |
VerifyCard | Verifies that a card is valid. |
Note: FDMS Rapid Connect is a host capture system. No explicit calls are needed to settle or otherwise manage the batch.
Level 2 Transactions
The values required for Level 2 transaction depend on the card type. The following tables indicate which properties are valid for what card type:
American Express
- Level2CustomerReferenceNumber (required if Level2TaxAmount specified)
- Level2DestinationPostalCode (required)
- Level2DiscountAmount (required if discount applied)
- Level2DutyAmount (required if duty amount applied)
- Level2FreightAmount (required if freight amount applied)
- Level2ProductDescription (required)
- Level2PurchaseIdentifier (required)
- Level2MerchantTaxId
- Level2ShipFromPostalCode
- Level2TaxAmount
- Level2TaxIndicator
- Level2CustomerReferenceNumber (required if Level2TaxAmount specified)
- Level2DiscountAmount (required if discount applied)
- Level2DutyAmount (required if duty amount applied)
- Level2FreightAmount (required if freight amount applied)
- Level2PurchaseIdentifier (required)
- Level2TaxAmount (required if Level2TaxIndicator indicates tax is applied)
- Level2TaxIndicator (required)
- Level2DestinationPostalCode
- Level2ShipFromPostalCode
- Level2MerchantTaxId
- Level2CustomerReferenceNumber (required if Level2TaxAmount specified)
- Level2DiscountAmount (required if discount applied)
- Level2DutyAmount (required if duty amount applied)
- Level2FreightAmount (required if freight amount applied)
- Level2MerchantTaxId (required)
- Level2PurchaseIdentifier (required)
- Level2TaxAmount (required if Level2TaxIndicator indicates tax is applied)
- Level2TaxIndicator (required)
- Level2DestinationPostalCode
- Level2ShipFromPostalCode
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
ApplicationId | Identifies the merchant application to the Datawire System. |
CardCVVData | Three digit security code on back of card (optional). |
CardCVVPresence | Indicates the presence of the card verification value. |
CardEntryDataSource | This property contains a 1-character code identifying the source of the customer data. |
CardExpMonth | Expiration month of the credit card specified in Number . |
CardExpYear | Expiration year of the credit card specified in Number . |
CardMagneticStripe | Track data read off of the card's magnetic stripe. |
CardNumber | Customer's credit card number for the transaction. |
CustomerAddress | The customer's billing address. |
CustomerZip | Customer's zip code (or postal code if outside of the USA). |
DatawireId | Identifies the merchant to the Datawire System. |
GroupId | The Id assigned by FDMS to identify the merchant or group of merchants. |
IndustryType | The merchant's industry type. |
Level2CustomerReferenceNumber | The reference number or order number to be reported as part of the Purchase Card data. |
Level2DestinationCountryCode | This property represents the country code of the location the items in this purchase are being delivered to. |
Level2DestinationPostalCode | This property contains the postal or zip code of the location the item(s) in this purchase are being delivered to. |
Level2DiscountAmount | This property contains the discount amount for the purchase. |
Level2DutyAmount | This property contains the duty amount for this purchase. |
Level2FreightAmount | This property contains the amount for freight included in this purchase. |
Level2MerchantTaxId | This property should contain the Tax Id collected by the merchant for this transaction. |
Level2ProductDescription | This property should contain a description of an item purchased with this card. |
Level2PurchaseIdentifier | This property represents the data used by the merchant or customer to identify the purchase. |
Level2ShipFromPostalCode | The postal or zip code the item(s) in this purchase are to be shipped from. |
Level2TaxAmount | This property contains the portion of the transaction amount that represents the tax. |
Level2TaxIndicator | This property indicates the taxable status of the transaction. |
MerchantId | A unique Id used to identify the merchant within the FDMS and Datawire systems. |
MerchantServicePhone | The merchant's phone number, used to assist cardholders. |
MerchantTerminalNumber | Used to identify a unique terminal within a merchant location. |
MerchantURL | The URL of the site performing the ECommerce transaction. |
OrderNumber | A merchant assigned order number to uniquely reference the transaction. |
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. |
ReferenceNumber | A value assigned by the merchant to uniquely reference a transaction and any subsequent related transactions. |
ResponseApprovalCode | The Approval Code returned from the server after a successful authorization. |
ResponseAuthorizedAmount | The amount actually charged to the card. |
ResponseAuthorizingNetworkId | This property indicates the network Id as returned by the host, if available. |
ResponseAuthorizingNetworkName | This property indicates the authorizing network name as returned by the host, when available. |
ResponseAVSResult | Contains the Address Verification System result code. |
ResponseBalance | Contains the remaining available balance left on the card. |
ResponseCardLevelResult | This property is only applicable to Visa card. |
ResponseCode | Contains the 3 digit response code indicating success or reason of failure. |
ResponseCommercialCard | Indicates whether the credit card charged is a corporate commercial card. |
ResponseCVVResult | Contains the returned CVV result code (if CVV data was sent in the request). |
ResponseDatawireReturnCode | Contains an error code providing more details about the DatawireStatus received. |
ResponseDatawireStatus | Status of the communication with Datawire. |
ResponsePOSData | This property holds transaction specific information returned by the issuer (if any). |
ResponseReturnedACI | Returned Authorization Characteristics Indicator contains CPS qualification status. |
ResponseRoutingIndicator | Indicates whether the transaction was processed as Credit or Debit. |
ResponseSettlementDate | The date the transaction will be settled in the format MMDD. |
ResponseText | This property may hold additional text which describes the reason for a decline, the property in error, etc. |
ResponseTransactionDate | The transaction date returned from the server in yyyyMMddHHmmss format. |
ResponseTransactionId | Card issuer's Transaction Reference Number. |
ReversalTransactionType | The type of transaction to reverse. |
ReversalType | The type of reversal. |
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. |
TransactionAmount | The transaction amount to be authorized. |
TransactionNumber | Uniquely identifies the transaction. |
URL | Location of the Datawire server to which transactions are sent. |
VisaIdentifier | Additional merchant identification field used when authorizing Visa transactions. |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
AuthOnly | Performs an authorization request. |
Capture | Captures a previously authorized transaction. |
Config | Sets or retrieves a configuration setting . |
Credit | Submits a credit transaction. |
GetDetailAggregate | Returns a detail aggregate containing details of this transaction, which is used for Capture or Reverse transactions. |
Interrupt | Interrupts the current action. |
Reset | Clears all properties to their default values. |
Reverse | Reverses a transaction. |
Sale | Performs a sale transaction. |
SetDetailAggregate | Specifies the detail aggregate before calling Capture or Reverse. |
VerifyCard | Performs a zero dollar verification of the card. |
Event List
The following is the full list of the events fired by the class 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 class with short descriptions. Click on the links for further details.
ClientTimeout | Indicates timeout client application will wait for response. |
CurrencyCode | Currency Code for this transaction. |
DebugTrace | Whether to enable debug logging. |
AllowPartialAuths | Indicates whether partial authorizations are supported. |
AltMerchantAddress | The alternative merchant address. |
AltMerchantCity | The alternative merchant city. |
AltMerchantCountryCode | The alternative merchant country code. |
AltMerchantName | The alternative merchant name. |
AltMerchantState | The alternative merchant state. |
AltMerchantZip | The alternative merchant zip code. |
AuthSource | Indicates the source of the decision for the Visa transaction. |
BillPaymentType | Specifies the type of Bill Payment being made. |
CardInputMode | The method used to input the card details. |
CardType | Specifies the type of card. |
DeviceTypeIndicator | Defines the form factor used at the POS for MasterCard PayPass transactions. |
LocalTransactionDate | The local date of the transaction. |
UTCTransactionDate | The UTC date of the transaction. |
MerchantCategoryCode | The 4 digit Merchant Category Code (MCC). |
POSConditionCode | The POS condition code. |
POSId | Identifies the specific point of sale device. |
TerminalCardCapability | The terminal's card capture capability. |
TerminalEntryCapability | The terminal's entry mode capability. |
TerminalPinCapability | The terminal's PIN capability. |
TerminalTaxCapability | The terminal's ability to prompt for tax. |
VoiceApprovalCode | The voice approval. |
TransArmorTokenType | The FDMS assigned token type. |
TransArmorMode | Specifies the TransArmor Security Level to use. |
UpdateTransArmorKey | Allows you to update your TransArmor Key. |
TransArmorKey | Specifies the TransArmor key used to perform the encryption. |
TransArmorKeyId | Specifies the Id of the TransArmor key used to perform the encryption. |
TransArmorToken | A TransArmor Token used in place of a card number or magnetic stripe data. |
TransArmorProviderId | The Id of the Provider that issued a TransArmorToken. |
TransArmorUpdateIndicator | Indicates whether your TransArmorKey needs to be updated. |
GetTransArmorToken | Allows you to retrieve a TransArmor Token for a specified card. |
ECI | Identifies the security level of the ECommerce transaction. |
CAVV | The Visa CAVV or American Express AEVV. |
XID | The 3-D Secure transaction Id for Visa 3D Secure or American Express Safekey. |
UCAFCollectInd | Specifies whether the merchant supports MasterCard UCAF (SecureCode) data collection. |
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. |