IosPaymentHost

iOS realization of PaymentHost, the peer of AndroidPaymentHost.

Android's problem is that gateway SDKs are Activity-and-callback shaped; iOS's problem is different and nastier, so this interface is not a mirror-image of the Android one. It carries the two things an iOS gateway cannot get for itself: something to present a sheet from, and somewhere for a delegate to live while that sheet is up.

Functions

Link copied to clipboard
abstract fun presentationViewController(): UIViewController

The view controller a provider presents its sheet from.

Link copied to clipboard
abstract fun retainForPayment(delegate: Any): () -> Unit

Keep delegate alive for the duration of one payment; the returned lambda releases it.