The TSYSGiftCard component is used to manipulate funds on Gift and Prepaid Cards using the Vital/TSYS payment system. This component supports card-present gift card transactions, and allows for simple, direct, secure communication to the Vital/TSYS TLS/SSL gateway 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.
This component supports two different kinds of Stored Value cards. Gift Cards and Prepaid Cards. Gift Cards support only the Fifth/Third and Stored Value Systems (SVS) ReceivingInstitutions, and a merchant must have software (such as this component) to authorize gift card Purchase (redemption) transactions. On the other hand, Prepaid cards (once activated) authorize exactly like credit cards, and can be used at any store. Examples of gift and cards include a retailer's gift card, a prepaid telephone card, and a reloadable subway pass. Examples of prepaid cards would be the prepaid cards purchased at shopping malls, or sometimes given away as promotional gimmicks. Not included in either of these are government income-support cards, otherwise known as EBT cards or electronic food stamps. (Use the TSYSBenefit component for EBT cards).
The TSYSGiftCard component makes these 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, set the merchant properties with setup information acquired from your member bank or processor. For instance:
TSYSGiftCard1.MerchantBankId = "999995" TSYSGiftCard1.MerchantNumber = "888000002447" TSYSGiftCard1.MerchantName = "TEST_MERCHANT" TSYSGiftCard1.MerchantTerminalNumber = "1515" TSYSGiftCard1.MerchantStoreNumber = "5999" TSYSGiftCard1.MerchantCategoryCode = "5999" TSYSGiftCard1.MerchantCity = "Durham" TSYSGiftCard1.MerchantState = "NC" TSYSGiftCard1.MerchantZip = "27713" TSYSGiftCard1.MerchantTimeZone = "705" TSYSGiftCard1.MerchantABANumber = "123456789" TSYSGiftCard1.MerchantSettlementAgent = "V123" TSYSGiftCard1.AgentBankNumber = "000000" TSYSGiftCard1.AgentChainNumber = "111111" TSYSGiftCard1.IndustryType = itRetail TSYSGiftCard1.ReceivingInstitution = riFifthThird
Next, set properties that contain details about the transaction. The TransactionNumber is a sequence number, and should be incremented for each transaction you send. TransactionAmount is the amount of sale, plus any CashBackAmount returned to the customer, formatted with an implicit decimal place (CashBackAmount is only applicable to the ttGiftCardPurchase TransactionType). The MagneticStripe data for Prepaid cards can be either track1 or track2, but Gift cards support only the dsTrack2 EntryDataSource. Both types support manual entry via the Number, ExpMonth, and ExpYear properties.
In addition, you are also be required to set an EmployeeId and BatchNumber for Gift Card transactions. (These are ignored for Prepaid transactions). Even though Gift Card transactions are not submitted for settlement, the BatchNumber should reflect the batch sequence number of the current batch. The EmployeeId is a unique number used to identify the employee operating the terminal being used to issue gift cards. For example:
TSYSGiftCard1.TransactionNumber = 1 TSYSGiftCard1.BatchNumber = 123 TSYSGiftCard1.EmployeeId = "12345678" TSYSGiftCard1.TransactionAmount = "1000" TSYSGiftCard1.CashBackAmount = "300" TSYSGiftCard1.CardTrack2Data = "9999999800002773=09121015432112345678"
The TSYSGiftCard component supports both Gift Card and Prepaid Cards, so you should make sure to choose the correct TransactionType for the type of card you are using. Then call the Authorize method to submit the transaction.
TSYSGiftCard1.TransactionType = ttGiftCardPurchase TSYSGiftCard1.Authorize()
When the component receives a response from the Vital/TSYS servers, the result of the authorization will be displayed in several Response properties. The Code indicates whether the transaction was approved, and the remaining properties provide additional information about the transaction.
Note that Gift Card and Prepaid Card transactions, with the exception of the ttPrepaidCardPurchase TransactionType are real-time transactions, and cannot be settled with the TSYSSettle component. ttPrepaidCardPurchase is identical to a credit card purchase made with the TSYSRetail component, so it must be settled with the TSYSSettle component. However, using this component to authorize Prepaid card transactions allows you to retrieve balance information and allow partial authorizations.
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
|AgentBankNumber||Identifies a specific agent entity of the member bank or processor.|
|AgentChainNumber||Identifies a specific chain of an agent organization.|
|BatchNumber||The batch number that this transaction will be included in.|
|Card||Contains the customer's credit card information.|
|CashBackAmount||Amount returned to the customer in cash.|
|CustomerAddress||The customer's billing address.|
|CustomerZip||Customer's zip code (or postal code if outside of the USA).|
|EmployeeId||Identification number of the Employee making this transaction.|
|IndustryType||Code which indicates the industry the merchant is engaged in.|
|Merchant||Contains the merchant's setup information.|
|MerchantABANumber||Merchant's routing number.|
|MerchantSettlementAgent||Merchant's settling agent.|
|OriginalPurchaseDate||Date and time of original purchase, used for returns.|
|PartialRedemption||Partial Redemption indicator.|
|ReceivingInstitution||Indicates which gift card network to use.|
|Response||Contains the response to a debit authorization request.|
|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.|
|Timeout||A timeout for the component.|
|TransactionAmount||Purchase amount to be authorized.|
|TransactionNumber||Sequence number of this transaction.|
|TransactionType||Specifies the type of Gift Card transaction to process.|
The following is the full list of the methods of the component with short descriptions. Click on the links for further details.
|Authorize||Sends a Gift Card transaction.|
|Config||Sets or retrieves a configuration setting .|
|GetDetailAggregate||Returns an aggregate containing details of this transaction, which is then used for settlement.|
|Interrupt||Interrupts the current action.|
|Reset||Clears all properties to their default values.|
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.|
The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.
|AuthorizationIndicator||The type of authorization request.|
|Retry||Set this to retry a failed transaction.|
|SendExtendedAVS||Specifies whether to send extended AVS data.|
|ResponseStoreNumber||Check this field against the original Merchant StoreNumber.|
|ResponseTerminalNumber||Check this field against the original Merchant TerminalNumber.|
|ResponseCardholderVerification||Verification results for cardholder identification data (extended AVS).|
|Port||The port to which transactions are posted.|
|Server||The server to which transactions are posted.|
|AuthenticationCode||An alphanumeric code provided to the POS user for input when authenticating a POS device.|
|ActivateTerminal||Authenticates a POS device with TSYS.|
|DeactivateTerminal||Deactivates a POS device with TSYS.|
|GenKey||A randomly generated string of alphanumeric characters identifying the terminal.|
|TsysETB||The Encryption Transmission Block TSYS uses to decrypt encrypted data.|
|POSDataCode||Specifies the condition of the POS device used at the time of the transaction.|
|GUIAvailable||Tells the component whether or not a message loop is available for processing events.|
|UseBackgroundThread||Whether threads created by the component are background threads.|
|UseInternalSecurityAPI||Tells the component whether or not to use the system security libraries or an internal implementation.|