public class DoPaymentTestCmdImpl extends BusinessPolicyCommandImpl implements DoPaymentPolicyCmd
If the command is successful, the command will return the OrderConstants.ORDER_AUTH_ALLOWED status to the calling command.
If unsuccessful, the command throws the ECApplicationException specifying an Error Code and the Error View named by the constant com.ibm.commerce.DoPaymentPolicyCmd.ERROR_TASK_NAME or the one named by the setErrorViewName() method.
This implementation of the DoPaymentPolicyCmd Task Command does not have any returnData to pass to the calling command.
This command uses the following AccessBeans:
This command calls the following TaskCommands:
Constructor and Description |
---|
DoPaymentTestCmdImpl()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected void | checkParameters()
Deprecated.
Use validateParameters() instead.
|
AccountAccessBean | getAccount()
Deprecated.
Returns the AccountAccessBean representing the Account associated with the order.
|
protected java.lang.Long | getAccountId()
Deprecated.
Returns the account ID of the Account associated with the order.
|
protected java.lang.Long | getBuyerPOId()
Deprecated.
Returns the internal ID of the BuyerPO record if a buyer purchase order number is specified.
|
protected java.lang.String | getCardBrand()
Deprecated.
Gets the credit card brand.
|
protected java.lang.Integer | getCardExpiryMonth()
Deprecated.
Gets the credit card Expiry Month.
|
protected java.lang.Integer | getCardExpiryYear()
Deprecated.
Gets the credit card Expiry Year.
|
protected java.lang.String | getCardNumber()
Deprecated.
Gets the credit card number.
|
java.lang.String | getContentType()
Deprecated.
Returns the Content Type (or MIME type) of the return data, or null if the type is not known.
|
protected java.lang.String | getErrorViewName()
Deprecated.
Returns the name of the error view to use for reporting error.
|
protected OrderAccessBean | getOrder()
Deprecated.
Returns the OrderAccessBean representing the order being processed.
|
java.lang.String | getOrderState()
Deprecated.
Returns the single character String value that the called command wants the Calling command to use to set the Status of the order.
|
protected TypedProperty | getPaymentAttributes()
Deprecated.
Returns the TypedProperty object containing the payment attributes passed to this command by the calling command.
|
byte[] | getReturnData()
Deprecated.
Returns the byte Array containing Return Data from the Payment System.
|
protected java.math.BigDecimal | getTotalAmount()
Deprecated.
Returns the totalAmount attribute passed to the command by the calling command.
|
static boolean | isCardExpiryDateValid(int expiryMonth, int expiryYear)
Deprecated.
Checks if the specified expiry date (expiryMonth and expiryYear) is valid.
|
boolean | isReadyToCallExecute()
Deprecated.
This method is called by the Command Framework to check if all basic mandatory parameters have been set for this command.
|
void | performExecute()
Deprecated.
Performs the main business logic of the command.
|
static java.lang.String | removeSpaceAndHyphenFromString(java.lang.String aCardNumber)
Deprecated.
Returns a new string that is free of any spaces and hyphenated characters.
|
void | reset()
Deprecated.
Resets the instance variables of the command.
|
void | setAccount(AccountAccessBean abAccount)
Deprecated.
Sets the account property of the command.
|
void | setBuyerPOId(java.lang.Long n)
Deprecated.
Sets optional buyerPOId if the customer (buyer) had specified a buyer purchase order number.
|
protected void | setCardBrand(java.lang.String cardBrand)
Deprecated.
Sets the credit card brand.
|
protected void | setCardExpiryMonth(java.lang.Integer cardExpiryMonth)
Deprecated.
Sets the credit card Expiry Month.
|
protected void | setCardExpiryYear(java.lang.Integer cardExpiryYear)
Deprecated.
Sets the credit card Expiry Year.
|
protected void | setCardNumber(java.lang.String cardNumber)
Deprecated.
Sets the credit card number.
|
void | setErrorViewName(java.lang.String sEVN)
Deprecated.
Sets the error view to be used to report error.
|
void | setOrder(OrderAccessBean ab)
Deprecated.
Sets the order property of the command.
|
protected void | setOrderState(java.lang.String orderState)
Deprecated.
Sets the order state to be returned to the caller.
|
void | setPaymentAttributes(TypedProperty paymentAttributes)
Deprecated.
Sets the paymentAttributes property of the command.
|
void | setTotalAmount(java.math.BigDecimal totalAmount)
Deprecated.
Sets the totalAmount property of the command.
|
void | validateParameters()
Deprecated.
Checks the validity of customer-supplied parameters.
|
protected void checkParameters() throws ECException
public AccountAccessBean getAccount()
protected java.lang.Long getAccountId() throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException
protected java.lang.Long getBuyerPOId()
protected java.lang.String getCardBrand()
protected java.lang.Integer getCardExpiryMonth()
protected java.lang.Integer getCardExpiryYear()
protected java.lang.String getCardNumber()
public java.lang.String getContentType()
protected java.lang.String getErrorViewName()
protected OrderAccessBean getOrder()
public java.lang.String getOrderState()
protected TypedProperty getPaymentAttributes()
public byte[] getReturnData()
protected java.math.BigDecimal getTotalAmount()
public static boolean isCardExpiryDateValid(int expiryMonth, int expiryYear)
public boolean isReadyToCallExecute()
public void performExecute() throws ECException
public static java.lang.String removeSpaceAndHyphenFromString(java.lang.String aCardNumber)
public void reset()
This is useful if the command instance is to be called multiple times with different command parameters.
public void setAccount(AccountAccessBean abAccount)
This is optional. Skip this if none of the trading agreements used by the order items of the order are associated with an account.
public void setBuyerPOId(java.lang.Long n)
protected void setCardBrand(java.lang.String cardBrand)
protected void setCardExpiryMonth(java.lang.Integer cardExpiryMonth)
protected void setCardExpiryYear(java.lang.Integer cardExpiryYear)
protected void setCardNumber(java.lang.String cardNumber)
public void setErrorViewName(java.lang.String sEVN)
public void setOrder(OrderAccessBean ab)
protected void setOrderState(java.lang.String orderState)
public void setPaymentAttributes(TypedProperty paymentAttributes)
This command requires the following Payment Attributes:
Keyword Value =========== ==================================== cardBrand The credit card brand. Represents the credit card type used. cardNumber The credit card number cardExpiryMonth The credit card exipration month cardExpiryYear The credit card exipration yearNote that this command stores the credit card brand in the PAYMETHOD column of the ORDPAYMTHD table. If the credit card brand specified is longer than five characters it is truncated before being stored in the ORDPAYMTHD table.
public void setTotalAmount(java.math.BigDecimal totalAmount)
public void validateParameters() throws ECException