Shared interface implemented by both the SK1 and SK2 bridges. The adapter programs against this interface, not a concrete class.

Implements

Constructors

Properties

appStoreReceipt: null | ApplicationReceipt = null

Cached app store receipt

isSK2: true = true

Whether this bridge uses StoreKit 2

transactionsForProduct: {
    [productId: string]: string[];
} = {}

Transaction IDs grouped by product

Type declaration

  • [productId: string]: string[]

Methods

  • Parameters

    • success: (() => void)
        • (): void
        • Returns void

    • error: ((message) => void)
        • (message): void
        • Parameters

          • message: string

          Returns void

    Returns void

  • Parameters

    • transactionId: string
    • success: (() => void)
        • (): void
        • Returns void

    • error: ((msg) => void)
        • (msg): void
        • Parameters

          • msg: string

          Returns void

    Returns void

  • Retrieve the storefront country code from StoreKit

    Returns Promise<undefined | string>

  • Parameters

    • options: Partial<BridgeOptions>
    • success: (() => void)
        • (): void
        • Returns void

    • error: ((code, message) => void)

    Returns void

  • Parameters

    • productIds: string[]
    • success: ((validProducts, invalidProductIds) => void)
        • (validProducts, invalidProductIds): void
        • Parameters

          Returns void

    • error: ((code, message) => void)

    Returns void

  • Parameters

    • productId: string
    • quantity: number
    • applicationUsername: undefined | string
    • discount: undefined | PaymentDiscount
    • success: (() => void)
        • (): void
        • Returns void

    • error: (() => void)
        • (): void
        • Returns void

    Returns void

  • Check if the Capacitor purchase plugin is available

    Returns boolean