Session
@objcMembers
public final class Session : NSObject, SessionProtocol
SDK session class. Use this class if you don’t want to place Pay Button and make it do everything for you.
-
Session data source.
Declaration
Swift
public weak var dataSource: SessionDataSource?
-
Session delegate.
Declaration
Swift
public weak var delegate: SessionDelegate?
-
Session appearance.
Declaration
Swift
public weak var appearance: SessionAppearance?
-
Defines if session can start using the provided details through the
dataSource
.Declaration
Swift
public var canStart: Bool { get }
-
Calculates and returns an amount based on the details provided through the
dataSource
. You might want to call this method every time you update yourdataSource
to reflect changes in UI if you are not using PayButton provided by the SDK.Declaration
Swift
public func calculateDisplayedAmount() -> NSDecimalNumber?
Return Value
Amount suggested to display to the customer or
nil
in the following cases:- Session cannot start with the provided details.
- You are in card saving mode.
-
Initiates the session.
Declaration
Swift
@discardableResult public func start() -> Bool
Return Value
Returns boolean value which determines whether all conditions are met to start the sesssion.