atg.commerce.payment
Class DummyGiftCertificateProcessor

java.lang.Object
  extended by atg.commerce.payment.DummyGiftCertificateProcessor
All Implemented Interfaces:
GiftCertificateProcessor

public class DummyGiftCertificateProcessor
extends java.lang.Object
implements GiftCertificateProcessor

This class is a dummy gift certificate processor. It purpose is to be a placeholder for a real gift certificate processor. The implementations of all the methods in this class construct a new GiftCertificateStatus object with dummy success data and return it to the caller.

See Also:
GiftCertificateProcessor

Field Summary
static java.lang.String CLASS_VERSION
           
 
Constructor Summary
DummyGiftCertificateProcessor()
           
 
Method Summary
 GiftCertificateStatus authorize(GiftCertificateInfo pGiftCertificateInfo)
          Authorize the gift certificate
 GiftCertificateStatus credit(GiftCertificateInfo pGiftCertificateInfo)
          Credit the amount on the gift certificate without a previous debit.
 GiftCertificateStatus credit(GiftCertificateInfo pGiftCertificateInfo, PaymentStatus pStatus)
          Credit the amount on the gift certificate after debiting.
 GiftCertificateStatus debit(GiftCertificateInfo pGiftCertificateInfo, PaymentStatus pStatus)
          Debit the amount on the gift certificate after authorization
 GiftCertificateStatus expireAuthorization(GiftCertificateInfo pGiftCertificateInfo)
          Expire a gift certificate authorization
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Constructor Detail

DummyGiftCertificateProcessor

public DummyGiftCertificateProcessor()
Method Detail

authorize

public GiftCertificateStatus authorize(GiftCertificateInfo pGiftCertificateInfo)
Authorize the gift certificate

Specified by:
authorize in interface GiftCertificateProcessor
Parameters:
pGiftCertificateInfo - the GiftCertificateInfo reference which contains all the authorization data
Returns:
a GiftCertificateStatus object detailing the results of the authorization

expireAuthorization

public GiftCertificateStatus expireAuthorization(GiftCertificateInfo pGiftCertificateInfo)
Expire a gift certificate authorization

Specified by:
expireAuthorization in interface GiftCertificateProcessor
Parameters:
pGiftCertificateInfo - the GiftCertificateInfo reference which contains all the authorization expiration data
Returns:
a GiftCertificateStatus object detailing the results of the authorization

debit

public GiftCertificateStatus debit(GiftCertificateInfo pGiftCertificateInfo,
                                   PaymentStatus pStatus)
Debit the amount on the gift certificate after authorization

Specified by:
debit in interface GiftCertificateProcessor
Parameters:
pGiftCertificateInfo - the GiftCertificateInfo reference which contains all the debit data
pStatus - the PaymentStatus object which contains information about the transaction. This should be the object which was returned from authorize().
Returns:
a GiftCertificateStatus object detailing the results of the debit

credit

public GiftCertificateStatus credit(GiftCertificateInfo pGiftCertificateInfo,
                                    PaymentStatus pStatus)
Credit the amount on the gift certificate after debiting.

Specified by:
credit in interface GiftCertificateProcessor
Parameters:
pGiftCertificateInfo - the GiftCertificateInfo reference which contains all the credit data
pStatus - the PaymentStatus object which contains information about the transaction. This should be the object which was returned from debit().
Returns:
a GiftCertificateStatus object detailing the results of the credit

credit

public GiftCertificateStatus credit(GiftCertificateInfo pGiftCertificateInfo)
Credit the amount on the gift certificate without a previous debit.

Specified by:
credit in interface GiftCertificateProcessor
Parameters:
pGiftCertificateInfo - the GiftCertificateInfo reference which contains all the credit data
Returns:
a GiftCertificateStatus object detailing the results of the credit