Exemple #1
0
        public async Task SaveReceiptAsync(AppleReceiptStatus receiptStatus, Guid userId)
        {
            var originalTransactionId = receiptStatus.GetOriginalTransactionId();

            if (string.IsNullOrWhiteSpace(originalTransactionId))
            {
                throw new Exception("OriginalTransactionId is null");
            }
            await _metaDataRespository.UpsertAsync("AppleReceipt", originalTransactionId,
                                                   new Dictionary <string, string>
            {
                ["Data"]   = receiptStatus.GetReceiptData(),
                ["UserId"] = userId.ToString()
            });
        }