Docstoc

The EFT Service

Document Sample
The EFT Service Powered By Docstoc
					2007
Landsteinar Strengur

Halldór Dungal




[THE EFT AND CARD SERVICES FOR LS POS .NET]
Describes the EFT service that is a part of the LS POS.NET
   The EFT and Card Services for LS POS .NET

Contents
Introduction ...................................................................................................................................................................3
   Purpose ......................................................................................................................................................................3
   Requirements .............................................................................................................................................................3
   Definitions, Acronyms and Abbreviations .................................................................................................................3
   Functional Overview .................................................................................................................................................3
   Design Overview ........................................................................................................................................................3
       International Credit/Debit Card .............................................................................................................................4
       Unknown Card ......................................................................................................................................................4
       Corporate Card .....................................................................................................................................................4
       Customer Card .......................................................................................................................................................4
       Employee Card .......................................................................................................................................................5
       Salesperson Card ...................................................................................................................................................5
   The Card Service.........................................................................................................................................................5
       The Card Service Interface .....................................................................................................................................5
       The Card Service Localization.................................................................................................................................5
   The EFT Service ..........................................................................................................................................................8
       The EFT Service Interface .......................................................................................................................................8
       The EFT Service Localization ..................................................................................................................................9




                                                                                             Landsteinar Strengur | Startup Parameters                              2
Introduction

 Purpose
The purpose of this document is to aid the software programmer in implementing a company/country specific EFT
service for the LSPOS.NET.

 Requirements
To design and test a new version of the EFT service a Visual Studio 2005 and .NETFramework 2.0 and a version 5.x
or newer of the LS POS.NET is needed.


 Definitions, Acronyms and Abbreviations



            Term                     Description
            EFT                      Electronic Funds Transfer
            POS                      Point of Sale




 Functional Overview
The POS has two entry points for the card payments. A card can be swiped at any time during a transaction. This
will mean that the operator will pay the balance amount and thereby finish the transaction Some predefined
amount can also be payed if the operator selectes the card payment operations. The operator then enteres a form
where he can enter some amount and then swipe or manually enter the card number.

When a card is swiped id does not always mean that a card payment will be made. Cards can also be used to
identify POS operators, salespersons and customers. Payment cards can also be handeled differently, i.e a
corporate cards (fleets cards) has it‘s own service.

In most cases developers will focus on the EFT service.

 Design Overview
When a card is swiped, then the POS calls a core operation that calls the GetCardType method in the Card
service(Card.dll) GetCardType will find out the type of card and will store the card information in the CardInfo
object. The internal process can handel the following card types:

        International Credit Card
        International Debit Card
        Unknown Card
        Corporate Card
        Loyalty Card
        Customer Card
        Employee Card
        Salesperson Card


                                                                 Landsteinar Strengur | Startup Parameters   3
Each type of card has its own process, where the card information is sent to for a completion of the card handling.


A overview of this process can be shown in this diagram.



                      Manual Enter                                                     Card Swipe



                                                       Card Service

                                                                                               Employee Card



                                                                                               Customer Card
     Corporate Card                   EFT Service


                                                                                              Salesperson Card

    Local Card Broker                 EFT Broker




 International Credit/Debit Card
When a card has been identified as a debit or credit card, then the method ProcesscardPayment will be called in the
EFT service (EFT.dll). This method will connect to a external card broker that can authorize or reject the card. If the
card is authorized then a card payment line will be added to the transaction.


 Unknown Card
If the Card service does not identify the card then the IdentifyCard method in the EFT service is called to identify the
card, before the ProcessCardPayment is called in the EFT service.


 Corporate Card
A corporate card is card that is issued and authorized by the company using the LSPOS.NET. This can be a fleetcard
or a regular corporate card. With this card the customer can pay for the items bought. If a card is identified as a
corporate card then the method ProcessCardPayment is called in the Corporate service(CorporateCard.dll).


 Customer Card
A customer card is a card to identify the customer but is not used for payments as the corporate card is. The card
will simply add customer information of the customer to the transaction. A core process takes care of this.




                                                               Landsteinar Strengur | Startup Parameters       4
 Employee Card
An employee card is used to log employees onto the POS. A core process takes care of this.


 Salesperson Card
A salesperson card is used to add a salesperson‘s id to a certain item in a sales transaction. A core process takes
care of this.


 The Card Service
The card service has the main function of identifing a card so the card information can be sent to the appropriate
process.

 The Card Service Interface
