com.ibm.commerce.payment.commands

Class DoRefundCLCmdImpl

  • All Implemented Interfaces:
    BusinessPolicyCommand, com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, DoRefundPolicyCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable

    Deprecated. 

    public class DoRefundCLCmdImpl
    extends BusinessPolicyCommandImpl
    implements DoRefundPolicyCmd
    This DoRefundPolicy business policy command implementation class is the default implementation class for refunding payment for CreditLine.
    (The original payment method of the Order may be different)

    Parameters:

    Parameter Name Type Descriptions
    abRMA RMAAccessBean The RMAAccessBean for the Return Merchandise Authorization (RMA) record
    abOrder OrderAccessBean The OrderAccessBean of the order associated with the RMA
    bdRefundAmount BigDecimal The amount of the refund in the currency of the Order.
    errorViewName String Optional error view name passed in by the Caller.

    Behavior:

    • Make sure the Credit Line of the Account is still active.
    • If the CreditLine of the Account is still active, creates a record in the ORDPAYMTHD Table to represent this refund using the RMA_ID as the REFUNDNUMBER and "LOC" and "0" as the PAYMETHOD and PAYDEVICE respectively. The RMA_ID is also stored in the ORDPAYMTHD.RMA_ID column as a foreign key to the RMA Table. Note that the ORDPAYMTHD.ActualAmount (in the currency of the Order) and the ORDPAYMTHD.CHARGEAMOUNT (in the default currency of the Store) for a Refund entry are negative decimal amounts. (If the Currency of the Order is the same as the default currency of the Store, then ActualAmount and ChargeAmount are the same. Otherwise, a conversion from the currency of the order to the default currency of the Store is required.)
    • Stores the creditLineId, policyId, TradingId and AccountId in the new record and sets the CHARGETIME column to the current time..

    Default Error View Name:

    • DoRefundErrorView

    ErrorCodes:

    This command uses the following AccessBeans:

    This command does not call other TaskCommand.

    See Also:
    Serialized Form
    • Constructor Detail

      • DoRefundCLCmdImpl

        public DoRefundCLCmdImpl()
        Deprecated. 
    • Method Detail

      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        Deprecated. 
        This method is called by the Command Framework to check if all basic mandatory parameters have been set for this command. This is done before the Framework calls the performExecute method of the command.
        Specified by:
        isReadyToCallExecute in interface com.ibm.websphere.command.Command
        Overrides:
        isReadyToCallExecute in class AbstractECTargetableCommand
        Returns:
        true if we can execute the command; false otherwise.
      • reset

        public void reset()
        Deprecated. 
        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.

        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • setErrorViewName

        public void setErrorViewName(java.lang.String sEVN)
        Deprecated. 
        Sets the error view to be used to report error. This overrides the default error view of the command.
        Specified by:
        setErrorViewName in interface DoRefundPolicyCmd
        Parameters:
        sEVN - the Error View name
        See Also:
        DoRefundPolicyCmd.ERRTASK_NAME
      • setOrder

        public void setOrder(OrderAccessBean ab)
        Deprecated. 
        Sets the order property of the command.
        Specified by:
        setOrder in interface DoRefundPolicyCmd
        Parameters:
        ab - the OrderAccessBean representing the Order associated with the Return Merchandise Authorization.
      • setRefundAmount

        public void setRefundAmount(java.math.BigDecimal refundAmount)
        Deprecated. 
        Sets the refundAmount property of the command.
        Specified by:
        setRefundAmount in interface DoRefundPolicyCmd
        Parameters:
        refundAmount - the amount to be refunded.
      • setRMA

        public void setRMA(RMAAccessBean ab)
        Deprecated. 
        Sets the RMA AccessBean representing the Return Merchandise Authorization record that authorizes the return of the merchandise..
        Specified by:
        setRMA in interface DoRefundPolicyCmd
        Parameters:
        ab - the RMAAccessBean