Skip to content

Latest commit

 

History

History
115 lines (70 loc) · 2.49 KB

File metadata and controls

115 lines (70 loc) · 2.49 KB

Class: Iaptic

CdvPurchase.Iaptic

Integrate with https://www.iaptic.com/

Example

const iaptic = new CdvPurchase.Iaptic({
  url: 'https://validator.iaptic.com',
  appName: 'test',
  apiKey: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
});
store.validator = iaptic.validator;

Table of contents

Constructors

Properties

Accessors

Constructors

constructor

new Iaptic(config, store?)

Parameters

Name Type
config IapticConfig
store? Store

Properties

config

config: IapticConfig


log

log: Logger

Accessors

appStoreDiscountEligibilityDeterminer

get appStoreDiscountEligibilityDeterminer(): DiscountEligibilityDeterminer

Determine the eligibility of discounts based on the content of the application receipt.

The secret sauce used here is to wait for validation of the application receipt. The receipt validator will return the necessary data to determine eligibility.

Receipt validation is expected to happen after loading product information, so the implementation here is to wait for a validation response.

Returns

DiscountEligibilityDeterminer


braintreeClientTokenProvider

get braintreeClientTokenProvider(): ClientTokenProvider

Provides a client token generated on iaptic's servers

Can be passed to the Braintree Adapter at initialization.

Example

store.initialize([
  {
    platform: Platform.BRAINTREE,
    options: {
      clientTokenProvider: iaptic.braintreeClientTokenProvider
    }
  }
]);

Returns

ClientTokenProvider


validator

get validator(): string

Validator URL

Returns

string