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 Details

    • itemPurchased

      void itemPurchased(String sku)

      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

      void itemPurchaseError(String sku, String errorMessage)

      Callback indicating a the given SKU purchase failed

      Parameters
      • sku: the id
    • itemRefunded

      void itemRefunded(String sku)

      Invoked if a refund was granted for a purchase

      Parameters
      • sku: the sku purchased
      Deprecated
    • subscriptionStarted

      void subscriptionStarted(String sku)

      Invoked when a subscription SKU is started

      Parameters
      • sku: the sku purchased
      Deprecated
    • subscriptionCanceled

      void subscriptionCanceled(String sku)

      Invoked when a subscription SKU is canceled

      Parameters
      • sku: the sku purchased
      Deprecated
    • paymentFailed

      void paymentFailed(String paymentCode, String failureReason)

      Indicates that a manual payment has failed

      Parameters
      • paymentCode: the transaction id of the payment
    • paymentSucceeded

      void paymentSucceeded(String paymentCode, double amount, String currency)

      Indicates that a manual payment has passed

      Parameters
      • paymentCode: the transaction id of the payment