public void OnSuccess(global::Java.Lang.Object result) { var str = result.JavaCast<Java.Lang.String>().ToString(); using (var helper = new OuyaEncryptionHelper()) { var response = new JSONObject(str); var id = helper.DecryptPurchaseResponse(response, _publicKey); if (id != _uniquePurchaseId) OnFailure(OuyaErrorCodes.ThrowDuringOnSuccess, "Received purchase ID does not match what we expected to receive", Bundle.Empty); _tcs.SetResult(true); } }
static IList <Receipt> ReceiptsFromResponse(string receiptsResponse, IPublicKey publicKey) { IList <Receipt> receipts = null; using (var helper = new OuyaEncryptionHelper()) { using (var response = new JSONObject(receiptsResponse)) { OuyaFacade.Log("Decrypting receipts response"); receipts = helper.DecryptReceiptResponse(response, publicKey); } } return(receipts); }
public void OnSuccess(global::Java.Lang.Object result) { var str = result.JavaCast <Java.Lang.String>().ToString(); using (var helper = new OuyaEncryptionHelper()) { var response = new JSONObject(str); var id = helper.DecryptPurchaseResponse(response, _publicKey); if (id != _uniquePurchaseId) { OnFailure(OuyaErrorCodes.ThrowDuringOnSuccess, "Received purchase ID does not match what we expected to receive", Bundle.Empty); } _tcs.SetResult(true); } }
IList<Receipt> ReceiptsFromResponse(string receiptsResponse) { IList<Receipt> receipts = null; using (var helper = new OuyaEncryptionHelper()) { using (var response = new JSONObject(receiptsResponse)) { OuyaFacade.Log("Decrypting receipts response"); receipts = helper.DecryptReceiptResponse(response, _publicKey); } } return receipts; }