com.ibm.commerce.payment.commands

Class DoPaymentCLCmdImpl

  • All Implemented Interfaces:
    BusinessPolicyCommand, com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, DoPaymentPolicyCmd, 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 DoPaymentCLCmdImpl
    extends BusinessPolicyCommandImpl
    implements DoPaymentPolicyCmd
    This DoPaymentPolicy business policy command implementation class is the default implementation class for authorizing payment that specify the "Credit" Payment Policy.

    Parameter:
    Parameter Name Type Descriptions
    abOrder OrderAccessBean The Order ID of the Order
    bdTotalAmount BigDecimal The Total Amount to be authorized
    nPolicyId Long The ID of the Payment Policy to use for the Purchase.
    nBuyerPOId Long Optional buyerPOId
    errorViewName String Optional error view name passed in by the Caller.

    Behavior:
    • For all the OrderItems within this Order, make sure that the respective Trading Agreement includes a "Credit" Payment Policy and the Trading Agreements are all associated with the same Business Account object.
    • Checks if the Credit Line associated with the Account is still active.
    • If the Credit Line is still active, creates one record in the ORDPAYMTHD Table to represent the payment for the Order using "LOC" for the ORDPAYMTHD.payMethod and 0 for the ORDPAYMTHD.PayDevice Column.
    • In additional to the standard ORDPAYMTHD fields, stores the Account_id, CreditLine_id, and optionally the BuyerPO_id if specified.
    • Sets the return orderState to null for the OrderProcess command. (This will result in the OrderProcess command setting the Order status to "C" or "B" as appropriate.)
    Returned Parameters:
    • String orderState set to null.
    Default Error View Name:
    • DoPaymentErrorView
    ErrorCodes:
    See Also:
    Serialized Form
    • Constructor Detail

      • DoPaymentCLCmdImpl

        public DoPaymentCLCmdImpl()
        Deprecated. 
    • Method Detail

      • getContentType

        public java.lang.String getContentType()
        Deprecated. 
        Returns the Content Type (or MIME type) of the return data, or null if the type is not known.
        Specified by:
        getContentType in interface DoPaymentPolicyCmd
        Returns:
        a String containing the name of the MIME type of the return data, or null if the type is not known. Since this command implementation does not have return data, the method returns null.
      • getOrderState

        public 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. If the returned String is empty or null, the Calling command will decide the value to use for the Status
        Specified by:
        getOrderState in interface DoPaymentPolicyCmd
        Returns:
        the preferred order state
      • getReturnData

        public byte[] getReturnData()
        Deprecated. 
        Returns the byte Array containing Return Data from the Payment System. The Payment System used by this command does not use Return Data. Therefore return null.
        Specified by:
        getReturnData in interface DoPaymentPolicyCmd
        Returns:
        null
      • 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
      • setAccount

        public void setAccount(AccountAccessBean abAccount)
        Deprecated. 
        Sets the account property of the command.
        Specified by:
        setAccount in interface DoPaymentPolicyCmd
        Parameters:
        abAccount - the AccountAccessBean representing the account the order is associated with
      • setBuyerPOId

        public void setBuyerPOId(java.lang.Long n)
        Deprecated. 
        Sets the optional buyerPOId if the customer (buyer) had specified a buyer purchase order number.
        Specified by:
        setBuyerPOId in interface DoPaymentPolicyCmd
        Parameters:
        n - the internal ID of the BuyerPO record representing the purchase order number specified
      • 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 DoPaymentPolicyCmd
        Parameters:
        sEVN - the Error View name
        See Also:
        DoPaymentPolicyCmd.ERRTASK_NAME
      • setOrder

        public void setOrder(OrderAccessBean ab)
        Deprecated. 
        Sets the order property of the command.
        Specified by:
        setOrder in interface DoPaymentPolicyCmd
        Parameters:
        ab - the OrderAccessBean representing the order for which payment is to be processed
      • setOrderState

        public void setOrderState(java.lang.String s)
        Deprecated. 
        Sets the order state to be returned to the caller. This is the order state that the command would like the order to be moved to. It is up to the caller of this command to change the order status accordingly.
        Parameters:
        s - a String representing the preferred order state
      • setPaymentAttributes

        public void setPaymentAttributes(TypedProperty paymentAttributes)
        Deprecated. 
        Sets the paymentAttributes property of the command.
        Specified by:
        setPaymentAttributes in interface DoPaymentPolicyCmd
        Parameters:
        paymentAttributes - the TypedProperty object that contains all the command parameters that are to be passed to this command.
      • setTotalAmount

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