public class Purchase extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Purchase.PurchasesResult
Result list and code for queryPurchases method
|
static interface |
Purchase.PurchaseState
Possible purchase states.
|
| Constructor and Description |
|---|
Purchase(String jsonPurchaseInfo,
String signature) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getDeveloperPayload()
Returns the payload specified when the purchase was acknowledged or consumed.
|
String |
getOrderId()
Returns an unique order identifier for the transaction.
|
String |
getOriginalJson()
Returns a String in JSON format that contains details about the purchase order.
|
String |
getPackageName()
Returns the application package from which the purchase originated.
|
int |
getPurchaseState()
Returns the state of purchase.
|
long |
getPurchaseTime()
Returns the time the product was purchased, in milliseconds since the epoch (Jan 1, 1970).
|
String |
getPurchaseToken()
Returns a token that uniquely identifies a purchase for a given item and user pair.
|
String |
getSignature()
Returns String containing the signature of the purchase data that was signed with the private
key of the developer.
|
String |
getSku()
Returns the product Id.
|
int |
hashCode() |
boolean |
isAcknowledged()
Indicates whether the purchase has been acknowledged.
|
boolean |
isAutoRenewing()
Indicates whether the subscription renews automatically.
|
String |
toString() |
public Purchase(String jsonPurchaseInfo, String signature) throws JSONException
JSONExceptionpublic String getOrderId()
public String getPackageName()
public String getSku()
public long getPurchaseTime()
public String getPurchaseToken()
public int getPurchaseState()
@Nullable public String getDeveloperPayload()
public boolean isAcknowledged()
public boolean isAutoRenewing()
public String getOriginalJson()
public String getSignature()