com.ibm.commerce.edp.config

Class PaymentGroupConfiguration

  • java.lang.Object
    • com.ibm.commerce.edp.config.PaymentGroupConfiguration


  • public class PaymentGroupConfiguration
    extends java.lang.Object
    This class is designed to provide group level configuration information.
    • Constructor Detail

      • PaymentGroupConfiguration

        public PaymentGroupConfiguration(java.lang.String localGroupName)
        This method creates a new PaymentGroupConfiguration object.
        Parameters:
        localGroupName - the id of this payment group
    • Method Detail

      • getAvsResponseActionName

        public java.lang.String getAvsResponseActionName(java.lang.String paymentMethod,
                                                         int avsCode)
                                                  throws InvalidDataException,
                                                         RuleException
        This method gets an action name from an AVS(Address Verification Service) code.
        Parameters:
        paymentMethod - The payment method, value such as VISA
        avsCode - The input AVS code to be mapped into an action
        Returns:
        The name of response action configured in XML file
        Throws:
        InvalidDataException - Invalid input data, such as null value of parameter
        RuleException - If a payment method configuration cannot be found
      • getCancelPaymentActionForDNE

        public TargetStateWrapper getCancelPaymentActionForDNE(java.lang.String paymentMethod)
                                                        throws RuleException,
                                                               InvalidDataException
        This method returns the actions need be executed to move payment to DNE state because cancel payment, for this specified payment method.

        The current states could be DNE, Approved, Deposited

        Parameters:
        paymentMethod - A String value of payment method, such as VISA
        Returns:
        TargetStateWrapper A help object can tell what payment actions execution required if current state is DNE, Approved or Deposited
        Throws:
        RuleException - Configurations not found for this payment method
        InvalidDataException - Invalid input parameter value, for example null value
      • setCoreConfigurationFiles

        public void setCoreConfigurationFiles(java.util.ArrayList localCoreConfigurationFiles)
        This method sets the coreConfigurationFiles field for this payment group.
        Parameters:
        localCoreConfigurationFiles - The coreConfigurationFiles to set
      • getCoreConfigurationFiles

        public java.util.ArrayList getCoreConfigurationFiles()
        This method returns the core configuration files for this payment group.
        Returns:
        an ArrayList of core configuration files
      • getEditRules

        public EditRules getEditRules(java.lang.String paymentMethod)
                               throws RuleException,
                                      InvalidDataException
        This method returns the edit rule configuration values for this payment group.
        Parameters:
        paymentMethod - A String of payment method such as VISA
        Returns:
        An EditRules object
        Throws:
        RuleException - Edit rules for this payment group can not found
        InvalidDataException - Payment group id or payment method is invalid
      • getEditReversalPaymentActionForDNE

        public TargetStateWrapper getEditReversalPaymentActionForDNE(java.lang.String paymentMethod)
                                                              throws RuleException,
                                                                     InvalidDataException
        This method returns the actions need be executed to move payment back to DNE state for this specified payment method.

        The current states could be DNE, Approved, Deposited

        Parameters:
        paymentMethod - such as VISA
        Returns:
        TargetStateWrapper A help object can tell what payment actions required if current state is DNE, Approved or Deposited
        Throws:
        RuleException - Rules configuration files error, such not found
        InvalidDataException - Input values not acceptable, such as null value passed
      • setMappings

        public void setMappings(PaymentMappings localMappings)
        This method sets the mappings for this specified payment group, which maps a payment method to payment configuration and certain rule.
        Parameters:
        localMappings - The mappings to set
      • getMappings

        public PaymentMappings getMappings()
        This method returns the mappings for this specified payment group, which maps a payment method to payment configuration and certain rule.
        Returns:
        mappings The returned mappings from payment method to payment configuration and certain rule
      • getPaymentActionForApproved

        public TargetStateWrapper getPaymentActionForApproved(java.lang.String paymentMethod)
                                                       throws RuleException,
                                                              InvalidDataException
        This method returns the actions need be executed to move payment to Approved state for this specified payment method.

        The current states could be DNE, Approved, Deposited.

        Parameters:
        paymentMethod - A String value of payment method such as VISA
        Returns:
        TargetStateWrapper A help object can tell what payment actions required if current state is DNE, Approved or Deposited
        Throws:
        RuleException - Configurations not found for this payment method
        InvalidDataException - Invalid input parameter value, for example null value
      • getPaymentActionForDNE

        public TargetStateWrapper getPaymentActionForDNE(java.lang.String paymentMethod)
                                                  throws RuleException,
                                                         InvalidDataException
        This method returns the actions need be executed to move payment to DNE state for this specified payment method.

        The current states could be DNE, Approved, Deposited.

        Parameters:
        paymentMethod - A String value of payment method such as VISA
        Returns:
        TargetStateWrapper A help object can tell what payment actions execution required if current state is DNE, Approved or Deposited
        Throws:
        RuleException - Configurations not found for this payment method
        InvalidDataException - Invalid input parameter value, for example null value
      • getPaymentActionForDeposited

        public TargetStateWrapper getPaymentActionForDeposited(java.lang.String paymentMethod)
                                                        throws RuleException,
                                                               InvalidDataException
        This method returns the actions need be executed to move payment to Deposited state for this specified payment method.

        The valid current states could be DNE, Approved, Deposited

        Parameters:
        paymentMethod - A String value of payment method such as VISA
        Returns:
        TargetStateWrapper A help object can tell what payment actions execution required if current state is DNE, Approved or Deposited
        Throws:
        RuleException - Configurations not found for this payment method
        InvalidDataException - Invalid input parameter value, for example null value
      • getPaymentActionRules

        public PaymentRules getPaymentActionRules()
        This method returns the payment rules that store payment rules for this payment group.
        Returns:
        The PaymentRules object
      • setPaymentMethodConfigurations

        public void setPaymentMethodConfigurations(PaymentMethodConfigurations localPaymentMethodConfigurations)
        This method sets the paymentMethodConfigurations field. The paymentMethodConfigurations stores the mapping from payment configuration to payment system and some attributes of this payment configuration.

        The attributes include if allow refund, minimum amount, ...

        Parameters:
        localPaymentMethodConfigurations - The paymentMethodConfigurations to set
      • getPaymentMethodConfigurations

        public PaymentMethodConfigurations getPaymentMethodConfigurations()
        This method returns the paymentMethodConfigurations field.The paymentMethodConfigurations stores the mapping from payment configuration to payment system and some attributes of this payment configuration.

        The attributes include if allow refund, minimum amount, ...

        Returns:
        paymentMethodConfigurations The returned paymentMethodConfigurations
      • setPaymentRules

        public void setPaymentRules(PaymentRules localPaymentRules)
        This method sets the paymentRules field that store payment rules for this payment group.
        Parameters:
        localPaymentRules - a PaymentRules object to set
      • setRefundMappings

        public void setRefundMappings(RefundMappings localRefundMappings)
        This method sets the refundMappings filed. The refundMappings stores the mappings from refund method to refundMethodConfiguration.
        Parameters:
        localRefundMappings - The refundMappings to set
      • getRefundMappings

        public RefundMappings getRefundMappings()
        This method returns the refundMappings. The refundMappings stores the mappings from refund method to refundMethodConfiguration.
        Returns:
        refundMappings The returned refundMappings
      • setRefundMethodConfigurations

        public void setRefundMethodConfigurations(RefundMethodConfigurations localRefundMethodConfigurations)
        This method sets the refundMethodConfigurations. The refundMethodConfigurations stores the mappings from refundMethodConfiguration to payment system.
        Parameters:
        localRefundMethodConfigurations - The refundMethodConfigurations to set
      • getRefundMethodConfigurations

        public RefundMethodConfigurations getRefundMethodConfigurations()
        This method returns the refundMethodConfigurations. The refundMethodConfigurations stores the mappings from refundMethodConfiguration to payment system.
        Returns:
        refundMethodConfigurations The returned refundMethodConfigurations