TransactionStatusResult
The result of a com.adyen.ipp.api.InPersonPayments.getTransactionStatus call.
data always contains a NEXO TransactionStatusResponse JSON string, regardless of whether the call succeeded or failed. success indicates the outcome and determines how data should be interpreted.
Success semantics:
success == true: the terminal record was found and the NEXO response contains a validRepeatedMessageResponsewith the original payment or reversal body.success == false: the lookup failed. Possible causes include:A transaction is currently in progress (NEXO error condition:
UnavailableService).No matching record was found for the given
ServiceID(NEXO error condition:NotFound).The stored record is unreadable due to encryption or serialization failure (
UnexpectedData).An internal storage error occurred (
ResourceNotAvailable). In all failure cases data still contains a well-formed NEXO error response with aResponse.ResultofFailureand a populatedErrorCondition.
Thread safety: Instances are immutable after creation and may be read from any thread.
Example usage:
val result: TransactionStatusResult = InPersonPayments.getTransactionStatus(request).getOrThrow()
if (result.success) {
val nexoJson = result.data // full NEXO TransactionStatusResponse JSON
} else {
val errorJson = result.data // NEXO error response with ErrorCondition
}