Log Credit Card Access
You can fire the CreditCardRecognized event whenever a credit card is displayed. You can handle this event to create logs or perform other actions required for compliance.
Note: This event is fired only when a Primary Account Number (PAN) is displayed in its entirety ("in the clear"). It is not fired when only redacted PANs are displayed.
To log credit card access
- In the Reflection 2011 Workspace Settings window, click Set Up Information Privacy.
- Under Primary Account Number (PAN) Redaction Rules, make sure Enable Redaction is not selected.
- Under PCI DSS Rules, select Enable API events when PANs are viewed by the user.
- In the Visual Basic editor Project Explorer window, expand the session project and then expand the Reflection Objects folder.
- Double-click ThisIbmTerminal (for IBM projects) or ThisTerminal for (Open Systems projects).
- Copy the following code into the code window.
Private Sub IbmTerminal_CreditCardRecognized(ByVal sender As Variant, ByVal AccountNumber As String, ByVal User As String, ByVal MachineName As String, ByVal UserDomainName As String, ByVal DateTime As String, ByVal EventType As String, ByVal success As Long)
Dim log As String
Dim path As String
Dim fnum As Integer
log = "Account number: " + AccountNumber + " User: " + User + " Machine name: " + MachineName + "," + " Time: " + DateTime
path = "C:\Users\lab\Documents\Attachmate\Reflection\" & "log.txt"
fnum = FreeFile()
Open path For Append As fnum
Print #fnum, log
- Run the session and type in a credit card number.
Information from the CreditCardRecognized event is saved in the log file.
Note: This sample code is intended to illustrate a concept, and it shows only the code that is relevant to that concept. It may not meet the security requirements for a specific environment, and it should not be used exactly as shown. We recommend that you add security and error-handling code to make your projects more secure and robust. Attachmate provides this sample code "AS IS" with no warranties.