This method allows you get an instance of KlarnaComponent to manage payments for Klarna.

SWIFT
public func provideKlarnaComponent(with intent: PrimerSessionIntent) throws -> (any KlarnaComponent)? { }

Parameters

Returns

An instance of KlarnaComponent.

Example

SWIFT
do {
 manager = PrimerHeadlessUniversalCheckout.KlarnaManager()
 klarnaComponent = try manager.provideKlarnaComponent(with: sessionIntent)
} catch {
 // Catch errors here
}