tryDecrypt method
Implementation
Future<Receipt> tryDecrypt(String sdkId, EncryptedReceipt receipt) async {
final res = await _methodChannel.invokeMethod<String>(
'ReceiptApi.tryDecrypt',
{
"sdkId": sdkId,
"receipt": jsonEncode(EncryptedReceipt.encode(receipt)),
}
);
if (res == null) throw AssertionError("received null result from platform method tryDecrypt");
final parsedResJson = jsonDecode(res);
return Receipt.fromJSON(parsedResJson);
}