com.ibm.commerce.payment.ppc.commands

Class PaymentProcessFinancialTransactionCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, PaymentProcessFinancialTransactionCmd, Protectable, 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


    public class PaymentProcessFinancialTransactionCmdImpl
    extends ControllerCommandImpl
    implements PaymentProcessFinancialTransactionCmd
    This is the default implementation of the PaymentProcessFinancialTransactionCmd controller command.

    Input parameters:

    Name XPath Description
    channelId ApplicationArea/BusinessContext/ContextData[@name='channelId'] The order channel ID used currently. Mandatory.
    locale ApplicationArea/BusinessContext/ContextData[@name='locale'] The locale used currently. Such as: CA, EN, and US and so forth. Mandatory.
    paymentConfigurationGroupId DataArea/FinancialTransaction/Payment/PaymentInstruction/PaymentConfigurationID or DataArea/FinancialTransaction/Credit/PaymentInstruction/PaymentConfigurationID The current payment configuration group ID. Default it is "default". Optional. If it is not defined in the input parameters, there are two alternatives. 1) If the Payment/Credit ID or the Payment Instruction ID is defined in the input parameters, it will be retrieved from the corresponding Payment Instruction. 2) If the paymentMethodName is defined, it will be retrieved via the configuration in Payment Rules.
    storeId DataArea/FinancialTransaction/Payment/PaymentInstruction/StoreID or DataArea/FinancialTransaction/Credit/PaymentInstruction/StoreID The current store ID. Optional. If it is not defined in the input parameters, and the Payment/Credit ID or Payment Instruction ID is defined in the input parameters. Then it will be retrieved from the corresponding Payment Instruction.
    paymentMethodName DataArea/FinancialTransaction/Payment/PaymentInstruction/PaymentMethodName or DataArea/FinancialTransaction/Credit/PaymentInstruction/PaymentMethodName The payment method name used by current financial transaction. Optional.
    action DataArea/FinancialTransaction@type The financial type of current financial transaction. Possible values include "approve","deposit", credit,reverseApproval, reverseDeposit, and reverseCredit. Mandatory.
    amount DataArea/FinancialTransaction/RequestedAmount The requested amount needs to process of current financial transaction. Mandatory.
    currency DataArea/FinancialTransaction/RequestedAmount@currency The current used by current financial transaction. Mandatory.
    extendedDataName DataArea/FinancialTransaction/Payment/PaymentInstruction/ExtendedData@name The extended data name. Optional.
    extendedDataValue DataArea/FinancialTransaction/Payment/PaymentInstruction/ExtendedData@value The extended data value. Optional.
    orderId DataArea/FinancialTransaction/Payment/PaymentInstruction/OrderIdentifier/OrderID The order ID of current financial transaction. Optional.
    rmaId DataArea/FinancialTransaction/Credit/PaymentInstruction/RMAIdentifier/RMAID The RMA ID of current financial transaction. Optional.
    paymentSystemName DataArea/FinancialTransaction/Payment/PaymentInstruction/PaymentSystemName or DataArea/FinancialTransaction/Credit/PaymentInstruction/PaymentSystemName The current payment system name. Optional. If it is not defined in the input parameters, there are two alternatives. 1) If the Payment/Credit ID or the Payment Instruction ID is defined in the input parameters, it will be retrieved from the corresponding Payment Instruction. 2) If the paymentMethodName is defined, it will be retrieved via the configuration in Payment Rules.
    paymentId or creditId DataArea/FinancialTransaction/Payment/PaymentIdentifier/PaymentID or DataArea/FinancialTransaction/Credit/PaymentIdentifier/CreditID The Payment ID of current financial transaction. Optional.
    paymentInstructionId DataArea/FinancialTransaction/Payment/PaymentInstruction/PaymentInstructionIdentifier/PaymentInstructionID The Payment Instruction ID of current financial transaction. Optional.

    Response view:

    • View: AcknowledgeFinancialTransaction(WebServices/OAGIS/9.0/BODs/AcknowledgePaymentInstruction.jsp)
    • Error view: AcknowledgeFinancialTransaction(WebServices/OAGIS/9.0/BODs/AcknowledgePaymentInstruction.jsp)

    Behaviour:

    • If there is no Payment Instruction created previously, then this command creates a new Payment Instruction for this financial transaction.
    • Call the corresponding APIs of WebSphere Commerce Payments to execute the financial transaction.
    • Put the financial transaction value object with execution result into the response properties.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The internal copyright field.
        See Also:
        Constant Field Values
      • CLASSNAME

        public static final java.lang.String CLASSNAME
        The name of this command is "com.ibm.commerce.payment.ppc.commands.PaymentProcessFinancialTransactionCmdImpl".
        See Also:
        Constant Field Values
    • Constructor Detail

      • PaymentProcessFinancialTransactionCmdImpl

        public PaymentProcessFinancialTransactionCmdImpl()
        This is the class constructor.
    • Method Detail

      • performExecute

        public void performExecute()
                            throws ECException
        This method contains the actual business logic of the command as per the WebSphere Commerce command framework.It calls WebSphere Commerce Payments to process payment actions.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException - if something fails
      • getChannelId

        public java.lang.String getChannelId(java.lang.Integer i)
        This method returns input parameter channel id with enumeration group i.
        Parameters:
        i - The index that the channel id locates at
        Returns:
        The input parameter channel id with enumeration group i
      • getLocale

        public java.util.Locale getLocale(java.lang.Integer i)
        This method returns input parameter locale with enumeration group i.
        Parameters:
        i - The index that the locale locates at
        Returns:
        The input parameter locale with enumeration group i
      • getOrderId

        public java.lang.String getOrderId(java.lang.Integer i)
        This method returns input parameter order id with enumeration group i.
        Parameters:
        i - The index that the order id locates at
        Returns:
        The input parameter order id with enumeration group i
      • getRMAId

        public java.lang.String getRMAId(java.lang.Integer i)
        This method returns input parameter RMA id with enumeration group i.
        Parameters:
        i - The index that the RMA id locates at
        Returns:
        The input parameter RMA id with enumeration group i
      • getPaymentConfigurationGroupId

        public java.lang.String getPaymentConfigurationGroupId(java.lang.Integer i)
        This method returns input parameter payment configuration group id with enumeration group i.
        Parameters:
        i - The index that the payment configuration id locates at
        Returns:
        The input parameter payment configuration group with enumeration group i
      • getStoreId

        public java.lang.Integer getStoreId(java.lang.Integer i)
        This method returns input parameter store id with enumeration group i.
        Parameters:
        i - The index that the store id locates at
        Returns:
        The input parameter store id with enumeration group i
      • getPaymentMethodName

        public java.lang.String getPaymentMethodName(java.lang.Integer i)
        This method returns input parameter payment method name with enumeration group i.
        Parameters:
        i - The index that the payment method name locates at
        Returns:
        The input parameter payment method name enumeration group i
      • 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 com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand