Adapter for a payment or in-app purchase platform

Implements

Constructors

Properties

_receipts: BraintreeReceipt[] = []
id: Platform = Platform.BRAINTREE

Platform identifier

log: Logger
name: string = 'BrainTree'

Nice name for the adapter

products: Product[] = []

List of products managed by the adapter.

ready: boolean = false

true after the platform has been successfully initialized.

The value is set by the "Adapters" class (which is responsible for initializing adapters).

supportsParallelLoading: boolean = false

Set to true if receipts and products can be loaded in parallel

Accessors

  • get isSupported(): boolean
  • Returns true is the adapter is supported on this device.

    Returns boolean

Methods

  • Finish a transaction.

    For non-consumables, this will acknowledge the purchase. For consumable, this will acknowledge and consume the purchase.

    Parameters

    Returns Promise<undefined | IError>

  • Handle a response from a receipt validation process.

    Parameters

    • receipt: CdvPurchase.Receipt

      The receipt being validated.

    • response: Payload

      The response payload from the receipt validation process.

    Returns Promise<void>

    A promise that resolves when the response has been handled.

  • Initialize the Braintree Adapter.

    Returns Promise<undefined | IError>

  • Open the platforms' billing management interface.

    Returns Promise<undefined | IError>

  • Initializes an order.

    Parameters

    Returns Promise<undefined | IError>

  • Replay the queue of transactions.

    Might ask the user to login.

    Returns Promise<undefined | IError>