atg.integrations.cybersource
Class CyberSourceAddressVerification

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.integrations.cybersource.CyberSourceAddressVerification
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, AddressVerificationProcessor, java.util.EventListener

public class CyberSourceAddressVerification
extends GenericService
implements AddressVerificationProcessor

This class manages the communications to a CyberSource AVS system


Field Summary
static java.lang.String CLASS_VERSION
           
 boolean mCheckZip
          Used to check the zip code for the shipping address
 CyberSourceConnection mCsCon
          CyberSourceConnection module that is resposible for communication with the cybersource payment system
 
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
CyberSourceAddressVerification()
          Default constructor
 
Method Summary
 void doStartService()
          Initialize and start the service
 boolean getCheckZip()
           
 CyberSourceConnection getCsCon()
           
 void setCheckZip(boolean pCheckZip)
           
 void setCsCon(CyberSourceConnection pCsCon)
           
 java.lang.String toString()
           
 java.lang.String trimZip(java.lang.String pZip)
          Checks if the zip code is less than 5 digits
 AddressVerificationStatus verification(AddressVerificationInfo ccinfo)
           
 AddressVerificationStatus verifyAddress(AddressVerificationInfo ccinfo)
          Perform address verification on the information specified in pAvsInfo
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, 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, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION

mCsCon

public CyberSourceConnection mCsCon
CyberSourceConnection module that is resposible for communication with the cybersource payment system


mCheckZip

public boolean mCheckZip
Used to check the zip code for the shipping address

Constructor Detail

CyberSourceAddressVerification

public CyberSourceAddressVerification()
Default constructor

Method Detail

setCsCon

public void setCsCon(CyberSourceConnection pCsCon)

getCsCon

public CyberSourceConnection getCsCon()

setCheckZip

public void setCheckZip(boolean pCheckZip)

getCheckZip

public boolean getCheckZip()

verifyAddress

public AddressVerificationStatus verifyAddress(AddressVerificationInfo ccinfo)
Description copied from interface: AddressVerificationProcessor
Perform address verification on the information specified in pAvsInfo

Specified by:
verifyAddress in interface AddressVerificationProcessor
Parameters:
ccinfo - the AvsInfo reference which contains all the address values
Returns:
a AvsStatus object detailing the results of the verification

verification

public AddressVerificationStatus verification(AddressVerificationInfo ccinfo)
                                       throws com.cybersource.ics.base.exception.ICSException
Throws:
com.cybersource.ics.base.exception.ICSException

doStartService

public void doStartService()
                    throws ServiceException
Initialize and start the service

Overrides:
doStartService in class GenericService
Throws:
ServiceException - if the Service had a problem starting up

trimZip

public java.lang.String trimZip(java.lang.String pZip)
                         throws com.cybersource.ics.base.exception.ICSException
Checks if the zip code is less than 5 digits

Parameters:
pZip - A zip code string to be trimed and checked
Returns:
A trimed zip code string
Throws:
com.cybersource.ics.base.exception.ICSException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a String representation of this object