Packagecom.myflashlab.air.extensions.billing
Classpublic class Purchase
InheritancePurchase Inheritance Object

The Purchase class holds information about payments. Each time a payment is made in your app, an instance of this class will be initialized while holding information about the successful payment transaction.

Besides that, when you call Billing.getPurchases() the current purchased items by the user will be returned in an Array holding objects of this class type. But you should take into the consideration that the property billingType is never saved in the local cache or Google's/Apple's servers so they are not accessible through the restoring process.

See also

Billing.getPurchases()


Public Properties
 PropertyDefined By
  autoRenewing : Boolean
[read-only] (Android)
Purchase
  billingType : int
[read-only] After a successful payment operation, this value will be one of the following types, BillingType.PERMANENT, BillingType.CONSUMABLE or BillingType.AUTO_RENEWAL. NOTICE: This property value is NOT saved in the cache.
Purchase
  developerPayload : String
[read-only]
Purchase
  isAcknowledged : Boolean
[read-only] (Android) Indicates whether the purchase has been acknowledged.
Purchase
  orderId : String
[read-only] order id is a unique string which identifies the order.
Purchase
  originalOrderId : String
[read-only] (iOS)
Purchase
  productId : String
[read-only] A string used to identify a product that can be purchased from within your application.
Purchase
  purchaseState : int
[read-only] The purchase state of the order.
Purchase
  purchaseTime : Number
[read-only] The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970).
Purchase
  purchaseToken : String
[read-only] Transaction identifier or purchase token is a unique string which identifies a successful payment transaction.
Purchase
  rawData : String
[read-only] Indicates the original data returned with a purchase result.
Purchase
  signature : String
[read-only] (Android) Purchase signature returned with a successful purchase.
Purchase
Property Detail
autoRenewingproperty
autoRenewing:Boolean  [read-only]

(Android)


Implementation
    public function get autoRenewing():Boolean
billingTypeproperty 
billingType:int  [read-only]

After a successful payment operation, this value will be one of the following types, BillingType.PERMANENT, BillingType.CONSUMABLE or BillingType.AUTO_RENEWAL.

NOTICE: This property value is NOT saved in the cache. Meaning that when you restore your products or call Billing.getPurchases() you will always receive -1 for this value. you can use this value ONLY when the purchase result is returned as a successful operation.


Implementation
    public function get billingType():int

See also

developerPayloadproperty 
developerPayload:String  [read-only]


Implementation
    public function get developerPayload():String
isAcknowledgedproperty 
isAcknowledged:Boolean  [read-only]

(Android) Indicates whether the purchase has been acknowledged.


Implementation
    public function get isAcknowledged():Boolean
orderIdproperty 
orderId:String  [read-only]

order id is a unique string which identifies the order. on iOS platform, this value is equal to purchaseToken


Implementation
    public function get orderId():String

See also

originalOrderIdproperty 
originalOrderId:String  [read-only]

(iOS)


Implementation
    public function get originalOrderId():String
productIdproperty 
productId:String  [read-only]

A string used to identify a product that can be purchased from within your application.


Implementation
    public function get productId():String
purchaseStateproperty 
purchaseState:int  [read-only]

The purchase state of the order. On Android, possible values are 0 (purchased), 1 (canceled), or 2 (refunded) but on iOS it will always be 0 (purchased)


Implementation
    public function get purchaseState():int
purchaseTimeproperty 
purchaseTime:Number  [read-only]

The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970).


Implementation
    public function get purchaseTime():Number
purchaseTokenproperty 
purchaseToken:String  [read-only]

Transaction identifier or purchase token is a unique string which identifies a successful payment transaction. you may wish to save this value for your later references. For example when forceConsuming a product on Android, you need to pass this Token to the forceConsume method.


Implementation
    public function get purchaseToken():String
rawDataproperty 
rawData:String  [read-only]

Indicates the original data returned with a purchase result.


Implementation
    public function get rawData():String
signatureproperty 
signature:String  [read-only]

(Android) Purchase signature returned with a successful purchase.


Implementation
    public function get signature():String