Class PaymentProcessor

    • Constructor Detail

      • PaymentProcessor

        public PaymentProcessor()
        Public Constructor
    • Method Detail

      • isProcessedOK

        public abstract boolean isProcessedOK()
        Payment is processed successfully
        Returns:
        true if OK
      • validateAccountNo

        public String validateAccountNo()
        Standard account validation.
        Returns:
      • validateCheckNo

        public String validateCheckNo()
      • setTimeout

        public void setTimeout​(int newTimeout)
        Set Timeout
        Parameters:
        newTimeout - timeout
      • getTimeout

        public int getTimeout()
        Get Timeout
        Returns:
        timeout
      • createPair

        protected String createPair​(String name,
                                    BigDecimal value,
                                    int maxLength)
        Check for delimiter fields &= and add length of not encoded
        Parameters:
        name - name
        value - value
        maxLength - maximum length
        Returns:
        name[5]=value or name=value
      • createPair

        protected String createPair​(String name,
                                    int value,
                                    int maxLength)
        Check for delimiter fields &= and add length of not encoded
        Parameters:
        name - name
        value - value
        maxLength - maximum length
        Returns:
        name[5]=value or name=value
      • createPair

        protected String createPair​(String name,
                                    String value,
                                    int maxLength)
        Check for delimiter fields &= and add length of not encoded
        Parameters:
        name - name
        value - value
        maxLength - maximum length
        Returns:
        name[5]=value or name=value
      • setEncoded

        public void setEncoded​(boolean doEncode)
        Set Encoded
        Parameters:
        doEncode - true if encode
      • isEncoded

        public boolean isEncoded()
        Is Encoded
        Returns:
        true if encoded
      • getConnectPostProperties

        protected Properties getConnectPostProperties​(String urlString,
                                                      String parameter)
        Get Connect Post Properties
        Parameters:
        urlString - POST url string
        parameter - parameter
        Returns:
        result as properties
      • connectPost

        protected String connectPost​(String urlString,
                                     String parameter)
        Connect via Post
        Parameters:
        urlString - url destination (assuming https)
        parameter - parameter
        Returns:
        response or null if failure