getAndDecryptReceiptAttachment method

Future<Uint8List> getAndDecryptReceiptAttachment(
  1. String sdkId,
  2. Receipt receipt,
  3. String attachmentId
)

Implementation

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