Transaction lookup

When calling YocoSDK.getPaymentResult(), this will query a transaction using the transactionId and will return a PaymentResult with the available transaction details. This could typically be used in the event that the application crashes or is terminated during a transaction. It is useful to look up the state of a previous transaction so you can determine if it was a success or failure.

Usage

Lookup transaction
1import com.yoco.payments.sdk.YocoSDK
2import com.yoco.payments.sdk.data.result.PaymentResult
3
4// Async call
5YocoSDK.getPaymentResult(transactionIdStr) { resultCode: Int, result: PaymentResult? ->
6 // Use result of transaction if available
7}