com.elasticpath.sfweb.formbean
Interface BillingAndReviewFormBean

All Superinterfaces:
EpFormBean, java.io.Serializable
All Known Implementing Classes:
BillingAndReviewFormBeanImpl

public interface BillingAndReviewFormBean
extends EpFormBean

Bean used to provide and capture information from the Billing and Review screen.


Field Summary
static java.lang.String PAYMENT_OPTION_EXISTING_CREDIT_CARD
          Indicates the user wishes to pay with an existing card.
static java.lang.String PAYMENT_OPTION_NEW_CREDIT_CARD
          Indicates that the user wishes to enter new credit card information.
static java.lang.String PAYMENT_OPTION_PAYPAL_EXPRESS
          Indicates that the user wishes to pay via paypal.
 
Method Summary
 Address getBillingAddress()
          Get the billing address.
 java.util.Map getCardTypeMap()
          Get a map of the card types for the Spring input form.
 Customer getCustomer()
          Gets the Customer.
 java.util.List getExistingCreditCards()
          Retrieve the collection of existing credit cards that the customer may use for payment.
 java.util.Map getMonthMap()
          Get a map of the numbers of months of the year for the Spring form input for credit card expiry.
 OrderPayment getOrderPayment()
          Get the orderPayment used to collect payment information.
 CustomerCreditCard getSelectedExistingCreditCard()
          Returns the existing credit card selected by the user.
 long getSelectedExistingCreditCardUid()
          Returns the id of the existing credit card selected by the user.
 java.lang.String getSelectedPaymentOption()
          Get the payment option that the user has selected.
 Address getShippingAddress()
          Get the shipping address.
 java.util.Map getYearMap()
          Get a map of years for the Spring form input for credit card expiry.
 boolean isSaveCreditCardForFutureUse()
          Indicates whether the user wishes to save a new credit card.
 boolean isValidateCvv2()
          True if the cvv2 code (Card Security Code) should be validated.
 void setBillingAddress(Address billingAddress)
          Set the billing address.
 void setCardTypes(java.util.List cardTypes)
          Set the card types available as a list of Strings.
 void setCustomer(Customer customer)
          Sets the Customer.
 void setExistingCreditCards(java.util.List existingCreditCards)
          Set the collection of existing credit cards that the customer may use for payment.
 void setOrderPayment(OrderPayment orderPayment)
          Set the orderPayment used to collect payment information.
 void setSaveCreditCardForFutureUse(boolean saveCreditCard)
          Set whether new credit card information should be saved for future use.
 void setSelectedExistingCreditCardUid(long selectedExistingCardUid)
          Sets the id of the existing credit card selected by the user.
 void setSelectedPaymentOption(java.lang.String paymentOption)
          Set the payment option that the user has selected.
 void setShippingAddress(Address shippingAddress)
          Set the shipping address.
 void setValidateCvv2(boolean validate)
          Set whether or not the cvv2 code should be validated.
 
Methods inherited from interface com.elasticpath.sfweb.formbean.EpFormBean
getElasticPath
 

Field Detail

PAYMENT_OPTION_EXISTING_CREDIT_CARD

static final java.lang.String PAYMENT_OPTION_EXISTING_CREDIT_CARD
Indicates the user wishes to pay with an existing card. When this option is used, the card UID must be specified by calling setSelectedExistingCreditCardUid.

See Also:
Constant Field Values

PAYMENT_OPTION_NEW_CREDIT_CARD

static final java.lang.String PAYMENT_OPTION_NEW_CREDIT_CARD
Indicates that the user wishes to enter new credit card information.

See Also:
Constant Field Values

PAYMENT_OPTION_PAYPAL_EXPRESS

static final java.lang.String PAYMENT_OPTION_PAYPAL_EXPRESS
Indicates that the user wishes to pay via paypal.

See Also:
Constant Field Values
Method Detail

getBillingAddress

Address getBillingAddress()
Get the billing address.

Returns:
the billing address

getCardTypeMap

java.util.Map getCardTypeMap()
Get a map of the card types for the Spring input form.

Returns:
the credit card type map

getCustomer

Customer getCustomer()
Gets the Customer.

Returns:
the Customer.

getExistingCreditCards

java.util.List getExistingCreditCards()
Retrieve the collection of existing credit cards that the customer may use for payment.

Returns:
a list of CustomerCreditCards

getMonthMap

java.util.Map getMonthMap()
Get a map of the numbers of months of the year for the Spring form input for credit card expiry.

Returns:
map of month digit strings

getOrderPayment

OrderPayment getOrderPayment()
Get the orderPayment used to collect payment information.

Returns:
the orderPayment

getSelectedExistingCreditCard

CustomerCreditCard getSelectedExistingCreditCard()
Returns the existing credit card selected by the user.

Returns:
the CustomerCreditCard or null if there is no valid selected credit card.

getSelectedExistingCreditCardUid

long getSelectedExistingCreditCardUid()
Returns the id of the existing credit card selected by the user.

Returns:
the credit card UID

getSelectedPaymentOption

java.lang.String getSelectedPaymentOption()
Get the payment option that the user has selected.

Returns:
a constant value indicating the user's selection

getShippingAddress

Address getShippingAddress()
Get the shipping address.

Returns:
the shipping address

getYearMap

java.util.Map getYearMap()
Get a map of years for the Spring form input for credit card expiry.

Returns:
map of year strings

isSaveCreditCardForFutureUse

boolean isSaveCreditCardForFutureUse()
Indicates whether the user wishes to save a new credit card.

Returns:
true if the card information is to be saved, false otherwise

isValidateCvv2

boolean isValidateCvv2()
True if the cvv2 code (Card Security Code) should be validated.

Returns:
see above

setBillingAddress

void setBillingAddress(Address billingAddress)
Set the billing address.

Parameters:
billingAddress - the billing address

setCardTypes

void setCardTypes(java.util.List cardTypes)
Set the card types available as a list of Strings.

Parameters:
cardTypes - a list of String card types

setCustomer

void setCustomer(Customer customer)
Sets the Customer.

Parameters:
customer - Customer.

setExistingCreditCards

void setExistingCreditCards(java.util.List existingCreditCards)
Set the collection of existing credit cards that the customer may use for payment.

Parameters:
existingCreditCards - a list of CustomerCreditCards

setOrderPayment

void setOrderPayment(OrderPayment orderPayment)
Set the orderPayment used to collect payment information.

Parameters:
orderPayment - the credit card

setSaveCreditCardForFutureUse

void setSaveCreditCardForFutureUse(boolean saveCreditCard)
Set whether new credit card information should be saved for future use.

Parameters:
saveCreditCard - set to true to indicate that the new credit card information should be saved

setSelectedExistingCreditCardUid

void setSelectedExistingCreditCardUid(long selectedExistingCardUid)
Sets the id of the existing credit card selected by the user. Setting this value sets the payment option to EXISTING_CREDIT_CARD.

Parameters:
selectedExistingCardUid - the credit card UID

setSelectedPaymentOption

void setSelectedPaymentOption(java.lang.String paymentOption)
Set the payment option that the user has selected. This value will be re-set to EXISTING_CREDIT_CARD if setSelectedExistingCreditCardUid(card) is invoked.

Parameters:
paymentOption - a payment option constant defined in this interface

setShippingAddress

void setShippingAddress(Address shippingAddress)
Set the shipping address.

Parameters:
shippingAddress - the shipping address

setValidateCvv2

void setValidateCvv2(boolean validate)
Set whether or not the cvv2 code should be validated.

Parameters:
validate - true if the cvv2 should be validated.