get

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

Get a PaymentComponent with a stored payment method.

Return

The Component

Parameters

fragment

The Fragment to associate the lifecycle.

storedPaymentMethod

The corresponding StoredPaymentMethod 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, storedPaymentMethod: StoredPaymentMethod, checkoutConfiguration: CheckoutConfiguration, callback: ComponentCallbackT, order: Order? = null, key: String? = null): ComponentT

Get a PaymentComponent with a stored payment method.

Return

The Component

Parameters

activity

The Activity to associate the lifecycle.

storedPaymentMethod

The corresponding StoredPaymentMethod 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, storedPaymentMethod: StoredPaymentMethod, checkoutConfiguration: CheckoutConfiguration, application: Application, componentCallback: ComponentCallbackT, order: Order?, key: String?): ComponentT

Get a PaymentComponent with a stored payment method.

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.

storedPaymentMethod

The corresponding StoredPaymentMethod 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, storedPaymentMethod: StoredPaymentMethod, configuration: ConfigurationT, callback: ComponentCallbackT, order: Order? = null, key: String? = null): ComponentT

Get a PaymentComponent with a stored payment method.

Return

The Component

Parameters

fragment

The Fragment to associate the lifecycle.

storedPaymentMethod

The corresponding StoredPaymentMethod 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, storedPaymentMethod: StoredPaymentMethod, configuration: ConfigurationT, callback: ComponentCallbackT, order: Order? = null, key: String? = null): ComponentT

Get a PaymentComponent with a stored payment method.

Return

The Component

Parameters

activity

The Activity to associate the lifecycle.

storedPaymentMethod

The corresponding StoredPaymentMethod 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, storedPaymentMethod: StoredPaymentMethod, configuration: ConfigurationT, application: Application, componentCallback: ComponentCallbackT, order: Order?, key: String?): ComponentT

Get a PaymentComponent with a stored payment method.

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.

storedPaymentMethod

The corresponding StoredPaymentMethod 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.