Interface PurchaseCallback
- All Known Subinterfaces:
PendingPurchaseCallback
public interface PurchaseCallback
Callback interface that the main class must implement in order for in-app-purchasing
to work. Once the main class implements this interface the methods within it
are invoked to indicate the various purchase states.
-
Method Summary
Modifier and TypeMethodDescriptionvoiditemPurchased(String sku) Indicates a the given SKU was purchased by a user.voiditemPurchaseError(String sku, String errorMessage) Callback indicating a the given SKU purchase failedvoiditemRefunded(String sku) Invoked if a refund was granted for a purchasevoidpaymentFailed(String paymentCode, String failureReason) Indicates that a manual payment has failedvoidpaymentSucceeded(String paymentCode, double amount, String currency) Indicates that a manual payment has passedvoidInvoked when a subscription SKU is canceledvoidInvoked when a subscription SKU is started
-
Method Details
-
itemPurchased
Indicates a the given SKU was purchased by a user. When purchasing multiple SKU's at once multiple calls to this method will be performed.
Parameters
sku: the sku purchased
-
itemPurchaseError
-
itemRefunded
Invoked if a refund was granted for a purchase
Parameters
sku: the sku purchased
Deprecated
-
subscriptionStarted
Invoked when a subscription SKU is started
Parameters
sku: the sku purchased
Deprecated
-
subscriptionCanceled
Invoked when a subscription SKU is canceled
Parameters
sku: the sku purchased
Deprecated
-
paymentFailed
-
paymentSucceeded
-