Class GatewayResponse

  • public class GatewayResponse
    extends java.lang.Object
    A class representing the payment gateway's response to a request. It holds fields of the response which are filled in when the response arrives and available through getter methods. This response class supports all 3 payment methods. Based on public domain sample code provided by
    • Constructor Detail

      • GatewayResponse

        public GatewayResponse​( xmlstream,
                               GatewayRequest req)
                        throws java.lang.Exception
        Creates the GatewayResponse object by parsing an xml from a stream. Fills in the fields of the object that are available through getters after this method returns.
        xmlstream - the stream to parse the response from
        java.lang.Exception - if the xml contains a root element with a bad name or an unknown element, or if the xml is badly formatted
    • Method Detail

      • getTrxnNumber

        public java.lang.String getTrxnNumber()
      • getTrxnReference

        public java.lang.String getTrxnReference()
      • getTrxnOption1

        public java.lang.String getTrxnOption1()
      • getTrxnOption2

        public java.lang.String getTrxnOption2()
      • getTrxnOption3

        public java.lang.String getTrxnOption3()
      • getAuthCode

        public java.lang.String getAuthCode()
      • getTrxnError

        public java.lang.String getTrxnError()
      • getReturnAmount

        public int getReturnAmount()
      • getTransactionAmount

        public java.math.BigDecimal getTransactionAmount()
      • getTrxnStatus

        public boolean getTrxnStatus()
      • getBeagleScore

        public double getBeagleScore()
        Gets the beagle score. Defaults to -1 in case of non-Beagle payment methods or if the response does not contain this field.
        The beagle score or -1 if it was not defined in the response
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object