Show payment result
The YocoSDK.showPaymentResult() is an optional API flow that shows the user a success or error
screen.
When calling the YocoSDK.showPaymentResult() method without passing in a ActivityResultLauncher
callback, but rather handling the PaymentResult in the onActivityResult call instead, the
PaymentResult is assigned the PaymentResultInfo.RequestCode.LAST_TRANSACTION_RESULT_REQUEST value.
Usage
Before calling the YocoSDK.showPaymentResult() method, retrieve the PaymentResult by calling the
YocoSDK.getPaymentResult() method. Pass the PaymentResult as parameter to
YocoSDK.showPaymentResult() to show the user a success or error screen based on the state of the
transaction.
If no users are authenticated, the login flow starts. Once completed, the payment flow continues.
Handling the result
When calling the YocoSDK.showPaymentResult() method without a ActivityResultLauncher callback,
when handling the PaymentResult in the onActivityResult call, the RequestCode is assigned the
PaymentResultInfo.RequestCode.REFUND_REQUEST value.
To handle the result using the ActivityResultLauncher contract, see
how to handle the result.