Skip navigation links
atg.commerce.payment.processor

Class ProcCreateGiftCertificateInfo

    • Field Detail

      • CLASS_VERSION

        public static java.lang.String CLASS_VERSION
      • SUCCESS

        public static final int SUCCESS
        The possible return value for this processor.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ProcCreateGiftCertificateInfo

        public ProcCreateGiftCertificateInfo()
    • Method Detail

      • getGiftCertificateInfoClass

        public java.lang.String getGiftCertificateInfoClass()
        Return the class to instantiate when creating a new GiftCertificateInfo object.
      • setGiftCertificateInfoClass

        public void setGiftCertificateInfoClass(java.lang.String pGiftCertificateInfoClass)
        Specify the class to instantiate when creating a new GiftCertificateInfo object. If the GenericGiftCertificateInfo class is extended to include more information, this property can be changed to reflect the new class.
      • addDataToGiftCertificateInfo

        protected void addDataToGiftCertificateInfo(Order pOrder,
                                                    GiftCertificate pPaymentGroup,
                                                    double pAmount,
                                                    PaymentManagerPipelineArgs pParams,
                                                    GenericGiftCertificateInfo pGiftCertificateInfo)
        This method populates the GiftCertificateInfo object with data. If the additional data is required, a subclass of GenericGiftCertificateInfo can be created with additional properties, the giftCertificateInfoClass property can be changed to specify the new class, and this method can be overridden to add data for the new properties (or another pipeline processor could be added after this processor to populate the additional properties).
        Parameters:
        pOrder - The order being paid for.
        pPaymentGroup - The payment group being processed.
        pAmount - The amount being authorized, debited, or credited
        pParams - The parameter dictionary passed to this pipeline processor
        pGiftCertificateInfo - An object that holds information understood by the gift certificate payment processor.
      • getGiftCertificateInfo

        protected GenericGiftCertificateInfo getGiftCertificateInfo()
                                                             throws java.lang.Exception
        Factory method to create a new GiftCertificateInfo object. The class that is created is that specified by the giftCertificateInfoClass property, and must be a subclass of atg.payment.giftcertificate.GenericGiftCertificateInfo.
        Returns:
        An object of the class specified by giftCertificateInfoClass
        Throws:
        java.lang.Exception - if any instantiation error occurs when creating the info object
      • runProcess

        public int runProcess(java.lang.Object pParam,
                              PipelineResult pResult)
                       throws java.lang.Exception
        Generate a GiftCertificateInfo object of the class specified by giftCertificateInfoClass, populate it with data from a GiftCertificate payment group by calling addDataToGiftCertificateInfo, and add it to the pipeline argument dictionary so that downstream pipeline processors can access it.
        Specified by:
        runProcess in interface PipelineProcessor
        Parameters:
        pParam - Parameter dictionary of type PaymentManagerPipelineArgs.
        pResult - Pipeline result object, not used by this method.
        Returns:
        An integer value used to determine which pipeline processor is called next.
        Throws:
        java.lang.Exception - If any error occurs creating or populating the gift certificate info object.
      • getRetCodes

        public int[] getRetCodes()
        Return the possible return values for this processor. This processor always returns a success code.
        Specified by:
        getRetCodes in interface PipelineProcessor
        Returns:
        an array of all the return codes that could be returned by this PipelineProcessor.