fix: create plan
All checks were successful
BCards Deployment Pipeline / Run Tests (push) Successful in 2s
BCards Deployment Pipeline / PR Validation (push) Has been skipped
BCards Deployment Pipeline / Build and Push Image (push) Successful in 15m28s
BCards Deployment Pipeline / Deploy to Production (ARM - OCI) (push) Successful in 1m19s
BCards Deployment Pipeline / Deploy to Staging (x86 - Local) (push) Has been skipped
BCards Deployment Pipeline / Cleanup Old Resources (push) Has been skipped
BCards Deployment Pipeline / Deployment Summary (push) Successful in 0s

This commit is contained in:
Ricardo Carneiro 2025-09-07 21:39:36 -03:00
parent 79c254905a
commit 0f6ae71997
2 changed files with 7 additions and 3 deletions

View File

@ -24,7 +24,8 @@
"Bash(dotnet nuget locals:*)", "Bash(dotnet nuget locals:*)",
"Bash(/mnt/c/vscode/vcart.me.novo/clean-build.sh:*)", "Bash(/mnt/c/vscode/vcart.me.novo/clean-build.sh:*)",
"Bash(sed:*)", "Bash(sed:*)",
"Bash(./clean-build.sh:*)" "Bash(./clean-build.sh:*)",
"Bash(git add:*)"
] ]
}, },
"enableAllProjectMcpServers": false "enableAllProjectMcpServers": false

View File

@ -279,11 +279,14 @@ public class StripeWebhookController : ControllerBase
var subscription = await _subscriptionRepository.GetByStripeSubscriptionIdAsync(stripeSubscription.Id); var subscription = await _subscriptionRepository.GetByStripeSubscriptionIdAsync(stripeSubscription.Id);
if (subscription != null) if (subscription != null)
{ {
var service = new SubscriptionItemService();
var subItem = service.Get(stripeSubscription.Items.Data[0].Id);
// Update subscription status to active // Update subscription status to active
subscription.Status = "active"; subscription.Status = "active";
subscription.UpdatedAt = DateTime.UtcNow; subscription.UpdatedAt = DateTime.UtcNow;
subscription.CurrentPeriodStart = stripeSubscription.CurrentPeriodStart; subscription.CurrentPeriodStart = subItem.CurrentPeriodStart;
subscription.CurrentPeriodEnd = stripeSubscription.CurrentPeriodEnd; subscription.CurrentPeriodEnd = subItem.CurrentPeriodEnd;
// Update plan type based on Stripe price ID // Update plan type based on Stripe price ID
var priceId = stripeSubscription.Items.Data.FirstOrDefault()?.Price.Id; var priceId = stripeSubscription.Items.Data.FirstOrDefault()?.Price.Id;