com.ibm.commerce.payment.commands
Interface DoPaymentCmd
- All Superinterfaces:
- TaskCommand
- All Known Implementing Classes:
- DoPaymentCmdImpl, DoPaymentMPFCmdImpl
- public interface DoPaymentCmd
- extends TaskCommand
The DoPaymentCmd Task Command is called by the OrderProcessCmd Controller Command to process payment for an order. If successful, the OrderProcessCmd will set the Order status to the value specified by this command and will return the returnData to the shopper to complete the payment initiation request. (The returnData may be null. In this case, the OrderProcessCmd will go to the OrderOK View to display a confirmation page to the shopper.) If unsuccessful, the command is expected to throw the ECApplicationException specifying the Error View Command named by the com.ibm.commerce.DoPaymentCmd.ERROR_TASK_NAME.
Field Summary |
static int |
CC_VALID_Y_RANGE
The valid credit card expiry year range. |
static java.lang.String |
COPYRIGHT
IBM copyright notice field. |
static java.lang.String |
defaultCommandClassName
The default implementation of this command. |
static java.lang.String |
ERR_CODE_BAD_CCNUM
Error code indicating invalid card number. |
static java.lang.String |
ERR_CODE_BAD_SYS
Error code indicating a system error has occurred. |
static java.lang.String |
ERR_CODE_BAD_XDATE
Error code indicating invalid expiry date. |
static java.lang.String |
ERR_CODE_MISSING_PARAM
Error code indicating a missing parameter. |
static java.lang.String |
ERRTASK_NAME
Name of the Error View for this command. |
static java.lang.String |
MESSAGE_FOR_BUYER
Property name for the MessageForBuyer property passed in the exceptionData of an ErrorDataBean. |
static java.lang.String |
NAME
The name of this command. |
static java.lang.String |
NVP_field
Deprecated. Use NVP_FIELD instead. |
static java.lang.String |
NVP_FIELD
Property name for the field property passed in the exceptionData of an ErrorDataBean. |
static java.lang.String |
PM_MESSAGE_FOR_BUYER
Property name for the MessageForBuyer property passed in the exceptionData of an ErrorDataBean. |
static java.lang.String |
PM_MESSAGE_FOR_MERCHANT
Property name for the MessageForMerchant property passed in the exceptionData of an ErrorDataBean. |
static java.lang.String |
PM_PRIMARY_RC
Property name for the PrimaryRC property passed in the exceptionData of an ErrorDataBean. |
static java.lang.String |
PM_SECONDARY_RC
Property name for the SecondaryRC property passed in the exceptionData of an ErrorDataBean. |
static java.lang.String |
WCSHOSTNAME
Environment variable name for the WebSphere Commerce host. |
static java.lang.String |
WCSWEBSERVERPORT
Environment variable name for the WebSphere Commerce web server port. |
static java.lang.String |
WEBPATH
Environment variable name for the WebSphere Commerce 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 |
setOrderId(java.lang.Long orderId)
Sets the orderId 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. |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- IBM copyright notice field.
- See Also:
- Constant Field Values
NAME
public static final java.lang.String NAME
- The name of this command.
- See Also:
- Constant Field Values
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".
- See Also:
- Constant Field Values
ERR_CODE_MISSING_PARAM
public static final java.lang.String ERR_CODE_MISSING_PARAM
- Error code indicating a missing parameter. The constant value of this field is "190".
- See Also:
- NVP_FIELD., Constant Field Values
ERR_CODE_BAD_CCNUM
public static final java.lang.String ERR_CODE_BAD_CCNUM
- Error code indicating invalid card number. The constant value of this field is "1005".
- See Also:
- Constant Field Values
ERR_CODE_BAD_XDATE
public static final java.lang.String ERR_CODE_BAD_XDATE
- Error code indicating invalid expiry date. The constant value of this field is "1006".
- See Also:
- Constant Field Values
ERR_CODE_BAD_SYS
public static final java.lang.String ERR_CODE_BAD_SYS
- Error code indicating a system error has occurred. The constant value of this field is "1007".
If a Payment System is used to process the payment for the order, this error code could also be used to indicate an error detected by the Payment System. The implementation class of the command may return additional error property in the exceptionData of an ErrorDataBean passed to the Error View specified by the command.
- See Also:
- com.ibm.commerce.beans.ErrorDataBean., Constant Field Values
NVP_FIELD
public static final java.lang.String NVP_FIELD
- Property name for the field property passed in the exceptionData of an ErrorDataBean. The property is included if the "ErrorCode" property indicates a parameter is missing (ERR_CODE_MISSING_PARAM).
- See Also:
- com.ibm.commerce.beans.ErrorDataBean., Constant Field Values
NVP_field
public static final java.lang.String NVP_field
- Deprecated. Use NVP_FIELD instead.
- Property name for the field property passed in the exceptionData of an ErrorDataBean. The value of this constant is the same as NVP_FIELD.
- See Also:
- NVP_FIELD, Constant Field Values
PM_PRIMARY_RC
public static final java.lang.String PM_PRIMARY_RC
- Property name for the PrimaryRC property passed in the exceptionData of an ErrorDataBean. If included in the exception data, the property holds the primary return code from WebSphere Commerce Payments.
- See Also:
- com.ibm.commerce.beans.ErrorDataBean., Constant Field Values
PM_SECONDARY_RC
public static final java.lang.String PM_SECONDARY_RC
- Property name for the SecondaryRC property passed in the exceptionData of an ErrorDataBean. If included in the exception data, the property holds the secondary return code from WebSphere Commerce Payments.
- See Also:
- com.ibm.commerce.beans.ErrorDataBean., Constant Field Values
PM_MESSAGE_FOR_BUYER
public static final java.lang.String PM_MESSAGE_FOR_BUYER
- Property name for the MessageForBuyer property passed in the exceptionData of an ErrorDataBean. If included in the exception data, the property holds the optional message that accompanies the primary and secondary error codes received from WebSphere Commerce Payments. This message is suitable for display to the buyer.
- See Also:
- com.ibm.commerce.beans.ErrorDataBean., Constant Field Values
PM_MESSAGE_FOR_MERCHANT
public static final java.lang.String PM_MESSAGE_FOR_MERCHANT
- Property name for the MessageForMerchant property passed in the exceptionData of an ErrorDataBean. If included in the exception data, the property holds the optional message that accompanies the primary and secondary error codes received from WebSphere Commerce Payments. This message is suitable for display to the merchant/mall system administrator.
- See Also:
- com.ibm.commerce.beans.ErrorDataBean., Constant Field Values
MESSAGE_FOR_BUYER
public static final java.lang.String MESSAGE_FOR_BUYER
- Property name for the MessageForBuyer property passed in the exceptionData of an ErrorDataBean. The value of this constant is the same as PM_MESSAGE_FOR_BUYER.
- See Also:
- PM_MESSAGE_FOR_BUYER, Constant Field Values
WCSHOSTNAME
public static final java.lang.String WCSHOSTNAME
- Environment variable name for the WebSphere Commerce host. This is one of the environment variables that is passed to the Payment Cashier if payment is to be processed through WebSphere Commerce Payments.
- See Also:
- DoPaymentPMCmdImpl, Constant Field Values
WCSWEBSERVERPORT
public static final java.lang.String WCSWEBSERVERPORT
- Environment variable name for the WebSphere Commerce web server port. This is one of the environment variables that is passed to the Payment Cashier if payment is to be processed through WebSphere Commerce Payments.
- See Also:
- DoPaymentPMCmdImpl, Constant Field Values
WEBPATH
public static final java.lang.String WEBPATH
- Environment variable name for the WebSphere Commerce webpath. This is one of the environment variables that is passed to the Payment Cashier if payment is to be processed through WebSphere Commerce Payments.
- See Also:
- DoPaymentPMCmdImpl, Constant Field Values
CC_VALID_Y_RANGE
public static final int CC_VALID_Y_RANGE
- The valid credit card expiry year range. The credit card expiry year cannot exceed this number of year from the current year.
- See Also:
- Constant Field Values
defaultCommandClassName
public static final java.lang.String defaultCommandClassName
- The default implementation of this command.
- See Also:
- Constant Field Values
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 preferred order state
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[]
setOrderId
public void setOrderId(java.lang.Long orderId)
- Sets the orderId property of the command.
-
- Parameters:
- orderId - the order reference number 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
=========== ====================================
cardBrand The credit card brand.
cardNumber The credit card number
cardExpiryMonth The credit card exipration month
cardExpiryYear The credit card exipration year
Refer to the documentation for the command implementation class for the actual Payment Attributes that are defined for the command.
- See Also:
- com.ibm.commerce.payment.commands.DoPaymentMPFCmdImpl.
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.
Feedback
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.