com.bea.alcs.domain.payment.impl
Class AbstractCreditCardPaymentGatewayImpl

java.lang.Object
  extended by com.bea.alcs.domain.impl.AbstractEpDomainImpl
      extended by com.bea.alcs.domain.impl.AbstractPersistenceImpl
          extended by com.bea.alcs.domain.impl.AbstractValueObjectImpl
              extended by com.bea.alcs.domain.payment.impl.AbstractPaymentGatewayImpl
                  extended by com.bea.alcs.domain.payment.impl.AbstractCreditCardPaymentGatewayImpl
All Implemented Interfaces:
EpDomain, CreditCardPaymentGateway, PaymentGateway, Persistence, ValueObject, java.io.Serializable
Direct Known Subclasses:
AuthorizeNetPaymentGatewayImpl, CyberSourcePaymentGatewayImpl, NullPaymentGatewayImpl, PayflowProPaymentGatewayImpl, PaypalDoDirectPaymentGatewayImpl

public abstract class AbstractCreditCardPaymentGatewayImpl
extends AbstractPaymentGatewayImpl
implements CreditCardPaymentGateway

Abstract credit card payment processing gateway. Extend this to implement specific gateways such as CyberSource or Verisign.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.bea.alcs.domain.payment.impl.AbstractPaymentGatewayImpl
serialVersionUID, TABLE_NAME
 
Fields inherited from class com.bea.alcs.domain.impl.AbstractPersistenceImpl
DECIMAL_PRECISION, DECIMAL_SCALE
 
Constructor Summary
AbstractCreditCardPaymentGatewayImpl()
           
 
Method Summary
 PayerAuthenticationEnrollmentResult checkEnrollment(ShoppingCart shoppingCart, OrderPayment payment)
          Check the card account enrollment.
 java.util.List<java.lang.String> getSupportedCardTypes()
          Get the card types supported by this payment gateway.
 boolean isCvv2ValidationEnabled()
          True if this gateway will validate the Cvv2 (Security Code).
 void setSupportedCardTypes(java.util.List<java.lang.String> cardTypes)
          Set the card types supported by this payment gateway.
 void setValidateCvv2(boolean validate)
          Set whether the payment gateway should validate the Cvv2.
 boolean validateAuthentication(OrderPayment payment, java.lang.String paRes)
          Validate the authentication.
 
Methods inherited from class com.bea.alcs.domain.payment.impl.AbstractPaymentGatewayImpl
buildProperties, finalizeShipment, getDefaultPropertyKeys, getName, getPropertiesMap, getSupportedCurrencies, getUidPk, isEmpty, mergeProperties, refund, setName, setProperties, setPropertiesMap, setSupportedCurrencies, setUidPk
 
Methods inherited from class com.bea.alcs.domain.impl.AbstractPersistenceImpl
executeBeforePersistAction, isPersistent
 
Methods inherited from class com.bea.alcs.domain.impl.AbstractEpDomainImpl
getBooleanHashCode, getElasticPath, getObjectHashCode, getUtility, setDefaultValues, setElasticPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.bea.alcs.domain.payment.PaymentGateway
buildProperties, capture, finalizeShipment, getName, getPaymentType, getPropertiesMap, getSupportedCurrencies, getType, mergeProperties, preAuthorize, refund, reversePreAuthorization, sale, setName, setProperties, setPropertiesMap, setSupportedCurrencies, voidCaptureOrCredit
 
Methods inherited from interface com.bea.alcs.domain.Persistence
executeBeforePersistAction, getUidPk, isPersistent, setUidPk
 
Methods inherited from interface com.bea.alcs.domain.EpDomain
getElasticPath, getUtility, setDefaultValues, setElasticPath
 

Constructor Detail

AbstractCreditCardPaymentGatewayImpl

public AbstractCreditCardPaymentGatewayImpl()
Method Detail

getSupportedCardTypes

public java.util.List<java.lang.String> getSupportedCardTypes()
Get the card types supported by this payment gateway.

Specified by:
getSupportedCardTypes in interface CreditCardPaymentGateway
Returns:
a List of card type strings (e.g. VISA)

setSupportedCardTypes

public void setSupportedCardTypes(java.util.List<java.lang.String> cardTypes)
Set the card types supported by this payment gateway.

Parameters:
cardTypes - a List of card type strings (e.g. VISA)

isCvv2ValidationEnabled

public boolean isCvv2ValidationEnabled()
True if this gateway will validate the Cvv2 (Security Code).

Specified by:
isCvv2ValidationEnabled in interface CreditCardPaymentGateway
Returns:
True if this gateway will validate the Cvv2 (Security Code)

setValidateCvv2

public void setValidateCvv2(boolean validate)
Set whether the payment gateway should validate the Cvv2.

Specified by:
setValidateCvv2 in interface CreditCardPaymentGateway
Parameters:
validate - true if the payment gateway should validate the Cvv2.

checkEnrollment

public PayerAuthenticationEnrollmentResult checkEnrollment(ShoppingCart shoppingCart,
                                                           OrderPayment payment)
Check the card account enrollment.

Specified by:
checkEnrollment in interface CreditCardPaymentGateway
Parameters:
shoppingCart - the shoppingCart
payment - orderPayment.
Returns:
result of enrollment checking.

validateAuthentication

public boolean validateAuthentication(OrderPayment payment,
                                      java.lang.String paRes)
Validate the authentication.

Specified by:
validateAuthentication in interface CreditCardPaymentGateway
Parameters:
payment - orderPayment.
paRes - from issuing bank.
Returns:
boolean successful value for validation.