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 app crashes or is terminated during a transaction, it is useful to know what happend to the transaction that was in progress. To look up the state of a previous transaction.
transactionId: String- The ID of the transaction you want to get the result for.
completionHandler: ((resultCode: Int, paymentResult: PaymentResult?) -> Unit)- The callback function to be notified of when it has been fetched.
Before calling the SDK
showPaymentResult() method, you will first need to retrieve the
PaymentResult from the SDK
getPaymentResult(), which can then be passed as a parameter to show the user a success or error screen based on that transaction.
This will allow you to get the
PaymentResult of the transaction so you can determine if it was a success or failure.