Interface StoreAndValidatePaymentCmd

  • All Superinterfaces:
    AEDPPaymentTaskCmd, AEDPStoreTaskCmd, AEDPTaskCmd,,,,, ECCommand,,, TaskCommand
    All Known Implementing Classes:
    StoreAndValidatePaymentCmdImpl, StoreAndValidatePaymentVoidCmdImpl

    public interface StoreAndValidatePaymentCmd
    extends AEDPStoreTaskCmd

    This task command is used to create an empty order/payments container in payments subcomponent. The default implementation of this command is StoreAndValidatePaymentCmdImpl.

    This task command is called during order capture and applies to all order capture events. The function of this task command is to store payment information and validate it. So that the merchant can find out whether a payment is bad before the customer is disengaged. The merchant does not want to incur the expense of contacting the customer to correct payment information. Nor does the merchant want to incur fees associated with getting a guarantee of payment because the order might never be submitted. This task command also occurs in the following situations. An order is created and the customer has provided payment instructions. But the order is waiting on buyer approval or validation by another party before it can proceed.

    Payment instructions are always validated in this command and during the PrimePaymentCmd command.

    The possible payment action associated with this command is only one, Validation. This payment action ("how" a validation can occur) is not configurable. The starter stores and IBM Sales Center always invoke the StoreAndValidatePaymentCmd task commands (although in principle the command is not mandatory). Validation always occurs when payment information is added or changed.

    For example, a customer logs on to an office supply store Web site and logs on. He is identified as a member of an organization that has a defined contract with the store. The contract stipulates the terms and conditions for the customer to shop at the store. The customer adds office supplies to a shopping cart and a StoreAndValidatePaymentCmd occurs. StoreAndValidatePaymentCmd creates an empty payment container object EDPOrder with amount zero.

    The action flow is similar when a CSR creates a quote with payment information. If the customer creates an order and adds some items to it, no payment container is created. He selects and adds office supplies to a shopping cart and proceeds to check out. The payment method and shipping information for his organization is determined from the contract terms and is displayed. The StoreAndValidatePaymentCmd is called. The order is marked held to wait for approval, and the customer is notified that the order has been sent for approval.

    In effect, this command stores information about the payment intended to take place. But no actual financial transactions are taking place because the payment information requires validation first.

    • Field Detail


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

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

        static final java.lang.String NAME
        The full name of this command.
        See Also:
        Constant Field Values
    • Method Detail

      • setCurrency

        void setCurrency(java.lang.String paramCurrency)
        This method sets the currency used in the command.
        paramCurrency - A String that specifies the currency.
      • setOrderAmount

        void setOrderAmount(java.math.BigDecimal paramOrderAmount)
        This method sets the order amount.
        paramOrderAmount - A BigDecimal that specifies the order amount to be set.
      • setPaymentAttributes

        void setPaymentAttributes(TypedProperty requestProperties)
        This method sets the protocol data when creating a single payment instruction. This is not currently used out-of-the-box for payments rules. Instead, this request is used to create an empty payments contained and payment instructions are added using PIAddCmd.
        requestProperties - A TypedProperty which is the protocol data representing a single payment instruction.