Package com.badlogic.gdx.pay
Class Transaction
java.lang.Object
com.badlogic.gdx.pay.Transaction
An transaction for an item purchased via libGDX In-App payment system (IAP).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe item identifier/SKU that matches our item id in the IAP service.The original transaction identifier which is unique for each purchase (doesn't change).intHow much was originally charged in the lowest denomination (or 0 for unknown).The ISO 4217 currency code for price (or null for unknown).The title/info for the purchase (or null for unknown).The original purchase time in milliseconds since the epoch (Jan 1, 1970).The original request identifier which is unique for each request (doesn't change).The title/info for the refund (or null for unknown).The original refund/cancellation time in milliseconds since the epoch (Jan 1, 1970) or null for non-refunded.Returns one of the store names as defined in PurchaseManagerConfig.The original data string from the purchase (or null for unknown).The user identifier which is unique for each request / purchase (doesn't change).booleanReturns true if the order is considered valid, i.e.voidsetIdentifier(String identifier) voidsetOrderId(String orderId) voidsetPurchaseCost(int purchaseCost) voidsetPurchaseCostCurrency(String purchaseCostCurrency) voidsetPurchaseText(String purchaseText) voidsetPurchaseTime(Date purchaseTime) voidsetRequestId(String requestId) voidsetReversalText(String reversalText) voidsetReversalTime(Date reversalTime) voidsetStoreName(String storeName) voidsetTransactionData(String transactionData) voidsetTransactionDataSignature(String transactionDataSignature) A signature for the purchase data string for validation of the data (or null for unknown).voidtoString()
-
Field Details
-
REVERSAL_TEXT_CANCELLED
- See Also:
-
REVERSAL_TEXT_REFUNDED
- See Also:
-
-
Constructor Details
-
Transaction
public Transaction()
-
-
Method Details
-
getIdentifier
The item identifier/SKU that matches our item id in the IAP service. -
setIdentifier
-
getStoreName
Returns one of the store names as defined in PurchaseManagerConfig. -
setStoreName
-
getOrderId
The original transaction identifier which is unique for each purchase (doesn't change). It represents an unique ID for the purchase on the corresponding store. -
setOrderId
-
getRequestId
The original request identifier which is unique for each request (doesn't change). It represents an unique ID for the request on the corresponding store. -
setRequestId
-
getUserId
The user identifier which is unique for each request / purchase (doesn't change). -
setUserId
-
isPurchased
public boolean isPurchased()Returns true if the order is considered valid, i.e. in purchased state (non-refunded/cancelled). -
getPurchaseTime
The original purchase time in milliseconds since the epoch (Jan 1, 1970). -
setPurchaseTime
-
getPurchaseText
The title/info for the purchase (or null for unknown). E.g. "Purchased: 100 Coins". -
setPurchaseText
-
getPurchaseCost
public int getPurchaseCost()How much was originally charged in the lowest denomination (or 0 for unknown). E.g. if the cost was USD 4.99, then this field contains 499.- Returns:
- price in cents, or zero if unknown
-
setPurchaseCost
public void setPurchaseCost(int purchaseCost) -
getPurchaseCostCurrency
The ISO 4217 currency code for price (or null for unknown). For example, if price is specified in British pounds sterling then this field is "GBP". -
setPurchaseCostCurrency
-
getReversalTime
The original refund/cancellation time in milliseconds since the epoch (Jan 1, 1970) or null for non-refunded. -
setReversalTime
-
getReversalText
The title/info for the refund (or null for unknown). E.g. "Refunded" or "Cancelled". -
setReversalText
-
getTransactionData
-
setTransactionData
-
getTransactionDataSignature
The original data string from the purchase (or null for unknown). -
setTransactionDataSignature
A signature for the purchase data string for validation of the data (or null for unknown). -
toString
-