Class GatewayResponse
java.lang.Object
org.apache.ofbiz.accounting.thirdparty.eway.GatewayResponse
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
ConstructorDescriptionGatewayResponse
(InputStream xmlstream, GatewayRequest req) Creates the GatewayResponse object by parsing an xml from a stream. -
Method Summary
Modifier and TypeMethodDescriptionGets auth code.double
Gets the beagle score.int
Gets return amount.Gets transaction amount.Gets trxn error.Gets trxn number.Gets trxn option 1.Gets trxn option 2.Gets trxn option 3.Gets trxn reference.boolean
Gets trxn status.toString()
-
Constructor Details
-
GatewayResponse
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:
Exception
- if the xml contains a root element with a bad name or an unknown element, or if the xml is badly formatted
-
-
Method Details
-
getTrxnNumber
Gets trxn number.- Returns:
- the trxn number
-
getTrxnReference
Gets trxn reference.- Returns:
- the trxn reference
-
getTrxnOption1
Gets trxn option 1.- Returns:
- the trxn option 1
-
getTrxnOption2
Gets trxn option 2.- Returns:
- the trxn option 2
-
getTrxnOption3
Gets trxn option 3.- Returns:
- the trxn option 3
-
getAuthCode
Gets auth code.- Returns:
- the auth code
-
getTrxnError
Gets trxn error.- Returns:
- the trxn error
-
getReturnAmount
public int getReturnAmount()Gets return amount.- Returns:
- the return amount
-
getTransactionAmount
Gets transaction amount.- Returns:
- the transaction amount
-
getTrxnStatus
public boolean getTrxnStatus()Gets trxn status.- Returns:
- the trxn status
-
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
-