1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

save userId with receipt data

This commit is contained in:
Kyle Spearrin 2019-09-19 09:36:26 -04:00
parent 43f26925d1
commit 62f4e67e8a
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ namespace Bit.Core.Services
public interface IAppleIapService
{
Task<AppleReceiptStatus> GetVerifiedReceiptStatusAsync(string receiptData);
Task SaveReceiptAsync(AppleReceiptStatus receiptStatus);
Task SaveReceiptAsync(AppleReceiptStatus receiptStatus, Guid userId);
Task<Tuple<string, Guid?>> GetReceiptAsync(string originalTransactionId);
}
}

View File

@ -54,7 +54,7 @@ namespace Bit.Core.Services
return null;
}
public async Task SaveReceiptAsync(AppleReceiptStatus receiptStatus)
public async Task SaveReceiptAsync(AppleReceiptStatus receiptStatus, Guid userId)
{
var originalTransactionId = receiptStatus.GetOriginalTransactionId();
if(string.IsNullOrWhiteSpace(originalTransactionId))
@ -65,7 +65,7 @@ namespace Bit.Core.Services
new Dictionary<string, string>
{
["Data"] = receiptStatus.GetReceiptData(),
["UserId"] = receiptStatus.GetReceiptData()
["UserId"] = userId.ToString()
});
}