Reflection .NET API
Attachmate.Reflection.Emulation.IbmHosts Assembly / Attachmate.Reflection.Emulation.IbmHosts Namespace / IIbmTerminal Interface / CreditCardRecognized Event
Example


In This Topic
    CreditCardRecognized Event (IIbmTerminal)
    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 or disabled by configuring settings on the Setup Information Privacy dialog box. For more information, see "Monitor Credit Card Access" in the Reflection .NET API Guide.

    Syntax
    'Declaration
     
    
    <SuppressMessageAttribute(Category="Microsoft.Design", 
       CheckId="CA1009:DeclareEventHandlersCorrectly", 
       Scope="", 
       Target="", 
       MessageId="", 
       Justification="")>
    Event CreditCardRecognized As CreditCardRecognizedEventHandler
    'Usage
     
    
    Dim instance As IIbmTerminal
    Dim handler As CreditCardRecognizedEventHandler
     
    AddHandler instance.CreditCardRecognized, handler
    [SuppressMessage(Category="Microsoft.Design", 
       CheckId="CA1009:DeclareEventHandlersCorrectly", 
       Scope="", 
       Target="", 
       MessageId="", 
       Justification="")]
    event CreditCardRecognizedEventHandler CreditCardRecognized
    Event Data

    The event handler receives an argument of type CreditCardRecognizedEventArgs containing data related to this event. The following CreditCardRecognizedEventArgs properties provide information specific to this event.

    PropertyDescription
    Gets the date and time that the event occurred.  
    Gets a description of the type of access that the credit card number was encountered in (eg. LiveScreen, OfficeTools, ScreenHistory, etc).  
    Gets the machine name (as set up in the system control panel).  
    Gets the card number (in redacted format) that was recognized.  
    Gets a success return code. (This is Reserved for future use. It currently always returns a success return code.)  
    Gets the domain that the user is logged onto, or an empty string if not logged onto a Windows domain.  
    Gets the Windows user name of the current user.  
    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 writes information on the console when unredacted PAN data is displayed or copied from the terminal.
    //Set up the event handler to get the data you want to collect.
    void ibmTerminal_CreditCardRecognized(object sender, CreditCardRecognizedEventArgs e)
        {
          Console.Write(("\n" + "Credit Card Number Viewed on Screen \n"
          + "Date and Time: " + e.DateTime.ToString() + " \n"
          + "Machine name: " + e.MachineName.ToString() + " \n"
          + "User ID: " + e.UserId.ToString() + " \n"
          + "Card number: " + e.RedactedAccountNumber + "\n"));
        }
    ...
     
    //Attach the event handler to the IbmTerminal object's CreditCardRecognized event,
    //where ibmTerminal is an instance of IbmTerminal.
    ibmTerminal.CreditCardRecognized += new CreditCardRecognizedEventHandler(ibmTerminal_CreditCardRecognized);
    See Also