com.ibm.commerce.edp.commands

Interface PrimePaymentCmd

  • All Superinterfaces:
    AEDPPaymentTaskCmd, AEDPStoreTaskCmd, AEDPTaskCmd, 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:
    PrimePaymentCmdImpl, PrimePaymentVoidCmdImpl


    public interface PrimePaymentCmd
    extends AEDPStoreTaskCmd

    This task command is used to prepare payments in the payments rules subcomponent. It's invoked by the ProcessOrderCmdImpl Controller Command to prepare payment processing for an order. The returnData may be null. In this case, OrderProcessCmd will go to the OrderOK View to display a confirmation page to the customer.

    This command is called by the order capture. When the order is captured, this command provides some guarantee that the customer has funds to pay for the order. Like the StoreAndValidatePaymentCmd, the purpose of this command is for the merchant to find out whether a payment is bad before the customer is disengaged. A Payment Rules order and payment instructions can be created by this command. A Payment Rules�order corresponds to the payment portion of a WebSphere Commerce order, and can have multiple releases associated with it. But normally the Payment Rules order is created by StoreAndValidatePaymentCmd and the payment instructions are added by PIAddCmd.

    During PrimePaymentCmd,If the current charge of the order is zero. Then the user has the configuration to either validate payment or approve the minimum amount or do nothing.

    The PrimePaymentCmd is not optional; it always occurs.

    Two logics of the PrimePaymentCmd exist: one with payment instructions, and one without payment instructions. The following conditions apply to each:

    • When the command is called with payment instructions, each payment instruction is validated and added.
    • When the command is called without payment instructions, no validation takes place and no payment instruction is added. This logic occurs when the StoreAndValidatePaymentCmd and PIAddCmd has already called.

    The possible payment actions associated with this command are: Validation, Approve, and Deposit.

    For example, a customer shops at a store, submits an order and specifies that a particular credit card should be used as the payment method.

    A PrimePaymentCmd is called and the Payment rules are read to determine what payment actions should take place for the payment method. Payment actions are configurable. For example, for credit cards, the default behavior is to check to ensure that the customer has sufficient credit and the card has not expired. If the credit card is fine, the payment is approved. If a payment action with the payment back end system fails, a tickler is created to notify a Customer Service Representative. Other scenarios might involve other actions, such as depositing the funds immediately.

    The default implementation of this command is PrimePaymentCmdImpl.

    See Also:
    ProcessOrderCmdImpl, OrderProcessCmd
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        The IBM Copyright notice field.
        See Also:
        Constant Field Values
      • NAME

        static final java.lang.String NAME
        The full name of this command.
        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

      • getEDPWarning

        java.lang.String getEDPWarning()
        This method returns the payments rules warning message.
        Returns:
        A String that specifies the payments rules warning message.
      • setInitialAmount

        void setInitialAmount(java.math.BigDecimal initialAmount)
        This method sets the initial amount to be used in the prime payment event request.
        Parameters:
        initialAmount - A BigDecimal that specifies the initial amount to be used in the prime payment event request.
      • setPaymentAttributes

        void setPaymentAttributes(TypedProperty requestProperties)
        This method sets the payment attributes property of the command.
        Parameters:
        requestProperties - A TypedProperty that represents the requestProperties object that contains all the command parameters that are to be passed to this command.
      • getPaymentAttributes

        TypedProperty getPaymentAttributes()
        This method obtains the task command properties.
        Returns:
        A TypedProperty that represents the task command properties.
      • setPaymentMethodId

        void setPaymentMethodId(java.lang.String paymentMethodId)
        This method sets the payment method ID.
        Parameters:
        paymentMethodId - A String that specifies the payment method id.
      • setTotalAmount

        void setTotalAmount(java.math.BigDecimal totalAmount)
        This method sets the total amount of the order.
        Parameters:
        totalAmount - A BigDecimal that specifies the total amount of the order.
      • getErrorMessageMap

        java.util.Map getErrorMessageMap()
        This method returns the map containing error message of each Payment Instruction.
        Returns:
        the map containing error message of each Payment Instruction