Decoding a requestReceipts() response looks like the following
public void onSuccess(String receiptResponse) {
JSONObject response = new JSONObject(receiptResponse);
receipts = helper.decryptReceiptResponse(response, Config.getInstance().publicKey);
for (Receipt r : receipts) {
// Validate the game was purchased
}
}
For offline game play it would be advantageous to save the String 'recieptResponse' in a local file which could be loaded and passed to the decriptReceiptResponse() when network connectivity is unavailable. Together with the public key provided this provides decent protection against pirates modifying the local file. However if the receipts response does not tie the receipts to a particular user or console then simply copying the local file to another ouya console would allow anyone with the file full access to the game without payment.
Does the requestReceipts() response include user specific information and does decriptReceiptResponse() validate the response data is only valid for the currently logged in ouya user or console?
Comments