1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-06 05:28:15 -05:00

Include the ProviderId to transaction object (#4116)

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
This commit is contained in:
cyprain-okeke 2024-05-23 16:23:14 +01:00 committed by GitHub
parent 06910175e2
commit cb9ec27228
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -79,7 +79,7 @@ public class PayPalController : Controller
return Ok(); return Ok();
} }
var entityId = transactionModel.UserId ?? transactionModel.OrganizationId; var entityId = transactionModel.UserId ?? transactionModel.OrganizationId ?? transactionModel.ProviderId;
if (!entityId.HasValue) if (!entityId.HasValue)
{ {
@ -152,6 +152,7 @@ public class PayPalController : Controller
CreationDate = transactionModel.PaymentDate, CreationDate = transactionModel.PaymentDate,
OrganizationId = transactionModel.OrganizationId, OrganizationId = transactionModel.OrganizationId,
UserId = transactionModel.UserId, UserId = transactionModel.UserId,
ProviderId = transactionModel.ProviderId,
Type = transactionModel.IsAccountCredit ? TransactionType.Credit : TransactionType.Charge, Type = transactionModel.IsAccountCredit ? TransactionType.Credit : TransactionType.Charge,
Gateway = GatewayType.PayPal, Gateway = GatewayType.PayPal,
GatewayId = transactionModel.TransactionId, GatewayId = transactionModel.TransactionId,
@ -217,6 +218,7 @@ public class PayPalController : Controller
CreationDate = transactionModel.PaymentDate, CreationDate = transactionModel.PaymentDate,
OrganizationId = transactionModel.OrganizationId, OrganizationId = transactionModel.OrganizationId,
UserId = transactionModel.UserId, UserId = transactionModel.UserId,
ProviderId = transactionModel.ProviderId,
Type = TransactionType.Refund, Type = TransactionType.Refund,
Gateway = GatewayType.PayPal, Gateway = GatewayType.PayPal,
GatewayId = transactionModel.TransactionId, GatewayId = transactionModel.TransactionId,