diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 3dd86bd..07eaca9 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -16,7 +16,8 @@ "Bash(pkill:*)", "Bash(sudo rm:*)", "Bash(rm:*)", - "Bash(curl:*)" + "Bash(curl:*)", + "Bash(docker-compose up:*)" ] }, "enableAllProjectMcpServers": false diff --git a/src/BCards.Web/BCards.Web.csproj b/src/BCards.Web/BCards.Web.csproj index 65fd4a4..2f2983d 100644 --- a/src/BCards.Web/BCards.Web.csproj +++ b/src/BCards.Web/BCards.Web.csproj @@ -1,4 +1,4 @@ - + net8.0 @@ -24,8 +24,4 @@ - - - - \ No newline at end of file diff --git a/src/BCards.Web/Controllers/PaymentController.cs b/src/BCards.Web/Controllers/PaymentController.cs index ee25573..86b2066 100644 --- a/src/BCards.Web/Controllers/PaymentController.cs +++ b/src/BCards.Web/Controllers/PaymentController.cs @@ -16,11 +16,6 @@ public class PaymentController : Controller _authService = authService; } - public IActionResult Plans() - { - return View(); - } - [HttpPost] public async Task CreateCheckoutSession(string planType) { @@ -44,7 +39,7 @@ public class PaymentController : Controller catch (Exception ex) { TempData["Error"] = $"Erro ao processar pagamento: {ex.Message}"; - return RedirectToAction("Plans"); + return RedirectToAction("Pricing", "Home"); } } @@ -57,7 +52,7 @@ public class PaymentController : Controller public IActionResult Cancel() { TempData["Info"] = "Pagamento cancelado. Você pode tentar novamente quando quiser."; - return RedirectToAction("Plans"); + return RedirectToAction("Pricing", "Home"); } [HttpPost] diff --git a/src/BCards.Web/StartStripeCLI.bat b/src/BCards.Web/StartStripeCLI.bat new file mode 100644 index 0000000..2878f06 --- /dev/null +++ b/src/BCards.Web/StartStripeCLI.bat @@ -0,0 +1 @@ + stripe listen --forward-to localhost:49178/webhook/stripe diff --git a/src/BCards.Web/Views/Admin/Dashboard.cshtml b/src/BCards.Web/Views/Admin/Dashboard.cshtml index 1b2b3a8..87ba256 100644 --- a/src/BCards.Web/Views/Admin/Dashboard.cshtml +++ b/src/BCards.Web/Views/Admin/Dashboard.cshtml @@ -301,4 +301,4 @@ -} \ No newline at end of file +} diff --git a/src/BCards.Web/Views/Home/Index.cshtml b/src/BCards.Web/Views/Home/Index.cshtml index 984a901..14d59fd 100644 --- a/src/BCards.Web/Views/Home/Index.cshtml +++ b/src/BCards.Web/Views/Home/Index.cshtml @@ -26,6 +26,9 @@ } else { + + Entrar + Começar Grátis diff --git a/src/BCards.Web/Views/Home/Pricing.cshtml b/src/BCards.Web/Views/Home/Pricing.cshtml index 52dc87a..4f7c15f 100644 --- a/src/BCards.Web/Views/Home/Pricing.cshtml +++ b/src/BCards.Web/Views/Home/Pricing.cshtml @@ -100,7 +100,7 @@ @if (User.Identity?.IsAuthenticated == true) {
- +
} @@ -154,7 +154,7 @@ @if (User.Identity?.IsAuthenticated == true) {
- +
} @@ -212,7 +212,7 @@ @if (User.Identity?.IsAuthenticated == true) {
- +
} @@ -342,4 +342,52 @@ - \ No newline at end of file + + +@if (TempData["Success"] != null) +{ +
+ +
+} + +@if (TempData["Error"] != null) +{ +
+ +
+} + +@if (TempData["Info"] != null) +{ +
+ +
+} \ No newline at end of file diff --git a/src/BCards.Web/appsettings.json b/src/BCards.Web/appsettings.json index 24800b4..6c3c390 100644 --- a/src/BCards.Web/appsettings.json +++ b/src/BCards.Web/appsettings.json @@ -11,14 +11,14 @@ "DatabaseName": "BCardsDB" }, "Stripe": { - "PublishableKey": "pk_test_your_publishable_key_here", - "SecretKey": "sk_test_your_secret_key_here", - "WebhookSecret": "whsec_your_webhook_secret_here" + "PublishableKey": "pk_test_51RjUmIBMIadsOxJVP4bWc54pHEOSf5km1hpOkOBSoGVoKxI46N4KSWtevpXCSq68OjFazBuXmPJGBwZ1KDN5MNJy003lj1YmAS", + "SecretKey": "sk_test_51RjUmIBMIadsOxJVeqsMFxnZ8ePR7d8IbnaF4sAwBVJv9rrfODPEQ2C9fF3beoABpITdfzEk0ZDzGTTQfvKv63xI00PeZoABGO", + "WebhookSecret": "whsec_8d189c137ff170ab5e62498003512b9d073e2db50c50ed7d8712b7ef11a37543" }, "Authentication": { "Google": { - "ClientId": "your_google_client_id", - "ClientSecret": "your_google_client_secret" + "ClientId": "472850008574-nmeepbdt4hunsk5c8krpbdmd3olc4jv6.apps.googleusercontent.com", + "ClientSecret": "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" }, "Microsoft": { "ClientId": "b411606a-e574-4f59-b7cd-10dd941b9fa3", @@ -27,22 +27,22 @@ }, "Plans": { "Basic": { - "PriceId": "price_basic_monthly", + "PriceId": "price_1RjUskBMIadsOxJVgLwlVo1y", "Price": 9.90, "MaxLinks": 5, - "Features": ["basic_themes", "simple_analytics"] + "Features": [ "basic_themes", "simple_analytics" ] }, "Professional": { - "PriceId": "price_professional_monthly", + "PriceId": "price_1RjUv9BMIadsOxJVORqlM4E9", "Price": 24.90, "MaxLinks": 15, - "Features": ["all_themes", "advanced_analytics", "custom_domain"] + "Features": [ "all_themes", "advanced_analytics", "custom_domain" ] }, "Premium": { - "PriceId": "price_premium_monthly", + "PriceId": "price_1RjUw0BMIadsOxJVmdouNV1g", "Price": 29.90, "MaxLinks": -1, - "Features": ["custom_themes", "full_analytics", "multiple_domains", "priority_support"] + "Features": [ "custom_themes", "full_analytics", "multiple_domains", "priority_support" ] } } } \ No newline at end of file