Purchase Class
Item Index
Methods
Methods
complete
    
        ()
    
    
    
    
    
        final
    
    
    
    
    
    Marks the purchase as completed. Your application should call this method from the purchaseUpdate event handler after it has successfully processed the purchase and unlocked the functionality purchased by the user.
Alternatively, you can set the
autoCompletePurchases property to true; that will cause the module
to automatically complete the purchase right after the
purchaseUpdate event is sent.
Note that on iOS, you will receive a purchaseUpdate event not only in response to a call to the purchase function, but also as a result of a call to getPurchases function, or if your app starts up with pending purchases.
Properties
applicationPayload
    NSString
    
    
    
        read-only
    
    
    
    An opaque identifier for the user’s account on your system. Only available on iOS7.0 and above.
downloads
    Array of Downloads
    
    
    
        read-only
    
    
    
    An array of Download objects associated with this purchase.
Only valid if the state is PURCHASE_STATE_PURCHASED. The Download objects stored in this property must be used to download the content before the purchase is completed; after that the download objects are no longer usable.
orderNumber
    String
    
    
    
        read-only
    
    
    
    A unique order identifier for the transaction.
originalPurchase
    Purchase
    
    
    
        read-only
    
    
    
    The original purchase associated with this (restored) purchase. Only valid if the state is PURCHASE_STATE_RESTORED.
quantity
    Number
    
    
    
        read-only
    
    
    
    Number of products purchased.
receipt
    TiBlob
    
    
    
        read-only
    
    
    
    Receipt of the purchase. Only valid if the state is PURCHASE_STATE_PURCHASED.
SKU
    String
    
    
    
        read-only
    
    
    
    The item's product identifier.
state
    Number
    
    
    
        read-only
    
    
    
    Purchase state.
time
    Date
    
    
    
        read-only
    
    
    
    Time of purchase.
