com.ibm.commerce.payment.commands
Class CheckPaymentAcceptCmdImpl

java.lang.Object
  |
  +--com.ibm.commerce.command.AbstractECCommand
        |
        +--com.ibm.commerce.command.TaskCommandImpl
              |
              +--com.ibm.commerce.payment.commands.CheckPaymentAcceptCmdImpl
All Implemented Interfaces:
CheckPaymentAcceptCmd, ECCommand, TaskCommand

public class CheckPaymentAcceptCmdImpl
extends TaskCommandImpl
implements CheckPaymentAcceptCmd

Default CheckPaymentAccept task command implementation class.

Parameter:
Parameter Name Type Descriptions
abOrder OrderAccessBean The Order Access Bean
dApproveAmount BigDecimal The amount should have been or to be approved
bReleaseToFulfillment Boolean The command is called during ReleaseToFulfillment.

This Task Command implements the CheckPaymentAccept Interface. This Task Command is normally called during ReleaseToFulfillment. It checks if the previously approved payment for an order is still valid and if the Approved Amount is the same as the Order Amount.
The command returns one of three possible answers:

  • PaymentConstants.APPROVAL_YES - The authorization is still valid and the Approved Amount is the same as the Order Amount.
  • PaymentConstants.APPROVAL_NO - A re-authorization was attempted but was declined.
  • PaymentConstants.APPROVAL_WORKING - Working on it, check back later.
    Behavior: Error View Name: ErrorCodes:


    Fields inherited from class com.ibm.commerce.command.AbstractECCommand
    commandContext
     
    Fields inherited from interface com.ibm.commerce.payment.commands.CheckPaymentAcceptCmd
    COPYRIGHT, defaultCommandClassName, ERRTASK_NAME, NAME
     
    Constructor Summary
    CheckPaymentAcceptCmdImpl()
               
     
    Method Summary
    protected  java.math.BigDecimal getApproveAmount()
              Retrieve Approve Amount
    protected  OrderAccessBean getOrder()
               
    protected  java.lang.Boolean getReleaseToFulfillment()
              Retrieve Release To Fulfillment
     java.lang.String getReturnCode()
              Returns the String containing Return Code.
     void performExecute()
              Performs the main business logic of the command.
     void reset()
              Resets the instance variables of the command.
     void setApproveAmount(java.math.BigDecimal approveAmount)
              Sets the approveAmount property of the command.
     void setOrder(OrderAccessBean ab)
              The order to be ReApproved.
     void setReleaseToFulfillment(java.lang.Boolean b)
              Sets the bRelease property of the command.
     void setReturnCode(java.lang.String s)
               
     
    Methods inherited from class com.ibm.commerce.command.AbstractECCommand
    accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
     
    Methods inherited from class java.lang.Object
    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     
    Methods inherited from interface com.ibm.commerce.command.ECCommand
    checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
     

    Constructor Detail

    CheckPaymentAcceptCmdImpl

    public CheckPaymentAcceptCmdImpl()
    Method Detail

    getApproveAmount

    protected java.math.BigDecimal getApproveAmount()
    Retrieve Approve Amount

    getOrder

    protected OrderAccessBean getOrder()

    getReleaseToFulfillment

    protected java.lang.Boolean getReleaseToFulfillment()
    Retrieve Release To Fulfillment

    getReturnCode

    public java.lang.String getReturnCode()
    Returns the String containing Return Code. If the Payment System does not use Return Data then the byte Array will be null or of zero length.
    Specified by:
    getReturnCode in interface CheckPaymentAcceptCmd
    Returns:
    String
    See Also:
    #APPROVAL_YES, #APPROVAL_NO, #APPROVAL_WORKING

    performExecute

    public void performExecute()
                        throws ECException
    Performs the main business logic of the command.
    Specified by:
    performExecute in interface ECCommand
    Overrides:
    performExecute in class AbstractECCommand
    Following copied from interface: com.ibm.commerce.command.ECCommand
    Throws:
    com.ibm.commerce.command.CommandException - The superclass for all ECExceptions.

    reset

    public void reset()
    Resets the instance variables of the command. The reset() method will reset all instance variables. If the command includes any output values that are accessible via getters, then make sure those values are no longer needed before calling this method to reset the instance variables of the command.

    This is useful if the command instance is to be called multiple times with different command parameters.

    Overrides:
    reset in class AbstractECCommand

    setApproveAmount

    public void setApproveAmount(java.math.BigDecimal approveAmount)
    Description copied from interface: CheckPaymentAcceptCmd
    Sets the approveAmount property of the command.
    Specified by:
    setApproveAmount in interface CheckPaymentAcceptCmd
    Following copied from interface: com.ibm.commerce.payment.commands.CheckPaymentAcceptCmd
    Parameters:
    approveAmount - the amount to be approved.

    setOrder

    public void setOrder(OrderAccessBean ab)
    The order to be ReApproved.
    Specified by:
    setOrder in interface CheckPaymentAcceptCmd
    Following copied from interface: com.ibm.commerce.payment.commands.CheckPaymentAcceptCmd
    Parameters:
    abOrder - the OrderAccessBean of the Order for which is going to be reapproved.

    setReleaseToFulfillment

    public void setReleaseToFulfillment(java.lang.Boolean b)
    Description copied from interface: CheckPaymentAcceptCmd
    Sets the bRelease property of the command.
    Specified by:
    setReleaseToFulfillment in interface CheckPaymentAcceptCmd
    Following copied from interface: com.ibm.commerce.payment.commands.CheckPaymentAcceptCmd
    Parameters:
    bRelease - set to true to indicate the order is ready to release to fulfillment.

    setReturnCode

    public void setReturnCode(java.lang.String s)