Class GatewayResponse
- java.lang.Object
-
- org.apache.ofbiz.accounting.thirdparty.eway.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 eWay.com.au
-
-
Constructor Summary
Constructors Constructor Description GatewayResponse(java.io.InputStream xmlstream, GatewayRequest req)
Creates the GatewayResponse object by parsing an xml from a stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAuthCode()
double
getBeagleScore()
Gets the beagle score.int
getReturnAmount()
java.math.BigDecimal
getTransactionAmount()
java.lang.String
getTrxnError()
java.lang.String
getTrxnNumber()
java.lang.String
getTrxnOption1()
java.lang.String
getTrxnOption2()
java.lang.String
getTrxnOption3()
java.lang.String
getTrxnReference()
boolean
getTrxnStatus()
java.lang.String
toString()
-
-
-
Constructor Detail
-
GatewayResponse
public GatewayResponse(java.io.InputStream 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.- Parameters:
xmlstream
- the stream to parse the response from- Throws:
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.- Returns:
- The beagle score or -1 if it was not defined in the response
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-