Reflection Desktop VBA Guide
HowTos / Log Unredacted Credit Card Numbers
In This Topic
    Log Unredacted Credit Card Numbers
    In This Topic

    You can enable the CreditCardRecognized event to fire when unredacted Primary Account Number (PAN) data (also known as credit card numbers) are recognized and handle this event to create logs or perform other actions required for compliance.

    When the event is enabled, it is fired when unredacted PAN data is copied from the terminal to the clipboard or to a productivity tool. For IBM systems, the event is also fired when unredacted PAN data is displayed on the screen.

    Note: This event is fired only when a PAN is copied or displayed in its entirety ("in the clear"). It is not fired when only redacted PANs are copied or displayed.

    To log when a credit card number is copied or displayed

    1. In the Reflection Workspace Settings window, click Set Up Information Privacy.
    2. Under Primary Account Number (PAN) Redaction Rules, make sure Enable Redaction is unselected. (For IBM terminals, if you leave Redact display data (IBM terminals only) unselected, the event fires when PAN data is typed on the screen.)
    3. Under PCI DSS Rules, select Enable API events when PANs are viewed by the user.
    4. Open the Reflection session you want to log and then, from the Tools menu, open the Visual Basic editor.
    5. In the Visual Basic editor Project Explorer window, under Reflection objects, open the ThisIbmTerminal (for IBM projects) or ThisTerminal for (Open Systems projects) code window and copy the following code into it.
      This article contains tabbed content that is specific to each terminal type. Be sure the tab for your terminal type is selected.
      Log data using the CreditCardRecognized event
      Copy Code
      Rem This sample sends information about credit card access to a log file.
      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 accessLog As String
          Dim path As String
          Dim fnum As Integer
          accessLog = "Account number: " + AccountNumber + " User: " + User + _
          " Machine name: " + MachineName + "," + " Time: " + DateTime
          path = "C:\Users\Public\Documents\Micro Focus\Reflection\" & "log.txt"
          fnum = FreeFile()
          Open path For Append As fnum
          Print #fnum, accessLog
          Close #fnum
      End Sub
      
      Log data using the CreditCardRecognized event
      Copy Code
      Rem This sample sends information about credit card access to a log file.
      Private Sub Terminal_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 accessLog As String
          Dim path As String
          Dim fnum As Integer
       
          accessLog = "Account number: " + AccountNumber + " User: " + User + _
          " Machine name: " + MachineName + "," + " Time: " + DateTime
       
          path = "C:\Users\Public\Documents\Micro Focus\Reflection\" & "log.txt"
          fnum = FreeFile()
          Open path For Append As fnum
          Print #fnum, accessLog
          Close #fnum
       
      End Sub
      
    6. Back in Reflection, save the session and then type in a credit card number.
    7. Select the credit card number and then click Copy on the Session ribbon.
    8. Information from the CreditCardRecognized event is saved in the log file.

     

    See Also