com.elasticpath.domain.payment.impl
Class AbstractPaymentGatewayImpl

java.lang.Object
  extended by com.elasticpath.domain.impl.AbstractEpDomainImpl
      extended by com.elasticpath.domain.impl.AbstractTransientImpl
          extended by com.elasticpath.domain.payment.impl.AbstractPaymentGatewayImpl
All Implemented Interfaces:
EpDomain, PaymentGateway, Transient, java.io.Serializable
Direct Known Subclasses:
AbstractCreditCardPaymentGatewayImpl, PaypalExpressPaymentGatewayImpl

public abstract class AbstractPaymentGatewayImpl
extends AbstractTransientImpl
implements PaymentGateway

Abstract payment processing gateway. Extend this to implement specific gateways.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Constructor Summary
AbstractPaymentGatewayImpl()
           
 
Method Summary
 java.lang.String getName()
          Get the name of the payment gateway (e.g.
 java.util.Properties getProperties()
          Get the properties of the payment gateway (e.g.
 java.util.List getSupportedCurrencies()
          Get the currencies supported by this payment gateway.
 void refund(OrderPayment payment)
          Refunds a previous capture.
 void setName(java.lang.String name)
          Set the name of the payment gateway (e.g.
 void setProperties(java.util.Properties properties)
          Set the properties of the payment gateway (e.g.
 void setSupportedCurrencies(java.util.List currencies)
          Set the currencies supported by this payment gateway.
 
Methods inherited from class com.elasticpath.domain.impl.AbstractEpDomainImpl
getElasticPath, setElasticPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.elasticpath.domain.payment.PaymentGateway
capture, getPaymentType, preAuthorize, reversePreAuthorization, sale, voidCaptureOrCredit
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Serial version id.

See Also:
Constant Field Values
Constructor Detail

AbstractPaymentGatewayImpl

public AbstractPaymentGatewayImpl()
Method Detail

getName

public java.lang.String getName()
Get the name of the payment gateway (e.g. CyberSource).

Specified by:
getName in interface PaymentGateway
Returns:
the gateway name

getProperties

public java.util.Properties getProperties()
Get the properties of the payment gateway (e.g. merchantID, keysDirectory).

Specified by:
getProperties in interface PaymentGateway
Returns:
the gateway properties

getSupportedCurrencies

public java.util.List getSupportedCurrencies()
Get the currencies supported by this payment gateway.

Specified by:
getSupportedCurrencies in interface PaymentGateway
Returns:
a List of currency code strings (e.g. CAD)

refund

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

Specified by:
refund in interface PaymentGateway
Parameters:
payment - the payment to be refunded

setName

public void setName(java.lang.String name)
Set the name of the payment gateway (e.g. CyberSource).

Specified by:
setName in interface PaymentGateway
Parameters:
name - the gateway name

setProperties

public void setProperties(java.util.Properties properties)
Set the properties of the payment gateway (e.g. merchantID, keysDirectory).

Specified by:
setProperties in interface PaymentGateway
Parameters:
properties - the gateway properties

setSupportedCurrencies

public void setSupportedCurrencies(java.util.List currencies)
Set the currencies supported by this payment gateway.

Specified by:
setSupportedCurrencies in interface PaymentGateway
Parameters:
currencies - a List of currency code strings (e.g. CAD)