Show Contents / Index / Search

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

  1. In the Reflection 2011 Workspace Settings window, click Set Up Information Privacy.
  2. Under Primary Account Number (PAN) Redaction Rules, make sure Enable Redaction is not selected.
  3. Under PCI DSS Rules, select Enable API events when PANs are viewed by the user.
  4. In the Visual Basic editor Project Explorer window, expand the session project and then expand the Reflection Objects folder.
  5. Double-click ThisIbmTerminal (for IBM projects) or ThisTerminal for (Open Systems projects).
  6. Copy the following code into the code window.

    Rem This sample sends information about credit card access to a log file.

    Rem For Open Systems, use Terminal_CreditCardRecognized instead of IbmTerminal_CreditCardRecognized

    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

    Close #fnum

    End Sub

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