com.ibm.commerce.payment.ppc.commands

Class PPCCreditEditCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.base.helpers.EJBConstants, AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, PPCCreditEditCmd, Protectable, ECConstants, ToolsControllerCommand, ECToolsConstants, 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 PPCCreditEditCmdImpl
    extends ToolsControllerCommandImpl
    implements PPCCreditEditCmd, ECConstants, ECToolsConstants, com.ibm.commerce.base.helpers.EJBConstants
    This is the default implementation of the PPCCreditEditCmd tools controller command.

    Input parameters:

    Name XPath Description
    creditId /XML/creditId The identifier of current credit object. Mandatory.
    processedAmount /XML/processedAmount The amount of current credit object to process.
    expectedAmount /XML/expectedAmount The expected amount that will be credited under this credit, the actual credited amount must be less than or equal to this amount.
    creditedAmount /XML/creditedAmount The credited amount of the credit transaction under this credit.
    creditingAmount /XML/creditingAmount The amount of the pending credit transaction under this credit.
    reversingCreditedAmount /XML/reversingCreditedAmount The cumulative amount of all the pending reverse credit transactions under this credit.
    reasonCode /XML/reasonCode The reason code of the credit transaction.
    responseCode /XML/responseCode The response code of the credit transaction.
    referenceNumber /XML/referenceNumber The reference number of the credit transaction.
    extDataSize /XML/extDataSize The size of extended data of this credit object.
    extData /XML/extData The extended data of this credit object.
    comment /XML/comment The comment information of this credit object.

    Output parameters:

    None.

    Behaviour:

    • Validates the required parameters and if the format of these parameters is valid.
    • Calls the method editCredit of com.ibm.commerce.payments.plugincontroller.beans.PluginController to edit the credit information.
    • If the redirect URL is not specified, it calls GenericRedirectView upon successful completion, or GenericApplicationError upon failure.
    • Synchronizes the status of RMA(Return Merchandise Authorization) of this credit depends on with the backend credit status after the edit operation.

    Task commands called:

    None.
    See Also:
    com.ibm.commerce.payments.plugincontroller.beans.PluginController, PPCPaymentEditCmdImpl, Serialized Form
    • Field Detail

      • COPYRIGHT

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

        public static final java.lang.String CLASS_NAME
        The internal copyright field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PPCCreditEditCmdImpl

        public PPCCreditEditCmdImpl()
    • Method Detail

      • getCreditId

        public java.lang.String getCreditId()
        This method returns the identifier of current credit to edit.
        Returns:
        the identifier of current credit to edit
      • setCreditId

        public void setCreditId(java.lang.String newCreditId)
        This method sets the identifier of current credit to edit.
        Parameters:
        newCreditId - the identifier of current credit to edit
      • getExpireTime

        public java.lang.String getExpireTime()
        This method returns the expire time of current credit.
        Returns:
        the expire time of current credit
      • setExpireTime

        public void setExpireTime(java.lang.String string)
        This method sets the expire time of current credit.
        Parameters:
        string - the expire time to set
      • performExecute

        public void performExecute()
                            throws ECException
        This method performs the updating of credit and extended data information, which calls the corresponding API provided by WebSphere Commerce Payments.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException - In case of any ECException
      • getPaymentContext

        public PaymentContext getPaymentContext()
                                         throws java.lang.Exception
        The method returns the PaymentContext that contains the order channel id, locale, payment configuration group id, and store id.
        Returns:
        paymentContext The current payment context
        Throws:
        java.lang.Exception - In case of any failure
      • getProcessAmount

        public java.lang.String getProcessAmount()
        This method returns the amount processed by current credit.
        Returns:
        processAmount The amount processed by current credit
      • setProcessAmount

        public void setProcessAmount(java.lang.String string)
        This method sets the amount processed by current credit.
        Parameters:
        string - The amount processed by current credit
      • getCreditedAmount

        public java.lang.String getCreditedAmount()
        This method returns the credited amount of current credit.
        Returns:
        creditedAmount The credited amount of current credit
      • getCreditingAmount

        public java.lang.String getCreditingAmount()
        This method returns the crediting amount of current credit.
        Returns:
        creditingAmount The crediting amount of current credit
      • getExpectedAmount

        public java.lang.String getExpectedAmount()
        This method returns the expected amount of current credit.
        Returns:
        expectedAmount The expected amount of current credit
      • setExpectedAmount

        public void setExpectedAmount(java.lang.String string)
        This method sets the expected amount of current credit.
        Parameters:
        string - The expected amount of current credit
      • getReversingCreditedAmount

        public java.lang.String getReversingCreditedAmount()
        This method returns the amount that is credited but being reversed.
        Returns:
        reversingCreditedAmount The amount that is credited but being reversed
      • setCreditedAmount

        public void setCreditedAmount(java.lang.String string)
        This method sets the credited amount of current credit.
        Parameters:
        string - The credited amount of current credit
      • setCreditingAmount

        public void setCreditingAmount(java.lang.String string)
        This method sets the crediting amount of current credit.
        Parameters:
        string - The crediting amount of current credit
      • setReversingCreditedAmount

        public void setReversingCreditedAmount(java.lang.String string)
        This method sets the amount that is credited but being reversed.
        Parameters:
        string - The amount that is credited but being reversed
      • getReasonCode

        public java.lang.String getReasonCode()
        This method returns the reason code of current credit.
        Returns:
        reasonCode The reason code of current credit
      • setReasonCode

        public void setReasonCode(java.lang.String string)
        This method sets the reason code of current credit.
        Parameters:
        string - The reason code of current credit
      • setResponseCode

        public void setResponseCode(java.lang.String string)
        This method sets the response code of current credit.
        Parameters:
        string - The response code of current credit
      • getResponseCode

        public java.lang.String getResponseCode()
        This method returns the response code of current credit.
        Returns:
        responseCode The response code of current credit
      • getExtData

        public ExtendedData getExtData()
        This method returns the extended data of current credit.
        Returns:
        extData The extended data of current credit
      • setExtData

        public void setExtData(ExtendedData map)
        This method sets the extended data of current credit.
        Parameters:
        map - The extended data of current credit
      • getReferenceNumber

        public java.lang.String getReferenceNumber()
        This method returns the reference number of current credit.
        Returns:
        referenceNumber The reference number of current credit
      • setReferenceNumber

        public void setReferenceNumber(java.lang.String string)
        This method sets the reference number of current credit.
        Parameters:
        string - The reference number of current credit