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

    This event occurs when an unredacted Primary Account Number (PAN) is copied from the terminal (for example, when the PAN is copied to the clipboard).

    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 Terminal_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 copied in its entirety ("in the clear"). It is not fired when only redacted PANs are copied.

    Example
    This sample sends information to a log file when unredacted PAN data is displayed in productivity features (such as screen history) or copied from the terminal.
    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
    See Also