Interface GooglePlayIapReceiptService
- All Known Implementing Classes:
UserGooglePlayIapReceiptService
public interface GooglePlayIapReceiptService
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteGooglePlayIapReceipt(String orderId) Deletes an existing receipt.getGooglePlayIapReceipt(String orderId) Gets the receipt with the id, or throws aNotFoundExceptionif the receipt can't be found.getGooglePlayIapReceipts(User user, int offset, int count) Gets receipts for a given user specifying the offset and the count.getOrCreateGooglePlayIapReceipt(GooglePlayIapReceipt googlePlayIapReceipt) Finds a receipt in the db, or creates a new one if necessary.getOrCreateRewardIssuances(GooglePlayIapReceipt googlePlayIapReceipt) Gets or creates a list ofRewardIssuances in the db for the givenGooglePlayIapReceipt.verifyAndCreateGooglePlayIapReceiptIfNeeded(String packageName, String productId, String purchaseToken) Verifies the given purchase data against the Google Play purchase validation services.
-
Method Details
-
getGooglePlayIapReceipts
Gets receipts for a given user specifying the offset and the count.- Parameters:
user- the useroffset- the offsetcount- the count- Returns:
- a
PaginationofGooglePlayIapReceiptobjects.
-
getGooglePlayIapReceipt
Gets the receipt with the id, or throws aNotFoundExceptionif the receipt can't be found.- Parameters:
orderId- the original apple transaction id- Returns:
- the
GooglePlayIapReceiptthat was requested, never null
-
getOrCreateGooglePlayIapReceipt
Finds a receipt in the db, or creates a new one if necessary.- Returns:
- the
GooglePlayIapReceiptas it was written into the database - Throws:
InvalidDataException- if the state of the passed in receipt is invalidDuplicateException- if the passed in receipt has a name that already exists
-
deleteGooglePlayIapReceipt
Deletes an existing receipt.- Parameters:
orderId- the original order id from Google Play
-
verifyAndCreateGooglePlayIapReceiptIfNeeded
GooglePlayIapReceipt verifyAndCreateGooglePlayIapReceiptIfNeeded(String packageName, String productId, String purchaseToken) Verifies the given purchase data against the Google Play purchase validation services.- Parameters:
packageName- the package name of the application, e.g. `com.namazustudios.example_app`.productId- the product id purchased by the user, e.g. `com.namazustudios.example_app.pack_10_coins`.purchaseToken- the token issued to the user upon successful Google Play purchase transaction.- Returns:
- the
GooglePlayIapReceiptas it was written into the database, or the existing database record.
-
getOrCreateRewardIssuances
Gets or creates a list ofRewardIssuances in the db for the givenGooglePlayIapReceipt.- Parameters:
googlePlayIapReceipt-- Returns:
-