com.ibm.commerce.payment.ppc.commands

Class PPCPaymentEditCmdImpl

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

    Input parameters:

    Name XPath Description
    paymentId /XML/paymentId The identifier of current payment object. Mandatory.
    processedAmount /XML/processedAmount The amount of current payment object to process.
    reasonCode /XML/reasonCode The reason code of the payment transaction.
    responseCode /XML/responseCode The response code of the payment transaction.
    referenceNumber /XML/referenceNumber The reference number of the payment transaction.
    pendingType /XML/pendingType The pending type when the payment transaction is pending. The value could be 'approve', 'approveAndDeposit', or 'deposit'.
    avsCommonCode /XML/avsCommonCode The avs common code returned by the payment transaction, which is useful when pending type is 'approve' or 'approveAndDeposit'.
    expiredYear /XML/expiredYear The expired year of the payment transaction, which is useful when pending type is 'approve' or 'approveAndDeposit'.
    expiredMonth /XML/expiredMonth The expired month of the payment transaction, which is useful when pending type is 'approve' or 'approveAndDeposit'.
    expiredDay /XML/expiredDay The expired day of the payment transaction, which is useful when pending type is 'approve' or 'approveAndDeposit'.
    extDataSize /XML/extDataSize The size of the extended data of this payment object.
    extData /XML/extData The extended data of this payment object.
    comment /XML/comment The comment information of this payment object.

    Output parameters:

    None.

    Behaviour:

    • Validates the required parameters and if the format of these parameters is valid.
    • Calls the method editPayment of com.ibm.commerce.payments.plugincontroller.beans.PluginController to edit the payment information.
    • If the redirect URL is not specified, it calls GenericRedirectView upon successful completion, or GenericApplicationError, upon failure.
    • Synchronizes the status of order of this payment associates to with the backend payment status after the edit operation.

    Task commands called:

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

      • COPYRIGHT

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

      • PPCPaymentEditCmdImpl

        public PPCPaymentEditCmdImpl()
    • Method Detail

      • performExecute

        public void performExecute()
                            throws ECException
        This method performs the updating of payment and extended data information using the corresponding API in 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 failure
      • 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:
        the current payment context
        Throws:
        java.lang.Exception - In case of any failure
      • getPaymentId

        public java.lang.String getPaymentId()
        This method returns current payment identifier.
        Returns:
        the current payment identifier
      • setPaymentId

        public void setPaymentId(java.lang.String newPaymentId)
        This method sets current payment identifier.
        Parameters:
        newPaymentId - the current payment identifier
      • getExpiredTime

        public long getExpiredTime()
        This method returns the expired time specified for this payment.
        Returns:
        the expired time specified for this payment
      • setExpiredTime

        public void setExpiredTime(long string)
        This method sets the expired time specified for this payment.
        Parameters:
        string - the expired time to set
      • getAvsCommonCode

        public short getAvsCommonCode()
        This method returns AVS (Address Verification Service) code.
        Returns:
        the AVS code
      • setAvsCommonCode

        public void setAvsCommonCode(short i)
        This method sets the AVS code.
        Parameters:
        i - the AVS code to set
      • getProcessAmount

        public java.lang.String getProcessAmount()
        This method returns the amount to process in current payment transaction.
        Returns:
        the amount to process in current payment transaction
      • setProcessAmount

        public void setProcessAmount(java.lang.String string)
        This method sets the amount to process in current payment transaction.
        Parameters:
        string - the amount to process in current payment transaction
      • getReasonCode

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

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

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

        public java.lang.String getReferenceNumber()
        This method returns the reference number of current payment.
        Returns:
        the reference number of current payment
      • setResponseCode

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

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

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

        public void setExtData(ExtendedData map)
        This method sets the extended data of current payment.
        Parameters:
        map - the extended data of current payment