get

open fun get(fragment: Fragment, paymentMethod: PaymentMethod, checkoutConfiguration: CheckoutConfiguration, callback: ComponentCallbackT, order: Order? = null, key: String? = null): ComponentT

Get a PaymentComponent.

Return

The Component

Parameters

fragment

The Fragment to associate the lifecycle.

paymentMethod

The corresponding PaymentMethod object.

checkoutConfiguration
callback

The callback to handle events from the PaymentComponent.

order

An Order in case of an ongoing partial payment flow.

key

The key to use to identify the PaymentComponent.

NOTE: By default only one PaymentComponent will be created per lifecycle. Use key in case you need to instantiate multiple PaymentComponents in the same lifecycle.


open fun get(activity: ComponentActivity, paymentMethod: PaymentMethod, checkoutConfiguration: CheckoutConfiguration, callback: ComponentCallbackT, order: Order? = null, key: String? = null): ComponentT

Get a PaymentComponent.

Return

The Component

Parameters

activity

The Activity to associate the lifecycle.

paymentMethod

The corresponding PaymentMethod object.

checkoutConfiguration
callback

The callback to handle events from the PaymentComponent.

order

An Order in case of an ongoing partial payment flow.

key

The key to use to identify the PaymentComponent.

NOTE: By default only one PaymentComponent will be created per lifecycle. Use key in case you need to instantiate multiple PaymentComponents in the same lifecycle.


abstract fun get(savedStateRegistryOwner: SavedStateRegistryOwner, viewModelStoreOwner: ViewModelStoreOwner, lifecycleOwner: LifecycleOwner, paymentMethod: PaymentMethod, checkoutConfiguration: CheckoutConfiguration, application: Application, componentCallback: ComponentCallbackT, order: Order?, key: String?): ComponentT

Get a PaymentComponent.

Return

The Component

Parameters

savedStateRegistryOwner

The owner of the SavedStateRegistry, normally an Activity or Fragment.

viewModelStoreOwner

A scope that owns ViewModelStore, normally an Activity or Fragment.

lifecycleOwner

The lifecycle owner, normally an Activity or Fragment.

paymentMethod

The corresponding PaymentMethod object.

checkoutConfiguration
application

Your main application class.

componentCallback

The callback to handle events from the PaymentComponent.

order

An Order in case of an ongoing partial payment flow.

key

The key to use to identify the PaymentComponent.

NOTE: By default only one PaymentComponent will be created per lifecycle. Use key in case you need to instantiate multiple PaymentComponents in the same lifecycle.


open fun get(fragment: Fragment, paymentMethod: PaymentMethod, configuration: ConfigurationT, callback: ComponentCallbackT, order: Order? = null, key: String? = null): ComponentT

Get a PaymentComponent.

Return

The Component

Parameters

fragment

The Fragment to associate the lifecycle.

paymentMethod

The corresponding PaymentMethod object.

configuration

The Configuration of the component.

callback

The callback to handle events from the PaymentComponent.

order

An Order in case of an ongoing partial payment flow.

key

The key to use to identify the PaymentComponent.

NOTE: By default only one PaymentComponent will be created per lifecycle. Use key in case you need to instantiate multiple PaymentComponents in the same lifecycle.


open fun get(activity: ComponentActivity, paymentMethod: PaymentMethod, configuration: ConfigurationT, callback: ComponentCallbackT, order: Order? = null, key: String? = null): ComponentT

Get a PaymentComponent.

Return

The Component

Parameters

activity

The Activity to associate the lifecycle.

paymentMethod

The corresponding PaymentMethod object.

configuration

The Configuration of the component.

callback

The callback to handle events from the PaymentComponent.

order

An Order in case of an ongoing partial payment flow.

key

The key to use to identify the PaymentComponent.

NOTE: By default only one PaymentComponent will be created per lifecycle. Use key in case you need to instantiate multiple PaymentComponents in the same lifecycle.


abstract fun get(savedStateRegistryOwner: SavedStateRegistryOwner, viewModelStoreOwner: ViewModelStoreOwner, lifecycleOwner: LifecycleOwner, paymentMethod: PaymentMethod, configuration: ConfigurationT, application: Application, componentCallback: ComponentCallbackT, order: Order?, key: String?): ComponentT

Get a PaymentComponent.

Return

The Component

Parameters

savedStateRegistryOwner

The owner of the SavedStateRegistry, normally an Activity or Fragment.

viewModelStoreOwner

A scope that owns ViewModelStore, normally an Activity or Fragment.

lifecycleOwner

The lifecycle owner, normally an Activity or Fragment.

paymentMethod

The corresponding PaymentMethod object.

configuration

The Configuration of the component.

application

Your main application class.

componentCallback

The callback to handle events from the PaymentComponent.

order

An Order in case of an ongoing partial payment flow.

key

The key to use to identify the PaymentComponent.

NOTE: By default only one PaymentComponent will be created per lifecycle. Use key in case you need to instantiate multiple PaymentComponents in the same lifecycle.