Class StoreAndValidatePaymentCmdImpl

  • All Implemented Interfaces:, ECCommand, ECTargetableCommand, TaskCommand, AEDPPaymentTaskCmd, AEDPStoreTaskCmd, AEDPTaskCmd, StoreAndValidatePaymentCmd,,,,,,

    public class StoreAndValidatePaymentCmdImpl
    extends AEDPStoreTaskCmdImpl
    implements StoreAndValidatePaymentCmd
    This is the default implementation of the StoreAndValidatePaymentCmd task command.


    • It is used to store and validate the payment information. 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. It is also called in situations where 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.

    Input parameters:

    commandContext The command context.
    orderId A Long that indicates the id of the current order.
    orderAmount A BigDecimal that indicates the total amount of the current order.
    currency A String that specifies the currency associated with the refund currently being processed.

    Output parameters:


    Task commands called:

    See Also:
    Serialized Form
    • Field Detail


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

      • StoreAndValidatePaymentCmdImpl

        public StoreAndValidatePaymentCmdImpl()
    • Method Detail

      • getOrderAccessBean

        public OrderAccessBean getOrderAccessBean()
        This method gets a reference to the order access bean. It will first check if there is a local reference to the order access bean. If not present, it will create a new one.
        A OrderAccessBean that corresponds to the Order to paid for.
      • getWCOrderAmount

        public java.math.BigDecimal getWCOrderAmount()
        This method returns the total order amount.
        A BigDecimal that specifies total order amount; a null value may be returned.
      • setPaymentAttributes

        public 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 Order Payments component. Instead, this task command is used to create an empty payments container and payment instructions are added using PIAddCmd.
        Specified by:
        setPaymentAttributes in interface StoreAndValidatePaymentCmd
        requestProperties - A TypedProperty which is the protocol data representing a single payment instruction.
      • getWCPaymentInstructions

        public java.util.ArrayList getWCPaymentInstructions()
                                                     throws ParameterNotFoundException
        This method gets the list of payment instructions to be created in the payment subcomponent.
        An ArrayList that represents the list of PaymentInstructions.
        ParameterNotFoundException - This exception is thrown by TypedProperty.
      • setPaymentMethodId

        public void setPaymentMethodId(java.lang.String nPayMthdId)

        This method sets the payment method ID to be used for the payment instruction of the order.

        It is to be used when there is only a single payment method for the entire order.

        nPayMthdId - A String that specifies the payment method ID.
      • getPaymentMethodId

        public java.lang.String getPaymentMethodId()
        This method gets the payment method ID to used for the payment instruction of the order.
        A String that specifies the payment method ID.
      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        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
        isReadyToCallExecute in class AbstractECTargetableCommand
        A boolean that is true if the command is ready to execute and false otherwise.
      • reset

        public void reset()

        This method resets the command fields.

        After this method is invoked, and proper attributes are set, the command can be executed again.

        Specified by:
        reset in interface
        reset in class AEDPPaymentTaskCmdImpl