mirror of
https://github.com/bitwarden/server
synced 2026-01-04 09:33:40 +00:00
[AC-2378] Added ProviderId to PayPal transaction model (#3995)
* Added ProviderId to PayPal transaction model * Fixed issue with parsing provider id
This commit is contained in:
@@ -17,6 +17,7 @@ public class PayPalIPNTransactionModel
|
||||
public DateTime PaymentDate { get; }
|
||||
public Guid? UserId { get; }
|
||||
public Guid? OrganizationId { get; }
|
||||
public Guid? ProviderId { get; }
|
||||
public bool IsAccountCredit { get; }
|
||||
|
||||
public PayPalIPNTransactionModel(string formData)
|
||||
@@ -72,6 +73,12 @@ public class PayPalIPNTransactionModel
|
||||
OrganizationId = organizationId;
|
||||
}
|
||||
|
||||
if (metadata.TryGetValue("provider_id", out var providerIdStr) &&
|
||||
Guid.TryParse(providerIdStr, out var providerId))
|
||||
{
|
||||
ProviderId = providerId;
|
||||
}
|
||||
|
||||
IsAccountCredit = custom.Contains("account_credit:1");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user