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

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.ExchangePaymentGatewayImpl
All Implemented Interfaces:
EpDomain, ExchangePaymentGateway, PaymentGateway, Persistence, ValueObject, java.io.Serializable

public class ExchangePaymentGatewayImpl
extends AbstractPaymentGatewayImpl
implements ExchangePaymentGateway

Payment gateway for Exchange order.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Fields inherited from class com.bea.alcs.domain.payment.impl.AbstractPaymentGatewayImpl
TABLE_NAME
 
Fields inherited from class com.bea.alcs.domain.impl.AbstractPersistenceImpl
DECIMAL_PRECISION, DECIMAL_SCALE
 
Constructor Summary
ExchangePaymentGatewayImpl()
           
 
Method Summary
 void capture(OrderPayment orderPayment)
          Captures a payment on a previously authorized amount.
protected  java.util.Set<java.lang.String> getDefaultPropertyKeys()
          Gets the list of default property keys for a payment gateway.
 PaymentType getPaymentType()
          Get the type of this payment gateway.
 java.lang.String getType()
          Return the type of this payment gateway - accessor for the discriminator value.
 void preAuthorize(OrderPayment orderPayment, Address billingAddress)
          Pre-authorize a payment.
 void refund(OrderPayment payment, Address billingAddress)
          Refunds a previous capture.
 void reversePreAuthorization(OrderPayment orderPayment)
          Reverse a previous pre-authorization.
 void sale(OrderPayment orderPayment, Address billingAddress)
          Make a payment without pre-authorization.
protected  void setType(java.lang.String type)
          Set the type of this payment gateway.
 void voidCaptureOrCredit(OrderPayment orderPayment)
          Void a previous capture or credit.
 
Methods inherited from class com.bea.alcs.domain.payment.impl.AbstractPaymentGatewayImpl
buildProperties, finalizeShipment, getName, getPropertiesMap, getSupportedCurrencies, getUidPk, isEmpty, mergeProperties, 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, finalizeShipment, getName, getPropertiesMap, getSupportedCurrencies, mergeProperties, setName, setProperties, setPropertiesMap, setSupportedCurrencies
 
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
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Serial version id.

See Also:
Constant Field Values
Constructor Detail

ExchangePaymentGatewayImpl

public ExchangePaymentGatewayImpl()
Method Detail

getType

public java.lang.String getType()
Return the type of this payment gateway - accessor for the discriminator value.

Specified by:
getType in interface PaymentGateway
Returns:
the type of this gateway

setType

protected void setType(java.lang.String type)
Set the type of this payment gateway. Should only be used by JPA.

Parameters:
type - the type to set

getPaymentType

public PaymentType getPaymentType()
Get the type of this payment gateway.

Specified by:
getPaymentType in interface PaymentGateway
Returns:
the payment type

preAuthorize

public void preAuthorize(OrderPayment orderPayment,
                         Address billingAddress)
Pre-authorize a payment.

Specified by:
preAuthorize in interface PaymentGateway
Parameters:
orderPayment - the order payment to be preauthorized
billingAddress - the name and address of the person being billed
Throws:
PaymentGatewayException - if the payment processing fails

capture

public void capture(OrderPayment orderPayment)
Captures a payment on a previously authorized amount.

Specified by:
capture in interface PaymentGateway
Parameters:
orderPayment - the payment to be captured
Throws:
PaymentGatewayException - if the payment processing fails

sale

public void sale(OrderPayment orderPayment,
                 Address billingAddress)
Make a payment without pre-authorization.

Specified by:
sale in interface PaymentGateway
Parameters:
orderPayment - the payment to be preauthorized
billingAddress - the name and address of the person being billed
Throws:
PaymentGatewayException - if the payment processing fails

voidCaptureOrCredit

public void voidCaptureOrCredit(OrderPayment orderPayment)
Void a previous capture or credit. Can usually only be executed on the same day of the original transaction.

Specified by:
voidCaptureOrCredit in interface PaymentGateway
Parameters:
orderPayment - the payment to be voided

refund

public void refund(OrderPayment payment,
                   Address billingAddress)
Refunds a previous capture.

Specified by:
refund in interface PaymentGateway
Overrides:
refund in class AbstractPaymentGatewayImpl
Parameters:
payment - the payment to be refunded
billingAddress - billing address

reversePreAuthorization

public void reversePreAuthorization(OrderPayment orderPayment)
Reverse a previous pre-authorization.

Specified by:
reversePreAuthorization in interface PaymentGateway
Parameters:
orderPayment - the payment that was previously pre-authorized

getDefaultPropertyKeys

protected java.util.Set<java.lang.String> getDefaultPropertyKeys()
Gets the list of default property keys for a payment gateway. (The Exchange gateway has no properties)

Specified by:
getDefaultPropertyKeys in class AbstractPaymentGatewayImpl
Returns:
the list of default property keys for a payment gateway