decrypt method

Future<DecryptedReceipt> decrypt(
  1. String sdkId,
  2. EncryptedReceipt receipt
)

Implementation

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