The card interface has the following methods:

        void GetCardType(ref CardInfo cardInfo)
        bool IsCardLengthValid(string cardNumber)
        bool IsExpirydateValid(string expirationDate)


GetCardType
This method is used to identify the different card types. It uses the following tables to get the card information:

        RBOStoreTenderTypeCardTable
        RBOTenderTypeCardTable
        RBOTenderTypeCardNumbers


IsCardLengthvalid
This method is only used by the Card form where the POS operator can manually enter the card number.

IsExpirydateValid
This method is only used by the Card form where the POS operator can manually enter the expiry date.

 The Card Service Localization
To localize the Card service, only minor or no changes should be needed in most cases. Developers should receive
the code for the Card project, and can do the changes needed on that project. The Card service takes use of a
CardInfo class, that is found as part of the CardInterface to transfer information between objects.

The CardInfo has the following properties:
     CardEntryType
     Track2
     CardNumber
     CardNumberHidden
     ExpDate
     CardTypeId
     CardType

                                                               Landsteinar Strengur | Startup Parameters      5
        CardName
        BinFrom
        BinTo
        BinLength
        ModulusCheck
        ExpDateCheck
        ProcessLocally
        TenderTypeId
        Issuer
        AllowManulInput
        EnterFleetInfo
        CardFee


CardEntryType
Enum value: CardEntryTypes
This property will store if the card information was manully entered or read by a magnetic stripe reader.

Track2
String value
Stores the track2 information of the magnetic stripe card, if the card was swept through a card reader.

CardNumber
String value
Stores the card number.


CardNumberHidden
Boolean value
Is set to true if the cardnumber should be hidden.

ExpDate
String value
Keeps the expiry date of the card

CardTypeId
Integer value
A id for the card type.

CardType
Enum value: CardTypes
The enum can have the following values:
     InternationalCreditCard
     InternationalDebitCard
     LoyaltyCard
     CorporateCard
     CustomerCard
     EmployeeCard


                                                             Landsteinar Strengur | Startup Parameters      6
        SalespersonCard
        Unknown

Further information about the different cards can be seen in the „Design overview“.

CardName
String value
The name of the card, i.e VISA,Mastercard, etc.

BinFrom
String value
The BIN series start value.

BinTo
String value
The BIN series end value.

ModulusCheck
Boolean value
Should the cardnumber fulfill a modulus check.

ExpDateCheck
Boolean value
Should the expire date be checked for the card.



ProcessLocally
Boolean value
Set to true if the card authorization should be processed locally.

TenderTypeId
String value
The id of the tender type that the card is connected to.

Issuer
String value
The name of the issuer.

AllowManualInput
Boolean value
Is set to true if a manual input of a card and expiry date is allowed for the card.

EnterFleetInfo
Boolean value
Is set to true if fleet info should be entered for the card. Should be true only for special fleet cards.



                                                                 Landsteinar Strengur | Startup Parameters   7
CardFee
Decimal value
The card fee.


 The EFT Service
The EFT service has the main function of authorizing the debit and credit cards.


 The EFT Service Interface
The EFT interface has the following methods

        bool ProcessCardPayment(ref EFTInfo efInfo, object posTransaction)
        bool VoidTransaction(ref EFTInfo efInfo, object posTransaction)
        void RefundTransaction(ref EFTInfo efInfo, object posTransaction)
        bool ManualAuthCodeTransaction(ref EFTInfo efInfo, object posTransaction)
        void IdentifyCard(ref cardInfo cardInfo, ref EFTInfo eftInfo)
        void GetBatchAmount(ref EFTInfo efInfo, object posTransaction)
        void GetCurrentBatchNumber(ref EFTInfo efInfo, object posTransaction)
        void IncrementBatchNumber()

ProcessCardPayment
This method takes care of connecting to an external service to get a card authorization or rejection.

VoidTransaction
This method takes care of voiding a cardpayment.

RefundTransaction
Has not been implemented. For future use.

ManualAuthCodeTransaction
Has not been implemented. For future use.

IdentifyCard
Is used by different processes to identify the card type.

GetBatchAmount
Has not been implemented. For future use.

GetCurrentBatchNumber
Has not been implemented. For future use.

IncrementBatchNumber
Can be used in the EODTriggers, i.e PostEndOfShift to increment a batchnumber for the cards sent to a EFT broker.




                                                              Landsteinar Strengur | Startup Parameters   8
 The EFT Service Localization
