Class ReceiptUtility
java.lang.Object
com.apple.itunes.storekit.migration.ReceiptUtility
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionextractTransactionIdFromAppReceipt(String appReceipt) Extracts a transaction id from an encoded App Receipt.extractTransactionIdFromTransactionReceipt(String transactionReceipt) Extracts a transaction id from an encoded transactional receipt. 
- 
Constructor Details
- 
ReceiptUtility
public ReceiptUtility() 
 - 
 - 
Method Details
- 
extractTransactionIdFromAppReceipt
Extracts a transaction id from an encoded App Receipt. Throws if the receipt does not match the expected format. *NO validation* is performed on the receipt, and any data returned should only be used to call the App Store Server API.- Parameters:
 appReceipt- The unmodified app receipt- Returns:
 - A transaction id from the array of in-app purchases, null if the receipt contains no in-app purchases.
 - Throws:
 IOException- If the receipt was malformedIllegalArgumentException- If the receipt could not be parsed or did not match the expected format
 - 
extractTransactionIdFromTransactionReceipt
Extracts a transaction id from an encoded transactional receipt. Throws if the receipt does not match the expected format. *NO validation* is performed on the receipt, and any data returned should only be used to call the App Store Server API.- Parameters:
 transactionReceipt- The unmodified transactionReceipt- Returns:
 - A transaction id, or null if no transactionId is found in the receipt
 - Throws:
 IllegalArgumentException- If the receipt could not be parsed or did not match the expected format
 
 -