Show payment result

The YocoSDK.showPaymentResult() is an optional API flow that will show the user a success or error screen.

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 will start. Once completed, the payment flow will continue.

Showing a payment result
1import YocoSDK
2
3// Required:
4let paymentResult: PaymentResult = <Result from Yoco.getPaymentResult()>
5
6// Optional: Params containing additional for advanced functionality
7let params = PaymentParameters()
8
9// Initiating showing the Payment Result
10YocoSDK.showPaymentResult(
11 paymentResult,
12 paymentParameters: params,
13 rootViewController: rootViewController,
14) { paymentResult in
15
16}