registerForPaymentResult

@JvmStatic
@JvmName(name = "registerForPaymentResult")
fun registerForPaymentResult(caller: ActivityResultCaller, callback: PaymentCallback): ActivityResultLauncher<Intent>

Registers a callback for the result of a payment transaction using the Android Activity Result API.

This method must be called during the initialization phase of your androidx.activity.ComponentActivity or androidx.fragment.app.Fragment. The returned ActivityResultLauncher should be used when calling performTransaction.

Return

An ActivityResultLauncher to be used with performTransaction.

Parameters

caller

The ActivityResultCaller (e.g., your Activity or Fragment) that will receive the result.

callback

The callback that will be invoked with the PaymentResult once the transaction is finished.

See also