Share via


Cat Class (POS for .NET v1.12 SDK Documentation)

2/27/2008

Defines the programmatic interface for a UPOS credit authorization terminal (CAT) device.

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

Syntax

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

Remarks

The CAT control can perform 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 example, through 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 that contains 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 that uses the communications device.

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

A CAT control that is considered as an electronic money device has the following additional model composition:

  • The electronic money device is constituted by card reader [contact type / contact-less type], communication module for Closing processing and so on.

  • The electronic money device receives the information about amount of money, tax, and so on from CAT control, and then starts settlement processing.

  • When the electronic money device is required settlement of account requirement by CAT control, it generally requires card [contact type / contact-less type].

  • When a card [contact type / contact-less type] is input by the electronic money device, it tries to close the account by information about amount of money, tax, and so on.

  • The electronic money device sends CAT control settlement result to CAT control. The settlement result is stored in each property by the CAT control, and notifies the application.

  • After the electronic money device receives the settlement requirement from the application, the remaining operations occur on the side of the electronic money device. Lastly, the settlement result is sent to the application.

  • The electronic money device may save the settlement result as DealingLog on the device memory. Such as device may send DealingLog to the Center by closing processing.

Programming Model

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

  • 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 finishes successfully.

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

Corresponding Cap Property

Daily log

DailyLog

CapDailyLog

DealingLog

DailyLog

CapDailyLog

  • The CAT control requires the electronic money device to each settlement and closing DealingLog requirement by the following methods.

Function

Property Name

Corresponding Cap Property

Settlement

AuthorizeSales

None

Charge

CashDeposit

CapCashDeposit

Inquiry for the balances

CheckCard

CapCheckCard

Closing DealingLog

AccessDailyLog

CapDailyLog

Setting security lock

LockTerminal

CapLockTerminal

Releasing security lock

UnlockTerminal

CapUnlockTerminal

  • When the CAT Control receives the settlement results from the electronic money device, it stores these results in the following properties.

Description

Property Name

Corresponding Cap Property

CardId

AccountNumber

None

More information

AdditionalSecurityInformation

CapAdditionalSecurityInformation

Approval code

ApprovalCode

None

Settled amount

SettledAmount

None

Balance

Balance

None

Sequence number

SequenceNumber

None

Transaction type

TransactionType

None

  • 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 finished. If the numbers do not match, or if an application does not determine 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 whether 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 return immediately to the application. When the operation associated with the method is complete, each corresponding property is 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 applications use the capability-dependent methods and properties.

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

  • Training mode occurs continually when TrainingMode is true. To stop training mode, set TrainingMode to false.

  • An outstanding asynchronous method can be canceled through 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. Claim Device

  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. Release Device.

  12. Close.

Asynchronous Mode Usage Sequence

  1. Open.

  2. Claim Device.

  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 .

DeviceEnabled=false.

  1. Release Device.

  2. Close.

Device Sharing

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

  • After you open the device, properties are readable.

  • The application must claim the device before the application enables it.

  • The application must claim and enable the device before the application calls 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.

See Also

Reference

Cat Members
Microsoft.PointOfService Namespace