com.elasticpath.domain.order
Interface OrderPayment

All Superinterfaces:
EpDomain, Persistence, java.io.Serializable, ValueObject
All Known Implementing Classes:
OrderPaymentImpl

public interface OrderPayment
extends ValueObject

Represents customer payment information.


Field Summary
static java.lang.String AUTHORIZATION_TRANSACTION
          The orderPayment transaction type of fund authorization.
static java.lang.String CAPTURE_TRANSACTION
          The orderPayment transaction type of fund capture.
static java.lang.String CREDIT_TRANSACTION
          The orderPayment transaction type of refund.
 
Method Summary
 void encryptCardNumber()
          Encrypts the credit card number.
 java.math.BigDecimal getAmount()
          Get the amount of this payment.
 java.lang.String getAuthorizationCode()
          Get the authorization code, returned with every transaction.
 java.lang.String getCardHolderName()
          Set the card holder name.
 java.lang.String getCardNumber()
          Get the credit cart number.
 java.lang.String getCardType()
          Get the type/brand of the credit card (e.g.
 java.util.Date getCreatedDate()
          Get the date that this order was created on.
 java.lang.String getCurrencyCode()
          Get the currency code (e.g.
 java.lang.String getCvv2Code()
          Get the card security code (found near the signature on the back of the card).
 java.lang.String getEmail()
          Get the customer's email address (Required for card processing).
 java.lang.String getExpiryMonth()
          Get the two-digit expiry date month.
 java.lang.String getExpiryYear()
          Get the two-digit expiry date year.
 java.lang.String getGatewayToken()
          Return the payment gateway token.
 java.lang.String getIssueNumber()
          Get the issue number used by some U.K.
 java.lang.String getMaskedCardNumber()
          Decrypts and returns the masked credit card number: ************5381.
 java.lang.String getPaymentMethod()
          Get the payment method.
 java.lang.String getReferenceId()
          Get the reference id.
 java.lang.String getRequestToken()
          Get the requestToken.
 java.util.Date getStartDate()
          Get the card start date Used by some U.K.
 OrderPaymentStatus getStatus()
          Get the status of the order payment.
 java.lang.String getTransactionType()
          Get the payment transaction type, i.e.
 java.lang.String getUnencryptedCardNumber()
          Decrypts and returns the full credit card number.
 void setAmount(java.math.BigDecimal amount)
          Set the amount of this payment.
 void setAuthorizationCode(java.lang.String authorizationCode)
          Set the authorization code, returned with every transaction.
 void setCardHolderName(java.lang.String cardHolderName)
          Get the card holder name.
 void setCardNumber(java.lang.String number)
          Set the credit card number.
 void setCardType(java.lang.String cardType)
          Set the vendor/brand of the credit card (e.g.
 void setCreatedDate(java.util.Date createdDate)
          Set the date that the order is created.
 void setCurrencyCode(java.lang.String currencyCode)
          Set the currency code.
 void setCvv2Code(java.lang.String cvv2Code)
          Set the security code (found near the signature on the back of the card).
 void setEmail(java.lang.String email)
          Set the customer's email address (Required for card processing).
 void setExpiryMonth(java.lang.String expiryMonth)
          Set the expiry two-digit date month.
 void setExpiryYear(java.lang.String expiryYear)
          Set the two-digit expiry date year.
 void setGatewayToken(java.lang.String token)
          Store the temporary token needed by some payment gateway, i.e.
 void setIssueNumber(java.lang.String issueNumber)
          Set the issue number used by some U.K.
 void setPaymentMethod(java.lang.String paymentMethod)
          Set the payment method such as "C.O.D." or "Verisign".
 void setReferenceId(java.lang.String referenceId)
          Set the reference id.
 void setRequestToken(java.lang.String requestToken)
          Set the request token.
 void setStartDate(java.util.Date startDate)
          Set the cart start date used by some U.K.
 void setStatus(OrderPaymentStatus status)
          Set the status of the order payment.
 void setTransactionType(java.lang.String transactionType)
          Get the payment transaction type, i.e.
 
Methods inherited from interface com.elasticpath.domain.Persistence
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Field Detail

AUTHORIZATION_TRANSACTION

static final java.lang.String AUTHORIZATION_TRANSACTION
The orderPayment transaction type of fund authorization.

See Also:
Constant Field Values

CAPTURE_TRANSACTION

static final java.lang.String CAPTURE_TRANSACTION
The orderPayment transaction type of fund capture.

See Also:
Constant Field Values

CREDIT_TRANSACTION

static final java.lang.String CREDIT_TRANSACTION
The orderPayment transaction type of refund.

See Also:
Constant Field Values
Method Detail

encryptCardNumber

void encryptCardNumber()
Encrypts the credit card number.


getAmount

java.math.BigDecimal getAmount()
Get the amount of this payment.

Returns:
the amount as a BigDecimal

getAuthorizationCode

java.lang.String getAuthorizationCode()
Get the authorization code, returned with every transaction. It is used to associate any transaction with its associated follow-on transaction, such as a capture transaction with its preceding preauthorization, much like the requestToken.

Returns:
the authorization code

getCardHolderName

java.lang.String getCardHolderName()
Set the card holder name.

Returns:
the name on the card

getCardNumber

java.lang.String getCardNumber()
Get the credit cart number.

Returns:
the credit card number

getCardType

java.lang.String getCardType()
Get the type/brand of the credit card (e.g. VISA).

Returns:
the cardType

getCreatedDate

java.util.Date getCreatedDate()
Get the date that this order was created on.

Returns:
the created date

getCurrencyCode

java.lang.String getCurrencyCode()
Get the currency code (e.g. CAD or USD).

Returns:
the currency code

getCvv2Code

java.lang.String getCvv2Code()
Get the card security code (found near the signature on the back of the card).

Returns:
the card cvv2Code

getEmail

java.lang.String getEmail()
Get the customer's email address (Required for card processing).

Returns:
the customer email address

getExpiryMonth

java.lang.String getExpiryMonth()
Get the two-digit expiry date month.

Returns:
the two-digit expiry date month

getExpiryYear

java.lang.String getExpiryYear()
Get the two-digit expiry date year.

Returns:
the expiry date year

getGatewayToken

java.lang.String getGatewayToken()
Return the payment gateway token.

Returns:
the temproary payment gateway token.

getIssueNumber

java.lang.String getIssueNumber()
Get the issue number used by some U.K. cards.

Returns:
the issue number

getMaskedCardNumber

java.lang.String getMaskedCardNumber()
Decrypts and returns the masked credit card number: ************5381. Useful for displaying in receipts, GUI, order history, etc.

Returns:
the masked credit card number

getPaymentMethod

java.lang.String getPaymentMethod()
Get the payment method. A payment method could be the name of the payment processor/gateway.

Returns:
the payment method

getReferenceId

java.lang.String getReferenceId()
Get the reference id. The reference ID is basically a merchant reference code, and is usually set to the Order Number associated with this payment.

Returns:
the reference id.

getRequestToken

java.lang.String getRequestToken()
Get the requestToken. The request token is a code returned by the payment processor for every request. It is used to associate any transaction with its associated follow-on transaction, such as a capture transaction with its preceding preauthorization, much like the requestId.

Returns:
the request token.

getStartDate

java.util.Date getStartDate()
Get the card start date Used by some U.K. cards.

Returns:
the start date

getStatus

OrderPaymentStatus getStatus()
Get the status of the order payment.

Returns:
the order payment status

getTransactionType

java.lang.String getTransactionType()
Get the payment transaction type, i.e. "Authorization", "Sale" or "Credit".

Returns:
the payment transaction type

getUnencryptedCardNumber

java.lang.String getUnencryptedCardNumber()
Decrypts and returns the full credit card number. Access to this method should be restricted.

Returns:
the decrypted credit card number

setAmount

void setAmount(java.math.BigDecimal amount)
Set the amount of this payment.

Parameters:
amount - the amount as a BigDecimal

setAuthorizationCode

void setAuthorizationCode(java.lang.String authorizationCode)
Set the authorization code, returned with every transaction.

Parameters:
authorizationCode - the authorization code

setCardHolderName

void setCardHolderName(java.lang.String cardHolderName)
Get the card holder name.

Parameters:
cardHolderName - the name on the card

setCardNumber

void setCardNumber(java.lang.String number)
Set the credit card number.

Parameters:
number - the credit card number

setCardType

void setCardType(java.lang.String cardType)
Set the vendor/brand of the credit card (e.g. VISA).

Parameters:
cardType - the cardType

setCreatedDate

void setCreatedDate(java.util.Date createdDate)
Set the date that the order is created.

Parameters:
createdDate - the start date

setCurrencyCode

void setCurrencyCode(java.lang.String currencyCode)
Set the currency code.

Parameters:
currencyCode - the currency code code

setCvv2Code

void setCvv2Code(java.lang.String cvv2Code)
Set the security code (found near the signature on the back of the card).

Parameters:
cvv2Code - the security code

setEmail

void setEmail(java.lang.String email)
Set the customer's email address (Required for card processing).

Parameters:
email - the customer's email address

setExpiryMonth

void setExpiryMonth(java.lang.String expiryMonth)
Set the expiry two-digit date month.

Parameters:
expiryMonth - the two digit expiry date month

setExpiryYear

void setExpiryYear(java.lang.String expiryYear)
Set the two-digit expiry date year.

Parameters:
expiryYear - the expiry date year

setGatewayToken

void setGatewayToken(java.lang.String token)
Store the temporary token needed by some payment gateway, i.e. PayPal to complete the process.

Parameters:
token - payment gateway token

setIssueNumber

void setIssueNumber(java.lang.String issueNumber)
Set the issue number used by some U.K. cards.

Parameters:
issueNumber - the issue number

setPaymentMethod

void setPaymentMethod(java.lang.String paymentMethod)
Set the payment method such as "C.O.D." or "Verisign".

Parameters:
paymentMethod - the payment method

setReferenceId

void setReferenceId(java.lang.String referenceId)
Set the reference id. The reference ID is basically a merchant reference code, and is usually set to the Order Number associated with this payment.

Parameters:
referenceId - the reference id.

setRequestToken

void setRequestToken(java.lang.String requestToken)
Set the request token.

Parameters:
requestToken - the request token

setStartDate

void setStartDate(java.util.Date startDate)
Set the cart start date used by some U.K. cards.

Parameters:
startDate - the start date

setStatus

void setStatus(OrderPaymentStatus status)
Set the status of the order payment.

Parameters:
status - the status of the order payment

setTransactionType

void setTransactionType(java.lang.String transactionType)
Get the payment transaction type, i.e. "Authorization", "Sale" or "Credit".

Parameters:
transactionType - the payment transaction type