com.ibm.commerce.payment.commands
Interface DoPaymentPolicyCmd

All Superinterfaces:
BusinessPolicyCommand, ECCommand, TaskCommand
All Known Implementing Classes:
DoPaymentTestCmdImpl, DoPaymentCLCmdImpl, DoPaymentPMCmdImpl

public interface DoPaymentPolicyCmd
extends BusinessPolicyCommand

The DoPaymentPolicyCmd Business Policy Command
This handles the policy specified payment method
Please look at build-in implementation, DoPaymentCLCmdImpl and DoPaymentPMCmdImpl, for more detail


Field Summary
static int CC_VALID_Y_RANGE
           
static java.lang.String COPYRIGHT
           
static java.lang.String defaultCommandClassName
          The default implementation class.
static java.lang.String ERRTASK_NAME
          Name of the Error View for this command.
static java.lang.String MESSAGE_FOR_BUYER
           
static java.lang.String NAME
           
static java.lang.String NVP_FIELD
          Constant for the name of a property passed in the exceptionData of an ErrorDataBean.
static java.lang.String PM_MESSAGE_FOR_BUYER
           
static java.lang.String PM_MESSAGE_FOR_MERCHANT
           
static java.lang.String PM_PRIMARY_RC
           
static java.lang.String PM_SECONDARY_RC
           
static java.lang.String WCSHOSTNAME
           
static java.lang.String WCSWEBSERVERPORT
           
static java.lang.String WEBPATH
           
 
Method Summary
 java.lang.String getContentType()
          Returns the Content Type (or MIME type) of the return data, or null if the type is not known.
 java.lang.String getOrderState()
          Returns the single character String value that the called command wants the Calling command to use to set the Status of the order.
 byte[] getReturnData()
          Returns the byte Array containing Return Data from the Payment System.
 void setAccount(AccountAccessBean abAccount)
          Sets the abAccount property of the command.
 void setBuyerPOId(java.lang.Long nBuyerPOId)
          Sets the nBuyerPOId property of the command.
 void setErrorViewName(java.lang.String sEVN)
          Optional error view name passed in by the Caller.
 void setOrder(OrderAccessBean ab)
          Sets the order property of the command.
 void setPaymentAttributes(TypedProperty requestProperties)
          Sets the paymentAttributes property of the command.
 void setTotalAmount(java.math.BigDecimal totalAmount)
          Sets the totalAmount property of the command.
 
Methods inherited from interface com.ibm.commerce.command.BusinessPolicyCommand
getPolicyId, getRequestProperties, setPolicyId, setRequestProperties
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, performExecute, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 

Field Detail

CC_VALID_Y_RANGE

public static final int CC_VALID_Y_RANGE

COPYRIGHT

public static final java.lang.String COPYRIGHT

defaultCommandClassName

public static final java.lang.String defaultCommandClassName
The default implementation class.

ERRTASK_NAME

public static final java.lang.String ERRTASK_NAME
Name of the Error View for this command. The constant value of this field is "DoPaymentErrorView".

MESSAGE_FOR_BUYER

public static final java.lang.String MESSAGE_FOR_BUYER

NAME

public static final java.lang.String NAME

NVP_FIELD

public static final java.lang.String NVP_FIELD
Constant for the name of a property passed in the exceptionData of an ErrorDataBean. The property is named "field". The "field" property is included if the "ErrorCode" property indicates a parameter is missing (ERR_CODE_MISSING_PARAM).
See Also:
com.ibm.commerce.beans.ErrorDataBean.

PM_MESSAGE_FOR_BUYER

public static final java.lang.String PM_MESSAGE_FOR_BUYER

PM_MESSAGE_FOR_MERCHANT

public static final java.lang.String PM_MESSAGE_FOR_MERCHANT

PM_PRIMARY_RC

public static final java.lang.String PM_PRIMARY_RC

PM_SECONDARY_RC

public static final java.lang.String PM_SECONDARY_RC

WCSHOSTNAME

public static final java.lang.String WCSHOSTNAME

WCSWEBSERVERPORT

public static final java.lang.String WCSWEBSERVERPORT

WEBPATH

public static final java.lang.String WEBPATH
Method Detail

getContentType

public java.lang.String getContentType()
Returns the Content Type (or MIME type) of the return data, or null if the type is not known.
Returns:
a String containing the name of the MIME type of the return data, or null if the type is not known

getOrderState

public java.lang.String getOrderState()
Returns the single character String value that the called command wants the Calling command to use to set the Status of the order. If the returned String is null, the Calling command will decide the value to use for the Status
Returns:
the single character order status for the Order object or null.

getReturnData

public byte[] getReturnData()
Returns the byte Array containing Return Data from the Payment System. If the Payment System does not use Return Data then the byte Array will be null or of zero length.
Returns:
byte[]

setAccount

public void setAccount(AccountAccessBean abAccount)
Sets the abAccount property of the command.
Parameters:
abAccount - the AccountAccessBean of the Order is associated with

setBuyerPOId

public void setBuyerPOId(java.lang.Long nBuyerPOId)
Sets the nBuyerPOId property of the command.
Parameters:
nBuyerPOId - the Buyer Purchase Order Reference Number of the Order is associated with

setErrorViewName

public void setErrorViewName(java.lang.String sEVN)
Optional error view name passed in by the Caller.

setOrder

public void setOrder(OrderAccessBean ab)
Sets the order property of the command.
Parameters:
abOrder - the OrderAccessBean of the Order for which payment is to be processed.

setPaymentAttributes

public void setPaymentAttributes(TypedProperty requestProperties)
Sets the paymentAttributes property of the command.
Parameters:
requestProperties - the requestProperties object that contains all the command parameters are to be passed to this command.

Some of the optional Payment Attributes that may be passed to the command are:

       Keyword                         Value
     ===========        ====================================
     payMethodId        PayMthd_Id of the Cashier Profile to use
     cardBrand          The credit card brand.  
     cardNumber         The credit card number              
     cardExpiryMonth    The credit card exipration month  
     cardExpiryYear     The credit card exipration year   
     $XXXXXX            Protocol Data Value for $XXXXXX
 
where $XXXXXX are special Protocol Data Keyword defined by the Payment Manager Cassette. (The Protocol Data keywords all start with the "$" character.)

setTotalAmount

public void setTotalAmount(java.math.BigDecimal totalAmount)
Sets the totalAmount property of the command.
Parameters:
totalAmount - the total price of the Order for which payment is to be processed.