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.

  • Calculates and returns an amount based on the details provided through the dataSource. You might want to call this method every time you update your dataSource 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:

    1. Session cannot start with the provided details.
    2. 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.