HostedCheckoutRelay

Bridges HostedWebViewGateway.pay (a suspending call with no UI of its own) to the Compose WebView screen that actually renders the checkout and detects the return-URL. One relay instance is shared (Koin single) across every hosted-webview config, keyed by GatewayId rather than single-slot like a per-gateway relay — many configs share this one module.

Flow: HostedWebViewGateway.pay registers a listener and calls launch; whichever composable is observing requests renders the checkout for that gateway and calls reportResult once matchReturn fires; pay resumes with the mapped com.siddharth.kmp.paymentsapi.PaymentResult.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun clear(gatewayId: GatewayId)
Link copied to clipboard
fun launch(gatewayId: GatewayId, checkoutUrl: String)
Link copied to clipboard
fun register(gatewayId: GatewayId, onResult: (HostedReturnOutcome) -> Unit)
Link copied to clipboard
fun reportResult(gatewayId: GatewayId, outcome: HostedReturnOutcome)

Called by the checkout screen once matchReturn detects a terminal redirect.