Direct Payment Integrator V6 - Online Help
Direct Payment Integrator V6
Questions / Feedback?

FDMSGiftCard Component

Properties   Methods   Events   Configuration Settings   Errors  

The FDMSGiftCard component is used to manipulate funds on Stored Value (Gift) Cards with the FDMS Closed Loop Gift Card System. This component supports both card-present and card-not-present gift card transactions, and allows for simple, direct, secure communication to the Datawire gateway to FDMS through a standard Internet connection. This component can be integrated into web pages or stand- alone Point Of Sale applications. Because all TLS/SSL communications are handled inside the component, any application or web page can be deployed without the need for expensive dedicated TLS/SSL servers.

Syntax

nsoftware.InPayDirect.Fdmsgiftcard

Remarks

A Stored Value Card (or Gift Card as they are commonly called) is a not actually a type of credit or debit card. Simply put, a Stored Value Card is a card with a magnetic strip on the back that holds information about monies that have been "pre-paid" into an account for the purpose of making financial transactions. Examples include a retailer's gift card, a prepaid telephone card, a college campus meal plan card, a reloadable subway pass, etcetera. Not included are government income-support cards, otherwise known as EBT cards or electronic food stamps.

The FDMSGiftCard component makes gift card 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 component and authorizing a transaction are outlined below:

First, you must register and activate your account with Datawire. Datawire will provide you with a MerchantNumber and MerchantTerminalNumber, but you'll need to use the FDMSRegister component to activate the merchant and receive a DatawireId. Once you acquire the DatawireId and receive your transaction URLs through Service Discovery, you may begin to authorize transactions.

To authorize a credit card, set the MerchantNumber and MerchantTerminalNumber with the values supplied by FDMS and Datawire, and the DatawireId with the value retrieved by the FDMSRegister component after activating your merchant account. Set the URL property with one of the URLs you retrieved during Service Discovery.


  FDMSGiftCard.MerchantNumber = "57111111111";          // Supplied by FDMS/Datawire  
  FDMSGiftCard.MerchantTerminalNumber = "00000000001";  // Supplied by FDMS/Datawire
  FDMSGiftCard.DatawireId = "00010388888888888878";     // Retrieved with the FDMSRegister component.  

After the merchant information is setup, you may enter transaction data. When the card is Manually Entered, the merchant should fill the Number and EntryDataSource fields. Otherwise, you should fill the MagneticStripe field with the Track 2 data read from the back of the card.


  
  FDMSGiftCard.Card.MagneticStripe = "6010567008288444=00010004000070771026";
  FDMSGiftCard.Card.EntryDataSource = edsTrack2;

Then set additional information about the transaction, including any merchant-designated tracking information, such as the Id of the employee making the transaction, the terminal where the transaction is taking place, any alternate identification for the merchant location, and transaction and reference numbers.

  
  FDMSGiftCard.TransactionNumber = "0000001V000003";
  FDMSGiftCard.ClerkId = "123";
  FDMSGiftCard.ReferenceNumber = "555523";  
  FDMSGiftCard.AlternateMerchantId = "132123";  
  FDMSGiftCard.TerminalId = "1234"; 
Now you must choose what transaction you wish to make. Adding Value to a card, Redeeming a card, voiding a previous transaction, or retrieving the card's current balance.

To add funds to an existing Gift Card, simply set the TransactionAmount with the amount to add to the card, and then call LoadCard. Activating a new gift card is handled similarly, by calling ActivateCard instead.

To redeem funds from a Gift Card due to a customer purchase, set TransactionAmount to the total for the purchase and call RedeemCard. If the Gift Card account contains enough funds, Code will indicate the card was approved. If there are not enough funds available on the card to cover the TransactionAmount, normally the transaction will be declined. However, the merchant may set RedemptionType to rtPartialRedemption. This allows the customer to split the cost of the purchase between the Gift Card and another form of payment. Instead of declining the Gift Card, PreviousBalance and NewBalance can be used to deduce the amount removed from the Gift Card. The merchant may subtract that from the requested TransactionAmount to determine the difference to charge the customer.

You may also inquire as to the total funds contained on the card by calling BalanceInquiry. This will not effect the amount of funds contained on the card in any way.

