diff --git a/src/Billing/Controllers/PayPalController.cs b/src/Billing/Controllers/PayPalController.cs index a1300e61c6..96f5052cee 100644 --- a/src/Billing/Controllers/PayPalController.cs +++ b/src/Billing/Controllers/PayPalController.cs @@ -79,7 +79,7 @@ public class PayPalController : Controller return Ok(); } - var entityId = transactionModel.UserId ?? transactionModel.OrganizationId; + var entityId = transactionModel.UserId ?? transactionModel.OrganizationId ?? transactionModel.ProviderId; if (!entityId.HasValue) { @@ -152,6 +152,7 @@ public class PayPalController : Controller CreationDate = transactionModel.PaymentDate, OrganizationId = transactionModel.OrganizationId, UserId = transactionModel.UserId, + ProviderId = transactionModel.ProviderId, Type = transactionModel.IsAccountCredit ? TransactionType.Credit : TransactionType.Charge, Gateway = GatewayType.PayPal, GatewayId = transactionModel.TransactionId, @@ -217,6 +218,7 @@ public class PayPalController : Controller CreationDate = transactionModel.PaymentDate, OrganizationId = transactionModel.OrganizationId, UserId = transactionModel.UserId, + ProviderId = transactionModel.ProviderId, Type = TransactionType.Refund, Gateway = GatewayType.PayPal, GatewayId = transactionModel.TransactionId,