Cat Class

Represents a credit authorization terminal.

Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)

Usage

'Usage
Dim cat1 As New Cat()

Syntax

'Declaration
MustInherit Public Class Cat
    Inherits PosCommon
public abstract class Cat : PosCommon
public abstract ref class Cat : public PosCommon
public abstract class Cat extends PosCommon
public abstract class Cat extends PosCommon

Remarks

The CAT control is capable of the following general mode of operation:

  • This standard defines the application interface with the CAT control and does not depend on the CAT device hardware implementation. Therefore, the hardware implementation of a CAT device may be as follows:

    • Separate type (POS interlock)

      The dedicated CAT device is externally connected to the POS (for instance, via an RS-232 connection).

    • Built-in type

      The hardware structure is the same as the separate type but is installed within the POS housing.

  • The CAT device receives each authorization request containing a purchase amount and tax from CAT control.

  • The CAT device generally asks the user to swipe a magnetic card when the device receives an authorization request from CAT control.

  • After a magnetic card is swiped at the CAT device, the device sends the purchase amount and tax to the approval agency, using the communications device.

  • The CAT device returns the result from the approval agency to the CAT control. The returned data will be stored in the authorization properties by the CAT control for access by applications.

Model

The general models for the CAT service object are shown below:

  • The CAT service object basically follows the output device model. However, multiple methods cannot be issued for asynchronous output; only one outstanding asynchronous request is allowed.

  • The CAT service object issues requests to the CAT device for different types of authorization by invoking the following methods:

Function

Method Name

Corresponding Cap Property

Purchase

AuthorizeSales

None

Cancel Purchase

AuthorizeVoid

CapAuthorizeVoid

Refund Purchase

AuthorizeRefund

CapAuthorizeRefund

Authorization Completion

AuthorizeCompletion

CapAuthorizeCompletion

Pre-Authorization

AuthorizePreSales

CapAuthorizePreSales

Cancel Pre-Authorization

AuthorizeVoidPreSales

CapAuthorizeVoidPreSales

  • The CAT service object issues requests to the CAT device for special processing local to the CAT device by invoking the following methods:

Function

Method Name

Corresponding Cap Property

Card Check

CheckCard

CapCheckCard

Daily log

AccessDailyLog

CapDailyLog

  • The CAT service object stores the authorization results in the following properties when an authorization operation successfully completes:

Description

Property Name

Corresponding Cap Property

Account number

AccountNumber

None

Additional information

AdditionalSecurityInformation

CapAdditionalSecurityInformation

Approval code

ApprovalCode

None

Card company ID

CardCompanyID

None

Code from the approval agency

CenterResultCode

CapCenterResultCode

Payment condition

PaymentCondition

None

Payment detail

PaymentDetail

CapPaymentDetail

Sequence number

SequenceNumber

None

Slip number

SlipNumber

None

Center transaction number

TransactionNumber

CapTransactionNumber

Transaction type

TransactionType

None

  • The AccessDailyLog method sets the following property:

Description

Property Name

Correspondign Cap Property

Daily log

DailyLog

CapDailyLog

  • Sequence numbers are used to validate that the properties set at completion of a method are indeed associated with the completed method. An incoming sequenceNumber argument for each method is compared with the resulting SequenceNumber property after the operation associated with the method has completed. If the numbers do not match, or if an application fails to identify the number, there is no guarantee that the values of the properties listed in the two tables correspond to the completed method.

  • The AsyncMode property determines if methods are run synchronously or asynchronously.

    • When AsyncMode is FALSE, methods are executed synchronously and their corresponding properties will contain data when the method returns.

    • When AsyncMode is TRUE, methods will return immediately to the application. When the operation associated with the method completes, each corresponding property will be updated by the CAT service object before an OutputCompleteEvent. When AsyncMode is TRUE, methods cannot be issued immediately after issuing a prior method; only one outstanding asynchronous method is allowed at a time. However, ClearOutput is an exception because its purpose is to cancel an outstanding asynchronous method.

  • The methods supported and their corresponding properties vary depending on the CAT control implementation. Applications should verify that particular Cap properties are supported before using the capability-dependent methods and properties.

  • Results of synchronous calls to methods and writable properties are stored in DeviceErrorEventArgs.ErrorCode. Results of asynchronous processing are indicated by an OutputCompleteEvent event or returned in DeviceErrorEventArgs.ErrorCode. The result code from the approval agency is stored in CenterResultCode in either mode.

  • Training mode occurs continually when TrainingMode is TRUE. To discontinue training mode, set TrainingMode to FALSE.

  • An outstanding asynchronous method can be canceled via the ClearOutput method.

  • The Daily log can be collected by the AccessDailyLog method. Collection will be run either synchronously or asynchronously according to the value of AsyncMode.

Synchronous Mode Usage Sequence

  1. Open

  2. ClaimDevice

  3. DeviceEnabled=TRUE

  4. Definition of the sequenceNumber argument.

  5. Set PaymentMedia

  6. AuthorizeSales

  7. Check ErrorCode

  8. Verify that the SequenceNumber property matches the value of the AuthorizeSalessequenceNumber argument

  9. Access the properties set by AuthorizeSales

  10. DeviceEnabled=FALSE

  11. ReleaseDevice

  12. Close

Asynchronous Mode Usage Sequence

  1. Open

  2. ClaimDevice

  3. DeviceEnabled=TRUE

  4. AsyncMode=TRUE

  5. Definition of the sequenceNumber argument

  6. Set PaymentMedia

  7. AuthorizeSales

  8. Check ErrorCode

  9. Wait for OutputCompleteEvent

  10. Check the ErrorCode

  11. Verify that the SequenceNumber property matches the value of the AuthorizeSalessequenceNumber argument

  12. Access the properties set by AuthorizeSales

  13. DeviceEnabled=FALSE

  14. ReleaseDevice

  15. Close

Device sharing

The CAT is an exclusive-use device, as follows:

  • After opening the device, properties are readable.

  • The application must claim the device before enabling it.

  • The application must claim and enable the device before calling methods that manipulate the device.

Inheritance Hierarchy

System.Object
   Microsoft.PointOfService.PosDevice
     Microsoft.PointOfService.PosCommon
      Microsoft.PointOfService.Cat
         Microsoft.PointOfService.BasicServiceObjects.CatBasic

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, and Windows 2000

Target Platforms

See Also

Reference

Cat Members
Microsoft.PointOfService Namespace