atg.commerce.payment
Class DummyCreditCardProcessor

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.payment.DummyCreditCardProcessor
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, CreditCardProcessor, atg.payment.creditcard.DecreaseCreditCardAuthorizationProcessor, java.util.EventListener

public class DummyCreditCardProcessor
extends GenericService
implements CreditCardProcessor, atg.payment.creditcard.DecreaseCreditCardAuthorizationProcessor

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

See Also:
CreditCardProcessor

Field Summary
static java.lang.String CLASS_VERSION
           
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
DummyCreditCardProcessor()
           
 
Method Summary
 CreditCardStatus authorize(CreditCardInfo pCreditCardInfo)
          Authorize the amount on the credit card
 CreditCardStatus credit(CreditCardInfo pCreditCardInfo)
          Credit the amount on the credit card with as a new order
 CreditCardStatus credit(CreditCardInfo pCreditCardInfo, CreditCardStatus pStatus)
          Credit the amount on the credit card after debiting
 CreditCardStatus debit(CreditCardInfo pCreditCardInfo, CreditCardStatus pStatus)
          Debit the amount on the credit card after authorization
 CreditCardStatus decreaseAuthorization(CreditCardInfo pCreditCardInfo, PaymentStatus pAuthStatus)
          Decreases the authorized amount for the credit card.
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
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

DummyCreditCardProcessor

public DummyCreditCardProcessor()
Method Detail

authorize

public CreditCardStatus authorize(CreditCardInfo pCreditCardInfo)
Authorize the amount on the credit card

Specified by:
authorize in interface CreditCardProcessor
Parameters:
pCreditCardInfo - the CreditCardInfo reference which contains all the authorization data
Returns:
a CreditCardStatus object detailing the results of the authorization

debit

public CreditCardStatus debit(CreditCardInfo pCreditCardInfo,
                              CreditCardStatus pStatus)
Debit the amount on the credit card after authorization

Specified by:
debit in interface CreditCardProcessor
Parameters:
pCreditCardInfo - the CreditCardInfo reference which contains all the debit data
pStatus - the CreditCardStatus object which contains information about the transaction. This should be the object which was returned from authorize().
Returns:
a CreditCardStatus object detailing the results of the debit

credit

public CreditCardStatus credit(CreditCardInfo pCreditCardInfo,
                               CreditCardStatus pStatus)
Credit the amount on the credit card after debiting

Specified by:
credit in interface CreditCardProcessor
Parameters:
pCreditCardInfo - the CreditCardInfo reference which contains all the credit data
pStatus - the CreditCardStatus object which contains information about the transaction. This should be the object which was returned from debit().
Returns:
a CreditCardStatus object detailing the results of the credit

credit

public CreditCardStatus credit(CreditCardInfo pCreditCardInfo)
Credit the amount on the credit card with as a new order

Specified by:
credit in interface CreditCardProcessor
Parameters:
pCreditCardInfo - the CreditCardInfo reference which contains all the credit data
Returns:
a CreditCardStatus object detailing the results of the credit

decreaseAuthorization

public CreditCardStatus decreaseAuthorization(CreditCardInfo pCreditCardInfo,
                                              PaymentStatus pAuthStatus)
Decreases the authorized amount for the credit card.

This implementation does nothing but return a successful CreditCardStatus object.

Extend this method to do any credit card specific processing.

Specified by:
decreaseAuthorization in interface atg.payment.creditcard.DecreaseCreditCardAuthorizationProcessor
Parameters:
pCreditCardInfo - the CreditCardInfo reference which contains all the credit data
Returns:
a CreditCardStatus object detailing the results of the decrease