Skip to content
Baggers edited this page Sep 14, 2016 · 8 revisions

Data Layouts

These are actually just plain old objects with fields, but we give them names here for convenience.

Data - SKPaymentTransactionInfo

An object with the following fields

  • payment
  • transactionState
  • transactionIdentifier
  • transactionDateUTC
  • error

Data - ReceiptTransactionInfo

An object with the following fields

  • quantity
  • productIdentifier
  • transactionIdentifier
  • originalTransactionIdentifier
  • purchaseDate
  • originalPurchaseDate
  • subscriptionExpirationDate
  • cancellationDate
  • webOrderLineItemID

Data - SKProductInformation

An object with the following fields

  • price
  • priceLocale
  • localizedDescription
  • localizedDescription
  • productIdentifier
  • localizedTitle

Data - RequestProductResult

An object with the following fields:

  • valid: an array of SKProductInformation. These are the successfully validated products
  • invalid: an array of strings. These are the ids of the invalid products

Functions

Function - canMakePayments() -> bool

Function - getReceiptTransactions() -> array of ReceiptTransactionInfo objects

Function - requestProducts(productID0, productID1, .. etc) -> RequestProductResult object

Function - addPayment(productID) -> Promise

Function - addPayment(productID, applicationUserName) -> Promise

Function - restoreTransactions() -> Promise<Array>

Function - restoreTransactions(applicationUserName) -> Promise<Array>

Function - refreshReciept() -> Promise

The string will be success on success and can be safely ignored

Clone this wiki locally