Interface OculusIapReceiptService
- All Known Implementing Classes:
UserOculusIapReceiptService
public interface OculusIapReceiptService
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionconsumeAndRecordOculusIapReceipt(OculusIapReceipt receiptData) Verifies the given receipt against the Oculus servers.voiddeleteOculusIapReceipt(String originalTransactionId) Deletes an existing receipt.getOculusIapReceipt(String originalTransactionId) Gets the receipt with the id, or throws aNotFoundExceptionif the receipt can't be found.getOculusIapReceipts(int offset, int count) Gets receipts for a given user specifying the offset and the count.getOrCreateOculusIapReceipt(OculusIapReceipt oculusIapReceipt) Finds a receipt in the db, or creates a new one if necessary.getOrCreateRewardIssuances(OculusIapReceipt oculusIapReceipt) Gets or createsRewardIssuancein the db for the givenOculusIapReceipt.verifyAndCreateOculusIapReceiptIfNeeded(OculusIapReceipt receiptData) Verifies the given base64-encoded receiptData string against the Oculus servers in the given environment.
-
Field Details
-
OCULUS_IAP_SCHEME
- See Also:
-
OCULUS_IAP_ROOT_URL
- See Also:
-
OCULUS_IAP_RECEIPT_CREATED
- See Also:
-
-
Method Details
-
getOculusIapReceipts
Gets receipts for a given user specifying the offset and the count.- Parameters:
offset- the offsetcount- the count- Returns:
- a
PaginationofOculusIapReceiptobjects.
-
getOculusIapReceipt
Gets the receipt with the id, or throws aNotFoundExceptionif the receipt can't be found.- Parameters:
originalTransactionId- the original oculus transaction id- Returns:
- the
Receiptthat was requested, never null
-
getOrCreateOculusIapReceipt
Finds a receipt in the db, or creates a new one if necessary.- Returns:
- the
Receiptas it was written into the database - Throws:
InvalidDataException- if the state of the passed in OculusIapReceipt is invalidDuplicateException- if the passed in OculusIapReceipt has a name that already exists
-
deleteOculusIapReceipt
Deletes an existing receipt.- Parameters:
originalTransactionId- the original oculus transaction id
-
verifyAndCreateOculusIapReceiptIfNeeded
OculusIapVerifyReceiptResponse verifyAndCreateOculusIapReceiptIfNeeded(OculusIapReceipt receiptData) Verifies the given base64-encoded receiptData string against the Oculus servers in the given environment.- Parameters:
receiptData-- Returns:
- the
OculusIapReceiptas it was written into the database, or the existing database record
-
consumeAndRecordOculusIapReceipt
Verifies the given receipt against the Oculus servers.- Parameters:
receiptData-- Returns:
- the
OculusIapReceiptas it was written into the database, or the existing database record
-
getOrCreateRewardIssuances
Gets or createsRewardIssuancein the db for the givenOculusIapReceipt.- Parameters:
oculusIapReceipt-- Returns:
- the reward issuances from the product bundle matching the receipt sku
-