com.retek.component.payment.integration.storedvaluecard.test
Class MockStoredValueCardProcessor

java.lang.Object
  extended bycom.retek.component.payment.integration.storedvaluecard.test.MockStoredValueCardProcessor
All Implemented Interfaces:
SynchronousStoredValueCardProcessor

public class MockStoredValueCardProcessor
extends java.lang.Object
implements SynchronousStoredValueCardProcessor


Field Summary
static java.lang.String devBannerCode
           
static java.lang.String infiniteAvailableBalanceGiftCardAccountNumber
           
static java.lang.String infiniteAvailableBalanceGiftCardPinNumber
           
static java.lang.String testBannerCode
           
static java.lang.String validGiftCardAccountNumber
           
static java.lang.String validGiftCardAccountNumberTestDb
           
static java.lang.String validGiftCardAccountNumberTestDb2
           
static java.lang.String validGiftCardPinNumber
           
static java.lang.String validGiftCardPinNumberTestDb
           
static java.lang.String validGiftCardPinNumberTestDb2
           
static java.lang.String validMerchCardAccountNumber
           
static java.lang.String validMerchCardAccountNumber2
           
static java.lang.String validMerchCardAccountNumberTestDb
           
static java.lang.String validMerchCardPinNumber
           
static java.lang.String validMerchCardPinNumber2
           
static java.lang.String validMerchCardPinNumberTestDb
           
 
Constructor Summary
MockStoredValueCardProcessor()
           
 
Method Summary
 StoredValueCardAuthorizationResponse authorize(StoredValueCardAuthorizationRequest request)
          Handles the authorization of a single stored value card.
 StoredValueCardCashoutResponse cashout(StoredValueCardCashoutRequest request)
          Handles the cashout of a single stored value card.
static java.util.Map getLoadedStoredValueCards()
           
 StoredValueCardInquiryResponse inquiry(StoredValueCardInquiryRequest request)
          Handles the inquiry of a single stored value card.
static void loadStoredValueCard(java.lang.String accountNumber, java.lang.String pinNumber, java.math.BigDecimal availableBalance, java.lang.String bannerId, boolean giftCard)
           
 void voidAuthorization(StoredValueCardAuthorizationRequest request)
          Handles a void authorization of a single stored value card.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

devBannerCode

public static final java.lang.String devBannerCode
See Also:
Constant Field Values

infiniteAvailableBalanceGiftCardAccountNumber

public static final java.lang.String infiniteAvailableBalanceGiftCardAccountNumber
See Also:
Constant Field Values

infiniteAvailableBalanceGiftCardPinNumber

public static final java.lang.String infiniteAvailableBalanceGiftCardPinNumber
See Also:
Constant Field Values

validGiftCardAccountNumber

public static final java.lang.String validGiftCardAccountNumber
See Also:
Constant Field Values

validGiftCardPinNumber

public static final java.lang.String validGiftCardPinNumber
See Also:
Constant Field Values

validMerchCardAccountNumber

public static final java.lang.String validMerchCardAccountNumber
See Also:
Constant Field Values

validMerchCardPinNumber

public static final java.lang.String validMerchCardPinNumber
See Also:
Constant Field Values

validMerchCardAccountNumber2

public static final java.lang.String validMerchCardAccountNumber2
See Also:
Constant Field Values

validMerchCardPinNumber2

public static final java.lang.String validMerchCardPinNumber2
See Also:
Constant Field Values

testBannerCode

public static final java.lang.String testBannerCode
See Also:
Constant Field Values

validGiftCardAccountNumberTestDb

public static final java.lang.String validGiftCardAccountNumberTestDb
See Also:
Constant Field Values

validGiftCardPinNumberTestDb

public static final java.lang.String validGiftCardPinNumberTestDb
See Also:
Constant Field Values

validGiftCardAccountNumberTestDb2

public static final java.lang.String validGiftCardAccountNumberTestDb2
See Also:
Constant Field Values

validGiftCardPinNumberTestDb2

public static final java.lang.String validGiftCardPinNumberTestDb2
See Also:
Constant Field Values

validMerchCardAccountNumberTestDb

public static final java.lang.String validMerchCardAccountNumberTestDb
See Also:
Constant Field Values

validMerchCardPinNumberTestDb

public static final java.lang.String validMerchCardPinNumberTestDb
See Also:
Constant Field Values
Constructor Detail

MockStoredValueCardProcessor

public MockStoredValueCardProcessor()
Method Detail

authorize

public StoredValueCardAuthorizationResponse authorize(StoredValueCardAuthorizationRequest request)
                                               throws StoredValueCardProcessingException
Description copied from interface: SynchronousStoredValueCardProcessor
Handles the authorization of a single stored value card. If the authorization is successful, the Stored Value Card is debited in the external system.

Specified by:
authorize in interface SynchronousStoredValueCardProcessor
Parameters:
request - - Account number, pin number, and requested authorize amount
Returns:
response - Authorization date, available balance and status
Throws:
StoredValueCardProcessingException - if the system is unable to process the authorization request.

voidAuthorization

public void voidAuthorization(StoredValueCardAuthorizationRequest request)
                       throws StoredValueCardProcessingException
Description copied from interface: SynchronousStoredValueCardProcessor
Handles a void authorization of a single stored value card. If the void authorization is successful, the Stored Value Card is credited in the external system.

Specified by:
voidAuthorization in interface SynchronousStoredValueCardProcessor
Parameters:
request - - Account number, pin number, and requested void amount
Throws:
StoredValueCardProcessingException - if the system is unable to process the void authorization request.

inquiry

public StoredValueCardInquiryResponse inquiry(StoredValueCardInquiryRequest request)
                                       throws StoredValueCardProcessingException
Description copied from interface: SynchronousStoredValueCardProcessor
Handles the inquiry of a single stored value card.

Specified by:
inquiry in interface SynchronousStoredValueCardProcessor
Parameters:
request - - Account number
Returns:
response - Available balance, banner ID, card type
Throws:
StoredValueCardProcessingException - if the system is unable to process the inquiry request.

cashout

public StoredValueCardCashoutResponse cashout(StoredValueCardCashoutRequest request)
                                       throws StoredValueCardProcessingException
Description copied from interface: SynchronousStoredValueCardProcessor
Handles the cashout of a single stored value card. Should not allow a cashout on a merchandise card.

Specified by:
cashout in interface SynchronousStoredValueCardProcessor
Parameters:
request - - Account number
Returns:
response - Amount refunded
Throws:
StoredValueCardProcessingException - if the system is unable to process the inquiry request.

getLoadedStoredValueCards

public static java.util.Map getLoadedStoredValueCards()

loadStoredValueCard

public static void loadStoredValueCard(java.lang.String accountNumber,
                                       java.lang.String pinNumber,
                                       java.math.BigDecimal availableBalance,
                                       java.lang.String bannerId,
                                       boolean giftCard)


Copyright © 2004 Retek Inc. All Rights Reserved. - Generated at Fri, 10/22/2004 07:28