Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.IbmHosts Library / Attachmate.Reflection.Objects.Emulation.IbmHosts Library / IbmTerminal Object / CreditCardRecognized Event
Example
In This Topic
    CreditCardRecognized Event (IbmTerminal)
    In This Topic

    This event occurs when an unredacted Primary Account Number (PAN) is displayed on the screen or in productivity features, such as Screen History. It also occurs when an unredacted PAN is copied from the terminal (for example, when the PAN is copied to a text file or a Microsoft Office application).

    This event is enabled by configuring settings on the Setup Information Privacy dialog box. For more information, see "Logging Credit Card Access" in the Reflection VBA Guide.

    Syntax
    private Sub IbmTerminal_CreditCardRecognized ( 
       ByVal sender As Object, _
       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 _
    ) 

    Parameters

    sender
    Sender of event.
    accountNumber
    The card number (in redacted format) that was recognized.
    user
    The Windows user name of the current user.
    machineName
    The machine name (as set up in the system control panel).
    userDomainName
    The domain that the user is logged onto, or an empty string if not logged onto a Windows domain.
    dateTime
    The date and time that the event occurred.
    eventType
    The type of access that the credit card number was encountered in (eg. LiveScreen, OfficeTools, ScreenHistory, etc).
    success
    Reserved for future use. This currently always returns a success return code.
    Remarks
    This event occurs only when a PAN is displayed or copied in its entirety ("in the clear"). It is not fired when only redacted PANs are displayed or copied.
    Example
    This sample sends information to a log file when unredacted PAN data is displayed or copied from the terminal.
    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
    See Also