From 03e65f6d1dcc5af91987758ed17dded0489e713a Mon Sep 17 00:00:00 2001 From: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com> Date: Mon, 8 Apr 2024 09:40:43 -0400 Subject: [PATCH] [AC-2416] Resolved Stripe refunds not creating a transaction (#3962) * Resolved NullReferenceException when refunding a charge * Downgraded log message for PayPal to warning --- src/Billing/Controllers/PayPalController.cs | 2 +- src/Billing/Controllers/StripeController.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Billing/Controllers/PayPalController.cs b/src/Billing/Controllers/PayPalController.cs index cd52e017ff..a1300e61c6 100644 --- a/src/Billing/Controllers/PayPalController.cs +++ b/src/Billing/Controllers/PayPalController.cs @@ -75,7 +75,7 @@ public class PayPalController : Controller if (string.IsNullOrEmpty(transactionModel.TransactionId)) { - _logger.LogError("PayPal IPN: Transaction ID is missing"); + _logger.LogWarning("PayPal IPN: Transaction ID is missing"); return Ok(); } diff --git a/src/Billing/Controllers/StripeController.cs b/src/Billing/Controllers/StripeController.cs index 679dea15ce..7fc5189e5d 100644 --- a/src/Billing/Controllers/StripeController.cs +++ b/src/Billing/Controllers/StripeController.cs @@ -453,7 +453,7 @@ public class StripeController : Controller } else if (parsedEvent.Type.Equals(HandledStripeWebhook.ChargeRefunded)) { - var charge = await _stripeEventService.GetCharge(parsedEvent); + var charge = await _stripeEventService.GetCharge(parsedEvent, true, ["refunds"]); var chargeTransaction = await _transactionRepository.GetByGatewayIdAsync( GatewayType.Stripe, charge.Id); if (chargeTransaction == null)