com.ibm.commerce.order.commands

Interface ValidatePaymentMethodCmd

  • All Superinterfaces:
    com.ibm.websphere.command.CacheableCommand, com.ibm.commerce.command.CacheableECCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ECCommand, java.io.Serializable, com.ibm.websphere.command.TargetableCommand, TaskCommand
    All Known Implementing Classes:
    DOMValidatePaymentMethodCmdImpl, ValidatePaymentMethodCmdImpl


    public interface ValidatePaymentMethodCmd
    extends TaskCommand
    This command checks whether the payment method to be added comply with the BOPIS (Buy Online Pick In Store) rules.

    Behaviour:

    This command will validate whether the payment method is valid for the order according to the BOPIS validating rules:
    • If the order contains both normal items and BOPIS items, only normal payment methods can be used.
    • If the order contains only normal items, only normal payment methods can be used.
    • If the order contains only BOPIS items, there are three cases:
      • If there is no payment instruction for the order, both normal payment methods and BOPIS payment methods can be used.
      • If there exist payment instructions of normal payment method, only normal payment method can be used.
      • If there exist payment instructions of BOPIS payment method, only BOPIS payment method can be used.
      • Input:

        API Description
        setOrderId(Long orderId) This method is mandatory, specifying the order on which the payment method will be validate.
        setPolicyId(Long policyId) This method is mandatory, specifying the payment policy ID of the payment method to be validate.

        Output:

        API Description
        boolean isValidatePaymentMethod() This method will return a boolean value to indicate that whether the passed policyId or paymentMethodId is valid for the given orderId.
        The default implementation of this command is ValidatePaymentMethodCmdImpl.
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        IBM Copyright note field.
        See Also:
        Constant Field Values
      • defaultCommandClassName

        static final java.lang.String defaultCommandClassName
        The default implementation of this command.
        See Also:
        Constant Field Values
    • Method Detail

      • setOrderId

        void setOrderId(java.lang.Long orderId)
        This method is mandatory, specifying the order on which the payment method will be validate.
        Parameters:
        orderId -
      • setPolicyId

        void setPolicyId(java.lang.Long policyId)
        This method is mandatory, specifying the policy ID of the payment method to be validate. If the setPaymentMethodID(String paymentMethodID) was not called, this method is mandatory.
        Parameters:
        policyId -
      • setErrorViewName

        void setErrorViewName(java.lang.String errorViewName)
        This method sets the error view name. The error view will be used if the given payment policy is invalidate.
        Parameters:
        errorViewName -