To starting to localizing the EFT Service it can be a good starting point to look at some already finished solutions. A
source code for a already finised solution is available. This soulution can only be used as a code reference, to see
the structure of the code.

The service takes use of the EFTInfo class to transfer information between objects.

The EFTInfo class has the following properties:

        Timeout
        MerchantNumber
        TerminalNumber
        terminalId
        StoreNumber
        Track2
        CardNumber
        CardNumberHidden
        ExpDate
        CardEntryType
        CardName
        Amount
        AmounInCents
        StaffId
        TransactionNumber
        Authorized
        AuthCode
        CardType
        TenderType
        AcquirerName
        TransactionDateTime
        IssuerNumber
        BatchNumber
        AuthString
        VisaAuthCode
        EuropayAuthCode
        BatchCode
        SequenceCode
        ResponceCode
        TransactionType
        Message
        IssuerName
        ErrorCode
        ReferralTelNumber
        AuthSourceCode
        EntrySourceCode
        ProcessLocally
        NotAuthorizedText
        AuthorizedText
        TrackSeperator
        PreviousSequnceCode


                                                               Landsteinar Strengur | Startup Parameters       9
Timeout
Integer value
The number of seconds to wait for the EFT server.

MerchantNumber
String value
A unique merchant number from card company.

TerminalNumber
String value
Identification of the terminal making the authorization request.

TerminalId
String value
A unique terminal id as identified by the card company.

StoreNumber
String value
The store number as identified by the card company

Track2
String value
The track2 of the magnetic stripe of the card, if the card was swept through a card reader.


CardNumber
String value
The cardnumber

CardNumberHidden
Boolean value
Is set to true if the cardnumber should be hidden.

ExpDate
String value
Holds the expiry date of the card

CardEntryType
Enum value: CardEntryTypes
This property will store if the card information was manully entered or read by a magnetic stripe reader.

CardName
String value
The name of the card, i.e VISA,Mastercard, etc.



                                                             Landsteinar Strengur | Startup Parameters      10
Amount
Integer value
The amount to be paid without any decimals.

AmountInCents
Integer value
The amount to be paid stored in cents, that is the amount * 100

StaffId
String value
The id of the operator.

TransactionNumber
Integer value
For a normal transaction, the transaction number can be read after the transaction. If this is a void transaction this
property has to contain the transaction number to void.

Authorized
Bool value
This value is set to true if the payment was authorized and false if the authorization was declined.

AuthCode
String value
For a normal card payment the authentication code can be read from this property. When a manual authentication
is made then this property has to be set.


CardType
Enum value: EFTCardTypes
Enum that tells if a card used is a debit or a credit card.

TenderType
Integer value
The tender type for the card.

AcquirerName
String value
The acquirer name to be printed on the card slip.

TransactionDateTime
DateTime value
The date and time of the transaction

IssuerNumber
Integer value
The issuer number


                                                              Landsteinar Strengur | Startup Parameters      11
BatchNumber
Long value
The current batch number for the terminal

AuthString
String value
A zero left padded six digit number

VisaAuthCode
String value
The contract number used for VISA

EuropayAuthCode
String value
The contract number use for Europay

BatchCode
String value
A concatenated string specially used for the receipt

SequenceCode
String value
A concatenated sequence code specially used for the receipt




ResponseCode
String value
A code that shows if an authorization was made or rejected. The code can also give information about the reason
of a rejection.

TransactionType
Integer value
This value store stores an integer value defining the type of transaction, i.e Normal sale, Void transaction, Refund
etc. The values are defined in accordance with the card broker.

Message
String value
Messages received from the card broker.

IssuerName
String value
The name of the issuer

ErrorCode
String value

                                                              Landsteinar Strengur | Startup Parameters      12
An errorcode received from the card broker

ReferralTelNumber
String value
If a authorization is rejected by the card broker but the operator is allowed to call for a manual authorization code,
the phonenumber is stored in this value.

AuthSourceCode
String value
Stores a code that informes how the authorization was generated, i.e Online, Offline, etc.

EntrySourceCode
String value
Code that depends on how the cardnumber was entered into the system, i.e swiped, manually entered.

ProcessLocally
Boolean value
If the card should be prcessed locally and not sent to the EFTP service provider

NotAuthorizedText
String value
Authorization rejection text

TrackSeperator
String value
The track seperator

PerviousSequenceCode
String value
A previous sequence code used when voiding a previous card payment.




                                                              Landsteinar Strengur | Startup Parameters      13

				
DOCUMENT INFO