You also have the ability to lock funds on a card with the LockCard method, so that they may not be used for any other purchase until first unlocked. Previous transactions may be voided with VoidTransaction, and any transactions for which you did not receive a response (due to network issues), should be immediately reversed using the ReverseLastTransaction method.

The status of any of the above transactions will be stored in the Code field, with human-readable text appearing in Text. Like the FDMSRetail component, there are several other Response fields which will contain data that should be logged.

Property List


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

AlternateMerchantIdMerchant-designated store or location number.
ApplicationIdIdentifies the merchant application to the Datawire System.
CardContains the customer's credit card information.
ClerkIdIdentifies the clerk executing this transaction.
DatawireIdIdentifies the merchant to the Datawire System.
LockTypeIndicates the type of lock requested by the LockCard method.
MerchantNumberA unique number used to identify the merchant within the FDMS and Datawire systems.
MerchantTerminalNumberUsed to identify a unique terminal within a merchant location.
ProxyA set of properties related to proxy access.
RedemptionTypeIdentifies the type of redemption to execute.
ReferenceNumberReference number used to identify the transaction.
ResponseContains the response returned from the FDMS Closed Loop Gift Card system.
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.
TerminalIdMerchant-generated 4-digit terminal Id.
TimeoutA timeout for the component.
TransactionAmountPurchase amount to be authorized.
TransactionNumberUniquely identifies the transaction.
URLLocation of the Datawire server to which transactions are sent.
VoidTypeIdentifies the type of void to execute.

Method List


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

ActivateCardActivates a Gift Card.
BalanceInquiryRetrieves the balance remaining on a gift card.
ConfigSets or retrieves a configuration setting .
InterruptInterrupts the current action.
LoadCardAdds funds to a gift card.
LockCardLocks funds on a gift card.
RedeemCardRemoves funds from the gift card for a purchase.
ResetClears all properties to their default values.
ReverseLastTransactionReverses the last attempted transaction.
VoidTransactionVoids a previous transaction.

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).
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.

ClientTimeoutIndicates timeout client application will wait for response.
CurrencyCodeCurrency Code for this transaction.
DebugTraceWhether to enable debug logging.
CardAvailableDateDate in the future when the gift card's activation will complete.
CardExpirationDateDate you wish the gift card to expire.
EchoBackGeneric field used at the merchant's discretion.
SourceCodeUsed to identify the source of the transaction.
User1Generic field used at the merchant's discretion.
User2Generic field used at the merchant's discretion.
RefundAdds value back onto a card.
IsRetailTransactionDetermines whether the transaction was performed in an retail or internet environment.
GenerateMerchantKeyPairGenerates a private and public key pair.
MerchantPrivateKeyThe Merchant's Private Key.
MerchantPublicKeyThe Merchant's Public Key.
FDMSPublicKeyThe FDMS Public Key.
GenerateWorkingKeyGenerates a Merchant Working Key.
DecryptedWorkingKeyThe decrypted Merchant Working Key.
EncryptedWorkingKeyThe encrypted Merchant Working Key.
AssignMerchantWorkingKeyAssigns a merchant working key to be used by all Internet transactions with EANs.
MerchantKeyIDThe Merchant Key ID associated with the Merchant ID.
EANExtended Account Number.
SCVSecurity Card Value.
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).
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 TCP 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.
RecordLengthThe length of received data records.
TCPKeepAliveDetermines whether or not the keep alive socket option is enabled.
UseIPv6Whether to use IPv6.
TcpNoDelayWhether or not to delay when sending packets.
TLS12SignatureAlgorithmsDefines the allowed TLS 1.2 signature algorithms when UseManagedSecurityAPI is True.
ReuseSSLSessionDetermines if the SSL session is reused.
SSLCipherStrengthThe minimum cipher strength used for bulk encryption.
SSLEnabledProtocolsUsed to enable/disable the supported security protocols.
SSLProviderThe name of the security provider to use.
SSLSecurityFlagsFlags that control certificate verification.
OpenSSLCADirThe path to a directory containing CA certificates.
OpenSSLCAFileName of the file containing the list of CA's trusted by your application.
OpenSSLCipherListA string that controls the ciphers to be used by SSL.
OpenSSLPrngSeedDataThe data to seed the pseudo random number generator (PRNG).
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.
CodePageThe system code page used for Unicode to Multibyte translations.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 6.0.6240.0