From ad8cc06fd6f2a0e95ad695d9902bb95743a4d945 Mon Sep 17 00:00:00 2001 From: Ricardo Carneiro Date: Tue, 9 Sep 2025 16:12:38 -0300 Subject: [PATCH] fix: aumentar logs para obter mais dados --- src/BCards.Web/Controllers/StripeWebhookController.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/BCards.Web/Controllers/StripeWebhookController.cs b/src/BCards.Web/Controllers/StripeWebhookController.cs index 5bf0563..5d0253a 100644 --- a/src/BCards.Web/Controllers/StripeWebhookController.cs +++ b/src/BCards.Web/Controllers/StripeWebhookController.cs @@ -425,6 +425,8 @@ public class StripeWebhookController : ControllerBase var priceId = stripeSubscription.Items.Data.FirstOrDefault()?.Price.Id; var planType = !string.IsNullOrEmpty(priceId) ? MapPriceIdToPlanType(priceId) : "Trial"; + _logger.LogInformation($"[TID: {traceId}] - PriceId: {priceId}, PlanType: {planType}, User: {user.Id}"); + // Create new subscription in our database var newSubscription = new Models.Subscription { @@ -440,6 +442,7 @@ public class StripeWebhookController : ControllerBase UpdatedAt = DateTime.UtcNow }; + _logger.LogInformation($"[TID: {traceId}] - try to save into database (subscription) - User: {user.Id}"); await _subscriptionRepository.CreateAsync(newSubscription); _logger.LogInformation($"[TID: {traceId}] - Created new subscription {newSubscription.Id} for user {user.Id}");