fix: ajustes de cores, fontes, cantos arredondados, etc.
This commit is contained in:
parent
8c43814ffd
commit
950400e0a8
15
VCart.Domain/Entities/BusinessAreas.cs
Normal file
15
VCart.Domain/Entities/BusinessAreas.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Blinks.Domain.Entities
|
||||
{
|
||||
public class BusinessAreas
|
||||
{
|
||||
public BusinessAreas() { }
|
||||
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
12
VCart.Domain/Entities/BusinessAres.cs
Normal file
12
VCart.Domain/Entities/BusinessAres.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Blinks.Domain.Entities
|
||||
{
|
||||
internal class BusinessAres
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -3,9 +3,9 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VCart.Domain.ValueObjects;
|
||||
using Blinks.Domain.ValueObjects;
|
||||
|
||||
namespace VCart.Domain.Entities
|
||||
namespace Blinks.Domain.Entities
|
||||
{
|
||||
public class PersonUser
|
||||
{
|
||||
|
||||
19
VCart.Domain/Entities/UserPlan.cs
Normal file
19
VCart.Domain/Entities/UserPlan.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Blinks.Domain.Entities
|
||||
{
|
||||
public class UserPlan
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
public string UserPlanId { get; set; }
|
||||
}
|
||||
}
|
||||
@ -4,7 +4,7 @@ using System.Diagnostics.Metrics;
|
||||
using System.IO;
|
||||
using System.Reflection.Emit;
|
||||
|
||||
namespace VCart.Domain
|
||||
namespace Blinks.Domain
|
||||
{
|
||||
public class DateBirth : AValueObject
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
using BaseDomain;
|
||||
using System.Globalization;
|
||||
|
||||
namespace VCart.Domain
|
||||
namespace Blinks.Domain
|
||||
{
|
||||
public class DateChanged : AValueObject
|
||||
{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
using BaseDomain;
|
||||
using System.Net.Mail;
|
||||
|
||||
namespace VCart.Domain
|
||||
namespace Blinks.Domain
|
||||
{
|
||||
public class Email : AValueObject
|
||||
{
|
||||
|
||||
@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VCart.Domain.ValueObjects
|
||||
namespace Blinks.Domain.ValueObjects
|
||||
{
|
||||
public class Id : AValueObject
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
using BaseDomain;
|
||||
|
||||
namespace VCart.Domain
|
||||
namespace Blinks.Domain
|
||||
{
|
||||
public class Name : AValueObject
|
||||
{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
using BaseDomain;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace VCart.Domain
|
||||
namespace Blinks.Domain
|
||||
{
|
||||
public class Phone : AValueObject
|
||||
{
|
||||
|
||||
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VCart.Domain.ValueObjects
|
||||
namespace Blinks.Domain.ValueObjects
|
||||
{
|
||||
public class Username
|
||||
{
|
||||
|
||||
@ -5,7 +5,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MongoDB.Driver;
|
||||
|
||||
namespace VCart.Infra.MongoDB
|
||||
namespace Blinks.Infra.MongoDB
|
||||
{
|
||||
public class MongoDbContext
|
||||
{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
using global::MongoDB.Bson.Serialization.Attributes;
|
||||
using global::MongoDB.Bson;
|
||||
|
||||
namespace VCart.Infra.MongoDB
|
||||
namespace Blinks.Infra.MongoDB
|
||||
{
|
||||
|
||||
public class PersonUser
|
||||
|
||||
@ -21,11 +21,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Resource.pt-BR.Designer.cs">
|
||||
<DependentUpon>Resource.pt-BR.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
</Compile>
|
||||
<Compile Update="Resource.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
@ -35,7 +30,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Resource.pt-BR.resx">
|
||||
<LastGenOutput>Resource.pt-BR.Designer.cs</LastGenOutput>
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Resource.resx">
|
||||
@ -1,6 +1,6 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace VCart.Controllers
|
||||
namespace Blinks.Controllers
|
||||
{
|
||||
public class CartHomeController : Controller
|
||||
{
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Diagnostics;
|
||||
using VCart.Models;
|
||||
using Blinks.Models;
|
||||
|
||||
namespace VCart.Controllers
|
||||
namespace Blinks.Controllers
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Globalization;
|
||||
|
||||
namespace VCart.Controllers
|
||||
namespace Blinks.Controllers
|
||||
{
|
||||
public class LanguageController : Controller
|
||||
{
|
||||
|
||||
@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Stripe;
|
||||
|
||||
namespace VCart.Controllers
|
||||
namespace Blinks.Controllers
|
||||
{
|
||||
public class LoginController : Controller
|
||||
{
|
||||
@ -30,7 +30,7 @@ namespace VCart.Controllers
|
||||
public ActionResult ExternalLogin(string provider, string returnUrl)
|
||||
{
|
||||
var redirectUrl = Url.Action("ExternalLoginCallback", "Login", new { ReturnUrl = returnUrl });
|
||||
var properties = new AuthenticationProperties { RedirectUri = "https://localhost:44377" + redirectUrl };
|
||||
var properties = new AuthenticationProperties { RedirectUri = "http://localhost:5094" + redirectUrl };
|
||||
return Challenge(properties, "Microsoft");
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ namespace VCart.Controllers
|
||||
public ActionResult ExternalLoginGoogle(string provider, string returnUrl)
|
||||
{
|
||||
var redirectUrl = Url.Action("ExternalLoginCallback", "Login", new { ReturnUrl = returnUrl });
|
||||
var properties = new AuthenticationProperties { RedirectUri = "https://localhost:44377" + redirectUrl };
|
||||
var properties = new AuthenticationProperties { RedirectUri = "http://localhost:5094" + redirectUrl };
|
||||
return Challenge(properties, "Google");
|
||||
}
|
||||
|
||||
|
||||
73
VCart/Controllers/PayController.cs
Normal file
73
VCart/Controllers/PayController.cs
Normal file
@ -0,0 +1,73 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Stripe;
|
||||
using Stripe.Checkout;
|
||||
|
||||
namespace Blinks.Controllers
|
||||
{
|
||||
[Route("Pay")]
|
||||
public class PayController : Controller
|
||||
{
|
||||
private string domain = "";
|
||||
|
||||
public PayController()
|
||||
{
|
||||
domain = "http://192.168.0.27:5094/";
|
||||
}
|
||||
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpPost("createbio")]
|
||||
public ActionResult CreateBio()
|
||||
{
|
||||
StripeConfiguration.ApiKey = "sk_test_51PvIzkBk8jHwC3c0sGuWDUO8MV9KeOdSkir3Ulo2RZWmUhJLBIAgzxQScuomVi2l333MNmi0yr3FgeFv7OZnCJ0j00hD94yGx1";
|
||||
|
||||
var options = new SessionCreateOptions
|
||||
{
|
||||
UiMode = "embedded",
|
||||
LineItems = new List<SessionLineItemOptions>
|
||||
{
|
||||
new SessionLineItemOptions
|
||||
{
|
||||
// Provide the exact Price ID (for example, pr_1234) of the product you want to sell
|
||||
Price = "price_1Q1CXGBk8jHwC3c0YwypjEVd",
|
||||
Quantity = 1,
|
||||
},
|
||||
},
|
||||
Mode = "subscription",
|
||||
ReturnUrl = domain + "/Plans/OrderView?SessionId={CHECKOUT_SESSION_ID}",
|
||||
};
|
||||
var service = new SessionService();
|
||||
Session session = service.Create(options);
|
||||
|
||||
return Json(new { clientSecret = session.ClientSecret });
|
||||
}
|
||||
|
||||
[HttpPost("createcatalogo")]
|
||||
public ActionResult CreateCatalogo()
|
||||
{
|
||||
StripeConfiguration.ApiKey = "sk_test_51PvIzkBk8jHwC3c0sGuWDUO8MV9KeOdSkir3Ulo2RZWmUhJLBIAgzxQScuomVi2l333MNmi0yr3FgeFv7OZnCJ0j00hD94yGx1";
|
||||
var options = new SessionCreateOptions
|
||||
{
|
||||
UiMode = "embedded",
|
||||
LineItems = new List<SessionLineItemOptions>
|
||||
{
|
||||
new SessionLineItemOptions
|
||||
{
|
||||
// Provide the exact Price ID (for example, pr_1234) of the product you want to sell
|
||||
Price = "price_1Q1CjvBk8jHwC3c03D82tbH8",
|
||||
Quantity = 1,
|
||||
},
|
||||
},
|
||||
Mode = "subscription",
|
||||
ReturnUrl = domain + "/Plans/OrderView?SessionId={CHECKOUT_SESSION_ID}",
|
||||
};
|
||||
var service = new SessionService();
|
||||
Session session = service.Create(options);
|
||||
|
||||
return Json(new { clientSecret = session.ClientSecret });
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,63 +1,40 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using Stripe;
|
||||
using Stripe.Checkout;
|
||||
using Blinks.Models;
|
||||
|
||||
namespace VCart.Controllers
|
||||
namespace Blinks.Controllers
|
||||
{
|
||||
public class PlansController : Controller
|
||||
{
|
||||
private string domain = "";
|
||||
|
||||
public PlansController()
|
||||
{
|
||||
domain = "http://192.168.0.27:5094/";
|
||||
}
|
||||
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult Create(PaymentIntentCreateRequest request)
|
||||
public IActionResult Pay(string ammount)
|
||||
{
|
||||
var paymentIntentService = new PaymentIntentService();
|
||||
var paymentIntent = paymentIntentService.Create(new PaymentIntentCreateOptions
|
||||
{
|
||||
Amount = CalculateOrderAmount(request.Items),
|
||||
Currency = "usd",
|
||||
// In the latest version of the API, specifying the `automatic_payment_methods` parameter is optional because Stripe enables its functionality by default.
|
||||
AutomaticPaymentMethods = new PaymentIntentAutomaticPaymentMethodsOptions
|
||||
{
|
||||
Enabled = true,
|
||||
},
|
||||
});
|
||||
|
||||
return Json(new
|
||||
{
|
||||
clientSecret = paymentIntent.ClientSecret
|
||||
// [DEV]: For demo purposes only, you should avoid exposing the PaymentIntent ID in the client-side code.
|
||||
//dpmCheckerLink = $"https://dashboard.stripe.com/settings/payment_methods/review?transaction_id={paymentIntent.ID}"
|
||||
});
|
||||
return View();
|
||||
}
|
||||
|
||||
private long CalculateOrderAmount(Item[] items)
|
||||
public IActionResult OrderView([FromQuery] string SessionId)
|
||||
{
|
||||
// Calculate the order total on the server to prevent
|
||||
// people from directly manipulating the amount on the client
|
||||
long total = 0;
|
||||
foreach (Item item in items)
|
||||
{
|
||||
total += item.Amount;
|
||||
}
|
||||
return total;
|
||||
var sessionService = new SessionService();
|
||||
Session session = sessionService.Get(SessionId);
|
||||
|
||||
ViewBag.Status = session.RawJObject["status"];
|
||||
ViewBag.CustomerEmail = session.RawJObject["customer_details"]["email"];
|
||||
//return Json(new { status = session.RawJObject["status"], customer_email = session.RawJObject["customer_details"]["email"] });
|
||||
return View();
|
||||
}
|
||||
|
||||
public class Item
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; }
|
||||
[JsonProperty("Amount")]
|
||||
public long Amount { get; set; }
|
||||
}
|
||||
|
||||
public class PaymentIntentCreateRequest
|
||||
{
|
||||
[JsonProperty("items")]
|
||||
public Item[] Items { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace VCart.Controllers
|
||||
namespace Blinks.Controllers
|
||||
{
|
||||
[Route("signin-microsoft")]
|
||||
public class SignInController : Controller
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace VCart.Controllers
|
||||
namespace Blinks.Controllers
|
||||
{
|
||||
public class StartupController : Controller
|
||||
{
|
||||
|
||||
@ -7,16 +7,16 @@ EXPOSE 443
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["VCart.csproj", "."]
|
||||
RUN dotnet restore "./VCart.csproj"
|
||||
COPY ["Blinks.csproj", "."]
|
||||
RUN dotnet restore "./Blinks.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/."
|
||||
RUN dotnet build "VCart.csproj" -c Release -o /app/build
|
||||
RUN dotnet build "Blinks.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "VCart.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||
RUN dotnet publish "Blinks.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "VCart.dll"]
|
||||
ENTRYPOINT ["dotnet", "Blinks.dll"]
|
||||
@ -1,4 +1,4 @@
|
||||
namespace VCart.Middle
|
||||
namespace Blinks.Middle
|
||||
{
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System.Globalization;
|
||||
|
||||
7
VCart/Models/ChangeViewModel.cs
Normal file
7
VCart/Models/ChangeViewModel.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace Blinks.Models
|
||||
{
|
||||
public class ChangeViewModel
|
||||
{
|
||||
public string ChargeId { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
namespace VCart.Models
|
||||
namespace Blinks.Models
|
||||
{
|
||||
public class ErrorViewModel
|
||||
{
|
||||
|
||||
9
VCart/Models/Payment.cs
Normal file
9
VCart/Models/Payment.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace Blinks.Models
|
||||
{
|
||||
public class Payment
|
||||
{
|
||||
public int Amount { get; set; }
|
||||
public string Currency { get; set; }
|
||||
public string Description { get; set; }
|
||||
}
|
||||
}
|
||||
@ -32,7 +32,7 @@
|
||||
},
|
||||
"projects": [
|
||||
{
|
||||
"path": "VCart.csproj",
|
||||
"path": "Blinks.csproj",
|
||||
"startingProject": true,
|
||||
"issues": 1,
|
||||
"storyPoints": 1,
|
||||
@ -40,7 +40,7 @@
|
||||
{
|
||||
"incidentId": "1161414d-b2e4-4447-9d34-e811b563e1c5",
|
||||
"ruleId": "NuGet.0001",
|
||||
"projectPath": "VCart.csproj",
|
||||
"projectPath": "Blinks.csproj",
|
||||
"state": "Active",
|
||||
"location": {
|
||||
"snippetModel": {
|
||||
@ -48,7 +48,7 @@
|
||||
"protected": "Microsoft.VisualStudio.Azure.Containers.Tools.Targets, 1.19.4\n\nRecommendation:\n\nNo supported version found"
|
||||
},
|
||||
"kind": "File",
|
||||
"path": "VCart.csproj",
|
||||
"path": "Blinks.csproj",
|
||||
"snippet": "Microsoft.VisualStudio.Azure.Containers.Tools.Targets, 1.19.4\n\nRecommendation:\n\nNo supported version found",
|
||||
"protectedSnippet": "Microsoft.VisualStudio.Azure.Containers.Tools.Targets, 1.19.4\n\nRecommendation:\n\nNo supported version found",
|
||||
"label": "Microsoft.VisualStudio.Azure.Containers.Tools.Targets 1.19.4"
|
||||
@ -57,7 +57,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "C:\\vscode\\vcart.me.mvc\\VCart.Domain\\VCart.Domain.csproj",
|
||||
"path": "C:\\vscode\\Blinks.me.mvc\\Blinks.Domain\\Blinks.Domain.csproj",
|
||||
"startingProject": true,
|
||||
"issues": 1,
|
||||
"storyPoints": 1,
|
||||
@ -65,7 +65,7 @@
|
||||
{
|
||||
"incidentId": "2fdd89a6-9f8d-4428-8845-41d048dcaf73",
|
||||
"ruleId": "Project.0002",
|
||||
"projectPath": "C:\\vscode\\vcart.me.mvc\\VCart.Domain\\VCart.Domain.csproj",
|
||||
"projectPath": "C:\\vscode\\Blinks.me.mvc\\Blinks.Domain\\Blinks.Domain.csproj",
|
||||
"state": "Active",
|
||||
"location": {
|
||||
"snippetModel": {
|
||||
@ -73,7 +73,7 @@
|
||||
"protected": "Current: net7.0\nNew: net8.0"
|
||||
},
|
||||
"kind": "File",
|
||||
"path": "C:\\vscode\\vcart.me.mvc\\VCart.Domain\\VCart.Domain.csproj",
|
||||
"path": "C:\\vscode\\Blinks.me.mvc\\Blinks.Domain\\Blinks.Domain.csproj",
|
||||
"snippet": "Current: net7.0\nNew: net8.0",
|
||||
"protectedSnippet": "Current: net7.0\nNew: net8.0"
|
||||
}
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Authentication.Google;
|
||||
using Microsoft.AspNetCore.Authentication.MicrosoftAccount;
|
||||
using Microsoft.AspNetCore.Localization;
|
||||
using Microsoft.AspNetCore.Mvc.Razor;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Stripe;
|
||||
using Stripe.Forwarding;
|
||||
using System.Globalization;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
@ -50,8 +52,8 @@ builder.Services.Configure<RequestLocalizationOptions>(options =>
|
||||
{
|
||||
var supportedCultures = new List<CultureInfo>
|
||||
{
|
||||
new CultureInfo("en"),
|
||||
new CultureInfo("pt-BR")
|
||||
new CultureInfo("pt-BR"),
|
||||
new CultureInfo("en")
|
||||
};
|
||||
|
||||
options.DefaultRequestCulture = new RequestCulture("pt-BR");
|
||||
@ -91,5 +93,6 @@ app.MapControllerRoute(
|
||||
name: "default",
|
||||
pattern: "{controller=Home}/{action=Index}/{id?}");
|
||||
|
||||
app.UseRequestLocalization();
|
||||
|
||||
app.Run();
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"dotnetRunMessages": true,
|
||||
"applicationUrl": "http://192.168.0.27:5094"
|
||||
"applicationUrl": "http://localhost:5094"
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
|
||||
4
VCart/Resource.Designer.cs
generated
4
VCart/Resource.Designer.cs
generated
@ -8,7 +8,7 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace VCart {
|
||||
namespace Blinks {
|
||||
using System;
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ namespace VCart {
|
||||
public static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("VCart.Resource", typeof(Resource).Assembly);
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Blinks.Resource", typeof(Resource).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
|
||||
2
VCart/Resource.pt-BR.Designer.cs
generated
2
VCart/Resource.pt-BR.Designer.cs
generated
@ -8,7 +8,7 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace VCart {
|
||||
namespace Blinks {
|
||||
using System;
|
||||
|
||||
|
||||
|
||||
@ -3,13 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34031.279
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VCart", "VCart.csproj", "{51C3E6BC-4BBC-429F-9A7F-8C8A14E14DF4}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blinks", "Blinks.csproj", "{51C3E6BC-4BBC-429F-9A7F-8C8A14E14DF4}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VCart.Domain", "..\VCart.Domain\VCart.Domain.csproj", "{83471C51-B081-4FAC-B5D3-24B237DEC339}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blinks.Domain", "..\VCart.Domain\Blinks.Domain.csproj", "{83471C51-B081-4FAC-B5D3-24B237DEC339}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaseDomain", "..\..\vcart.me\vcart.back\Struct.ValueObjects\BaseDomain.csproj", "{083273D7-7AE9-48A0-A59F-7CC03E1B4C30}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VCart.Infra", "..\VCart.Infra\VCart.Infra.csproj", "{82C3179D-BE8C-4B83-95F4-32B86448D5AC}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blinks.Infra", "..\VCart.Infra\Blinks.Infra.csproj", "{82C3179D-BE8C-4B83-95F4-32B86448D5AC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
||||
@ -126,7 +126,7 @@
|
||||
</div><!-- End Carousel -->
|
||||
</div>
|
||||
|
||||
@section Style {
|
||||
@section Styles {
|
||||
|
||||
<style>
|
||||
body { padding-top: 50px; }
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
</script>
|
||||
}
|
||||
|
||||
@section Style {
|
||||
@section Styles {
|
||||
<style type="text/css">
|
||||
.text-responsive {
|
||||
font-size: calc(100% + 1vw + 1vh);
|
||||
|
||||
@ -1,169 +1,127 @@
|
||||
|
||||
@*
|
||||
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||
*@
|
||||
|
||||
@{
|
||||
Layout = "";
|
||||
@{
|
||||
ViewBag.Title = "Login / Registro";
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>VCart</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" integrity="sha384-gfdkjb5BdAXd+lj+gudLWI+BXq4IuLW5IT+brZEZsLFm++aCMlF1V92rMkPaX4PP" crossorigin="anonymous">
|
||||
@section Styles {
|
||||
<style>
|
||||
/* Coded with love by Mutiullah Samim */
|
||||
body,
|
||||
html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
background: #C5ACD3 !important;
|
||||
}
|
||||
.box {
|
||||
width: 500px;
|
||||
margin: 200px 0;
|
||||
}
|
||||
|
||||
.user_card {
|
||||
height: 400px;
|
||||
width: 350px;
|
||||
margin-top: auto;
|
||||
margin-bottom: auto;
|
||||
background: #C1DD89;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
padding: 10px;
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
-webkit-box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
-moz-box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
border-radius: 5px;
|
||||
}
|
||||
.shape1 {
|
||||
position: relative;
|
||||
height: 150px;
|
||||
width: 150px;
|
||||
background-color: #0074d9;
|
||||
border-radius: 80px;
|
||||
float: left;
|
||||
margin-right: -50px;
|
||||
}
|
||||
|
||||
.brand_logo_container {
|
||||
position: absolute;
|
||||
height: 170px;
|
||||
width: 170px;
|
||||
top: -75px;
|
||||
border-radius: 50%;
|
||||
background: #C5ACD3;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.shape2 {
|
||||
position: relative;
|
||||
height: 150px;
|
||||
width: 150px;
|
||||
background-color: #0074d9;
|
||||
border-radius: 80px;
|
||||
margin-top: -30px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.brand_logo {
|
||||
height: 150px;
|
||||
width: 150px;
|
||||
border-radius: 50%;
|
||||
/* border: 2px solid white;
|
||||
*/ }
|
||||
.shape3 {
|
||||
position: relative;
|
||||
height: 150px;
|
||||
width: 150px;
|
||||
background-color: #0074d9;
|
||||
border-radius: 80px;
|
||||
margin-top: -30px;
|
||||
float: left;
|
||||
margin-left: -31px;
|
||||
}
|
||||
|
||||
.form_container {
|
||||
margin-top: 100px;
|
||||
}
|
||||
.shape4 {
|
||||
position: relative;
|
||||
height: 150px;
|
||||
width: 150px;
|
||||
background-color: #0074d9;
|
||||
border-radius: 80px;
|
||||
margin-top: -25px;
|
||||
float: left;
|
||||
margin-left: -32px;
|
||||
}
|
||||
|
||||
.login_btn {
|
||||
width: 100%;
|
||||
background: darkgreen !important;
|
||||
color: white !important;
|
||||
}
|
||||
.shape5 {
|
||||
position: relative;
|
||||
height: 150px;
|
||||
width: 150px;
|
||||
background-color: #0074d9;
|
||||
border-radius: 80px;
|
||||
float: left;
|
||||
margin-right: -48px;
|
||||
margin-left: -32px;
|
||||
margin-top: -30px;
|
||||
}
|
||||
|
||||
.login_btn:focus {
|
||||
box-shadow: none !important;
|
||||
outline: 0px !important;
|
||||
}
|
||||
.shape6 {
|
||||
position: relative;
|
||||
height: 150px;
|
||||
width: 150px;
|
||||
background-color: #0074d9;
|
||||
border-radius: 80px;
|
||||
float: left;
|
||||
margin-right: -20px;
|
||||
margin-top: -35px;
|
||||
}
|
||||
|
||||
.login_container {
|
||||
padding: 0 2rem;
|
||||
}
|
||||
.shape7 {
|
||||
position: relative;
|
||||
height: 150px;
|
||||
width: 150px;
|
||||
background-color: #0074d9;
|
||||
border-radius: 80px;
|
||||
float: left;
|
||||
margin-right: -20px;
|
||||
margin-top: -57px;
|
||||
}
|
||||
|
||||
.input-group-text {
|
||||
background: darkgreen !important;
|
||||
color: white !important;
|
||||
border: 0 !important;
|
||||
border-radius: 0.25rem 0 0 0.25rem !important;
|
||||
}
|
||||
|
||||
.input_user,
|
||||
.input_pass:focus {
|
||||
box-shadow: none !important;
|
||||
outline: 0px !important;
|
||||
}
|
||||
|
||||
.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
|
||||
background-color: darkgreen !important;
|
||||
}
|
||||
.float {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.form {
|
||||
margin-left: 145px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<!--Coded with love by Mutiullah Samim-->
|
||||
<body>
|
||||
<div class="container h-100">
|
||||
<div class="d-flex justify-content-center h-100">
|
||||
<div class="user_card">
|
||||
<div class="d-flex justify-content-center">
|
||||
<div class="brand_logo_container">
|
||||
@*
|
||||
<img src="https://cdn.freebiesupply.com/logos/large/2x/pinterest-circle-logo-png-transparent.png" class="brand_logo" alt="Logo">
|
||||
*@
|
||||
<img src="~/img/logo.png" class="brand_logo" alt="Logo">
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center form_container">
|
||||
@*
|
||||
<form>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text"><i class="fas fa-user"></i></span>
|
||||
</div>
|
||||
<input type="text" name="" class="form-control input_user" value="" placeholder="username">
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text"><i class="fas fa-key"></i></span>
|
||||
</div>
|
||||
<input type="password" name="" class="form-control input_pass" value="" placeholder="password">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="customControlInline">
|
||||
<label class="custom-control-label" for="customControlInline">Remember me</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center mt-3 login_container">
|
||||
<button type="button" name="button" class="btn login_btn">Login</button>
|
||||
</div>
|
||||
</form>
|
||||
*@
|
||||
<div class="row" >
|
||||
@using (Html.BeginForm("ExternalLogin", "Login", new { provider = "Microsoft" }, FormMethod.Post, true, new { id = "externalLoginForm" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn login_btn">Login with Microsoft</button>
|
||||
<br />
|
||||
}
|
||||
</div>
|
||||
<div class="row">
|
||||
@using (Html.BeginForm("ExternalLoginGoogle", "Login", new { provider = "Google" }, FormMethod.Post, true, new { id = "externalLoginForm" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn login_btn">Login with Google</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<div class="d-flex justify-content-center links">
|
||||
Don't have an account? <a href="#" class="ml-2">Sign Up</a>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center links">
|
||||
<a href="#">Forgot your password?</a>
|
||||
}
|
||||
|
||||
<div id="login-row" class="row justify-content-center align-items-center">
|
||||
<div id="login-column" class="col-md-6">
|
||||
<div class="box">
|
||||
<div class="shape1"></div>
|
||||
<div class="shape2"></div>
|
||||
<div class="shape3"></div>
|
||||
<div class="shape4"></div>
|
||||
<div class="shape5"></div>
|
||||
<div class="shape6"></div>
|
||||
<div class="shape7"></div>
|
||||
<div class="float">
|
||||
<br />
|
||||
<br />
|
||||
@using (Html.BeginForm("ExternalLogin", "Login", new { provider = "Microsoft" }, FormMethod.Post, true, new { id = "externalLoginForm", style = "margin-left: 150px" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn btn-success btn-block login">Login with Microsoft</button>
|
||||
}
|
||||
<br />
|
||||
@using (Html.BeginForm("ExternalLoginGoogle", "Login", new { provider = "Google" }, FormMethod.Post, true, new { id = "externalLoginForm", style = "margin-left: 150px" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn btn-success btn-block login">Login with Google</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
45
VCart/Views/Pay/Index.cshtml
Normal file
45
VCart/Views/Pay/Index.cshtml
Normal file
@ -0,0 +1,45 @@
|
||||
@*
|
||||
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||
*@
|
||||
@{
|
||||
}
|
||||
|
||||
@section Scripts {
|
||||
<script src="https://js.stripe.com/v3/"></script>
|
||||
<script>
|
||||
// This is your test secret API key.
|
||||
const stripe = Stripe("pk_test_51PvIzkBk8jHwC3c0efDBJMY9dBwNqs0SDAHP0vIQr17G9iYg4GQtIrCOh2N9teJoYDXUHTWe6iEHnUylMntwhbin00R7y6lQOV");
|
||||
|
||||
initialize();
|
||||
|
||||
// Create a Checkout Session
|
||||
async function initialize() {
|
||||
const payPlan = get('plan');
|
||||
const fetchClientSecret = async () => {
|
||||
const response = await fetch("/Pay/create" + payPlan, {
|
||||
method: "POST",
|
||||
});
|
||||
const { clientSecret } = await response.json();
|
||||
return clientSecret;
|
||||
};
|
||||
|
||||
const checkout = await stripe.initEmbeddedCheckout({
|
||||
fetchClientSecret,
|
||||
});
|
||||
|
||||
// Mount Checkout
|
||||
checkout.mount('#checkout');
|
||||
}
|
||||
|
||||
function get(name) {
|
||||
if (name = (new RegExp('[?&]' + encodeURIComponent(name) + '=([^&]*)')).exec(location.search))
|
||||
return decodeURIComponent(name[1]);
|
||||
}
|
||||
</script>
|
||||
}
|
||||
<br />
|
||||
<br />
|
||||
<div id="checkout">
|
||||
<!-- Checkout will insert the payment form here -->
|
||||
</div>
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
@{
|
||||
ViewBag.Title = "Planos";
|
||||
}
|
||||
|
||||
<div class="row db-padding-btm db-attached">
|
||||
<div class="col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3">
|
||||
<div class="col-4 col-xs-4 col-sm-4 col-md-4 col-lg-4">
|
||||
<div class="db-wrapper">
|
||||
<div class="db-pricing-eleven db-bk-color-one">
|
||||
<div class="price text-price-responsive">
|
||||
@ -13,93 +14,87 @@
|
||||
Básico
|
||||
</div>
|
||||
<ul class="text-responsive">
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>1 Bio/Cartão <span class="hide-in-cell">pessoal virtual</span></li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Exibir cartão </span>Whatsapp *</li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>Até 20 links </li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>1 Bio/Links <span class="hide-in-cell">pessoal virtual</span></li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Exibir imagem </span>Whatsapp *</li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>Até 3 links </li>
|
||||
<li><i class="bi bi-square text-success"></i><span class="hide-in-cell">Sem página de</span> Produtos</li>
|
||||
<li><i class="bi bi-square text-success"></i>Links agendados **</li>
|
||||
<li><i class="bi bi-square text-success"></i><span class="hide-in-cell">Contador de </span>Visualizações</span></li>
|
||||
<li><i class="bi bi-square text-success"></i><span class="hide-in-cell">Registro de </span>Contatos</li>
|
||||
</ul>
|
||||
<li><i class="bi bi-square text-success"></i><span class="hide-in-cell">Sem contador de </span>Visualizações</span></li>
|
||||
</ul>
|
||||
<div class="pricing-footer">
|
||||
<a href="#" class="btn db-button-color-square btn-lg">Assinar</a>
|
||||
<div class="btn db-button-color-square btn-lg">Plano Atual</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3">
|
||||
<div class="col-4 col-xs-4 col-sm-4 col-md-4 col-lg-4">
|
||||
<div class="db-wrapper">
|
||||
<div class="db-pricing-eleven db-bk-color-three">
|
||||
<div class="db-pricing-eleven db-bk-color-two popular">
|
||||
<div class="price text-price-responsive">
|
||||
<sup>R$</sup>13
|
||||
<small>por mês</small>
|
||||
</div>
|
||||
<div class="type text-type-responsive">
|
||||
Comum
|
||||
BIO
|
||||
</div>
|
||||
<ul>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>1 Bio/Links <span class="hide-in-cell">pessoal virtual</span></li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Exibir cartão </span>Whatsapp *</li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>100 links</li>
|
||||
<li><i class="bi bi-square text-success"></i><span class="hide-in-cell">Sem página de</span> Produtos</li>
|
||||
@*
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>1 Link agendado **</li>
|
||||
*@
|
||||
<li><i class="bi bi-square text-success"></i><span class="hide-in-cell">Contador de</span> Visualizações</li>
|
||||
@*
|
||||
<li><i class="bi bi-square text-success"></i><span class="hide-in-cell">Registro de contatos</span> </li>
|
||||
*@
|
||||
</ul>
|
||||
<div class="pricing-footer">
|
||||
@if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
<a href="/Pay/?plan=bio" class="btn db-button-color-square btn-lg">Assinar</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a href="/Login" class="btn db-button-color-square btn-lg">Login / Registro</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 col-xs-4 col-sm-4 col-md-4 col-lg-4">
|
||||
<div class="db-wrapper">
|
||||
<div class="db-pricing-eleven db-bk-color-three">
|
||||
<div class="price text-price-responsive">
|
||||
<sup>R$</sup>27
|
||||
<small>por mês</small>
|
||||
</div>
|
||||
<div class="type text-type-responsive">
|
||||
CATÁLOGO
|
||||
</div>
|
||||
<ul>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>1 Bio/Cartão <span class="hide-in-cell">pessoal virtual</span></li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Exibir cartão </span>Whatsapp *</li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>Sem limite de links</li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>1 Página de produto</li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>1 Link agendado **</li>
|
||||
<li><i class="bi bi-square text-success"></i>Contador<span class="hide-in-cell"> de visualizações</span> </li>
|
||||
<li><i class="bi bi-square text-success"></i><span class="hide-in-cell">Registro de contatos</span> </li>
|
||||
</ul>
|
||||
<div class="pricing-footer">
|
||||
<a href="#" class="btn db-button-color-square btn-lg">Assinar</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3">
|
||||
<div class="db-wrapper">
|
||||
<div class="db-pricing-eleven db-bk-color-two popular">
|
||||
<div class="price text-price-responsive">
|
||||
<sup>R$</sup>30
|
||||
<small>por mês</small>
|
||||
</div>
|
||||
<div class="type text-type-responsive">
|
||||
Super
|
||||
</div>
|
||||
<ul>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>300 Bio/Cartões <span class="hide-in-cell">pessoal virtual</span></li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Exibir cartão </span>Whatsapp *</li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>Sem limite de links </li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>300 Produtos</li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Use links</span> agendados **</li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>Links de Produtos</li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>Contador<span class="hide-in-cell"> de visualizações</span> </li>
|
||||
@*
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Registro de contatos</span> </li>
|
||||
*@
|
||||
</ul>
|
||||
<div class="pricing-footer">
|
||||
@if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
<button type="button" class="btn db-button-color-square btn-lg" onclick="waitingDialog.show('Custom message');window.location.href = '/Pay/?plan=catalogo';">Assinar</button>
|
||||
|
||||
<a href="#" class="btn db-button-color-square btn-lg">Assinar</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3">
|
||||
<div class="db-wrapper">
|
||||
<div class="db-pricing-eleven db-bk-color-three">
|
||||
<div class="price text-price-responsive">
|
||||
<sup>R$</sup>55
|
||||
<small>por mês</small>
|
||||
</div>
|
||||
<div class="type text-type-responsive">
|
||||
Empresas
|
||||
</div>
|
||||
<ul>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>300 Bio/Cartões <span class="hide-in-cell">pessoal virtual</span></li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Exibir cartão </span>Whatsapp *</li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>Sem limite de links </li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>300 Produtos</li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Use links</span> agendados **</li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i>Contador<span class="hide-in-cell"> de visualizações</span> </li>
|
||||
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Registro de contatos</span> </li>
|
||||
</ul>
|
||||
<div class="pricing-footer">
|
||||
|
||||
<a href="#" class="btn db-button-color-square btn-lg">Assinar</a>
|
||||
@*
|
||||
<a href="/Pay/?plan=catalogo" class="btn db-button-color-square btn-lg">Assinar</a>
|
||||
*@
|
||||
}
|
||||
else
|
||||
{
|
||||
<a href="/Login" class="btn db-button-color-square btn-lg">Login / Registro</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -11,15 +11,15 @@ License: MIT
|
||||
BACKGROUND COLORS
|
||||
============================================================*/
|
||||
.db-bk-color-one {
|
||||
background-color: #e1f2e6;
|
||||
background-color: #A9B595;
|
||||
}
|
||||
|
||||
.db-bk-color-two {
|
||||
background-color: burlywood;
|
||||
background-color: #B9CEA0;
|
||||
}
|
||||
|
||||
.db-bk-color-three {
|
||||
background-color: darkseagreen;
|
||||
background-color: #97A47E;
|
||||
}
|
||||
|
||||
.db-bk-color-six {
|
||||
@ -51,6 +51,7 @@ BACKGROUND COLORS
|
||||
margin-top: 50px;
|
||||
text-align: center;
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, .5);
|
||||
border-radius: 7px 7px 7px 7px;
|
||||
color: #101211;
|
||||
line-height: 30px;
|
||||
}
|
||||
@ -74,19 +75,19 @@ BACKGROUND COLORS
|
||||
|
||||
|
||||
.db-pricing-eleven .price {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.db-pricing-eleven .price small {
|
||||
color: #B8B8B8;
|
||||
color: #63783F;
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
margin-top: 22px;
|
||||
}
|
||||
|
||||
.db-pricing-eleven .type {
|
||||
background-color: #52E89E;
|
||||
background-color: #63783F;
|
||||
padding: 50px 20px;
|
||||
font-weight: 900;
|
||||
text-transform: uppercase;
|
||||
|
||||
10
VCart/Views/Plans/OrderView.cshtml
Normal file
10
VCart/Views/Plans/OrderView.cshtml
Normal file
@ -0,0 +1,10 @@
|
||||
@model ChangeViewModel
|
||||
@{
|
||||
ViewBag.Title = "OrederStatus";
|
||||
}
|
||||
<h2>Order Status</h2>
|
||||
<p>@ViewBag.Status</p>
|
||||
|
||||
<h4>Email</h4>
|
||||
<p>@ViewBag.Email</p>
|
||||
|
||||
77
VCart/Views/Plans/Pay - Copy.cshtml
Normal file
77
VCart/Views/Plans/Pay - Copy.cshtml
Normal file
@ -0,0 +1,77 @@
|
||||
@*
|
||||
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||
*@
|
||||
@{
|
||||
}
|
||||
|
||||
|
||||
@section Scripts {
|
||||
<script src="https://js.stripe.com/v3/"></script>
|
||||
<script>
|
||||
var stripe = Stripe('Your Secret key');
|
||||
var elements = stripe.elements();
|
||||
var style = {
|
||||
base: {
|
||||
fontSize: '16px',
|
||||
color: '#32325d',
|
||||
},
|
||||
};
|
||||
var card = elements.create('card', { style: style });
|
||||
card.mount('#card-element');
|
||||
var form = document.getElementById('payment-form');
|
||||
form.addEventListener('submit', function (event) {
|
||||
event.preventDefault();
|
||||
stripe.createToken(card).then(function (result) {
|
||||
if (result.error) {
|
||||
var errorElement = document.getElementById('card-errors');
|
||||
errorElement.textContent = result.error.message;
|
||||
} else {
|
||||
stripeTokenHandler(result.token);
|
||||
}
|
||||
});
|
||||
});
|
||||
function stripeTokenHandler(token) {
|
||||
var form = document.getElementById('payment-form');
|
||||
var hiddenInput = document.createElement('input');
|
||||
hiddenInput.setAttribute('type', 'hidden');
|
||||
hiddenInput.setAttribute('name', 'stripeToken');
|
||||
hiddenInput.setAttribute('value', token.id);
|
||||
form.appendChild(hiddenInput);
|
||||
form.submit();
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
||||
<form action="/cart/Create" method="post" id="payment-form">
|
||||
<div class="col-sm-6">
|
||||
<div class="panel panel-success">
|
||||
<div class="panel-heading">
|
||||
Credit Card Information
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<div class="col-sm-8">
|
||||
<input type="number" class="form-control" name="Amount" placeholder="Amount" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="Currency" value="INR" readonly />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="Description" placeholder="Description" required />
|
||||
</div>
|
||||
</div>
|
||||
<div id="card-element">
|
||||
</div>
|
||||
<div id="card-errors" role="alert"></div>
|
||||
</div>
|
||||
<br />
|
||||
<input type="submit" value="Submit Payment" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
44
VCart/Views/Plans/Pay.cshtml
Normal file
44
VCart/Views/Plans/Pay.cshtml
Normal file
@ -0,0 +1,44 @@
|
||||
@*
|
||||
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||
*@
|
||||
@{
|
||||
}
|
||||
|
||||
@section Scripts {
|
||||
<script src="https://js.stripe.com/v3/"></script>
|
||||
<script>
|
||||
// This is your test secret API key.
|
||||
const stripe = Stripe("pk_test_51PvIzkBk8jHwC3c0efDBJMY9dBwNqs0SDAHP0vIQr17G9iYg4GQtIrCOh2N9teJoYDXUHTWe6iEHnUylMntwhbin00R7y6lQOV");
|
||||
|
||||
initialize();
|
||||
|
||||
// Create a Checkout Session
|
||||
async function initialize() {
|
||||
const payPlan = get('plan');
|
||||
const fetchClientSecret = async () => {
|
||||
const response = await fetch("/Pay" + payPlan, {
|
||||
method: "POST",
|
||||
});
|
||||
const { clientSecret } = await response.json();
|
||||
return clientSecret;
|
||||
};
|
||||
|
||||
const checkout = await stripe.initEmbeddedCheckout({
|
||||
fetchClientSecret,
|
||||
});
|
||||
|
||||
// Mount Checkout
|
||||
checkout.mount('#checkout');
|
||||
}
|
||||
|
||||
function get(name) {
|
||||
if (name = (new RegExp('[?&]' + encodeURIComponent(name) + '=([^&]*)')).exec(location.search))
|
||||
return decodeURIComponent(name[1]);
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
||||
<div id="checkout">
|
||||
<!-- Checkout will insert the payment form here -->
|
||||
</div>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
@{
|
||||
}
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<li class="nav-item dropdown" style="display: none">
|
||||
<a class="nav-link text-white dropdown-toggle" href="#" id="languageDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="bi bi-book"></i> Idioma - @Context.Request.Cookies["Language"]
|
||||
</a>
|
||||
|
||||
@ -5,19 +5,19 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - VCart</title>
|
||||
<title>@ViewData["Title"] - Blinks</title>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/VCart.styles.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/Blinks.styles.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||
@await RenderSectionAsync("Style", required: false)
|
||||
@await RenderSectionAsync("Styles", required: false)
|
||||
</head>
|
||||
<body class="hide-body">
|
||||
<partial name="_Busy" />
|
||||
<div id="wrapper">
|
||||
<nav id="nav-bar" class="navbar navbar-expand-lg navbar-dark">
|
||||
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">VCart</a>
|
||||
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Blinks</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
@ -33,7 +33,7 @@
|
||||
<a class="nav-link text-white" asp-area="" asp-controller="Plans" asp-action="Index">Planos</a>
|
||||
</li>
|
||||
</ul>
|
||||
@if (!User.Identity.IsAuthenticated)
|
||||
@if (User!=null && User.Identity!=null && !User.Identity.IsAuthenticated)
|
||||
{
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<partial name="_Language" />
|
||||
@ -45,10 +45,10 @@
|
||||
else
|
||||
{
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<partial name="_Language" />
|
||||
<partial name="_Language"/>
|
||||
<li class="nav-item dropdown" style="margin-right: 10px">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="bi bi-person"></i> @User.FindFirst("FullName").Value
|
||||
<i class="bi bi-person"></i> @(User.FindFirst("FullName")!=null ? User.FindFirst("FullName").Value : "N/A")
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" asp-area="" asp-controller="Login" asp-action="Logout">Sair</a>
|
||||
@ -80,18 +80,21 @@
|
||||
|
||||
<footer class="border-top footer text-muted">
|
||||
<div class="container">
|
||||
© 2024 - VCart - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
© 2024 - Blinks - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
<script type="text/javascript" >
|
||||
<script src="~/js/wait.js" asp-append-version="true"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$(document).ready(function () {
|
||||
$('.loading').hide();
|
||||
//$('body').fadeIn(1000);
|
||||
$('body').slideDown('slow');
|
||||
});
|
||||
|
||||
$('a[href="#search"]').on('click', function (event) {
|
||||
@ -110,12 +113,6 @@
|
||||
}
|
||||
});
|
||||
|
||||
//Do not include! This prevents the form from submitting for DEMO purposes only!
|
||||
$('form').submit(function (event) {
|
||||
event.preventDefault();
|
||||
return false;
|
||||
})
|
||||
|
||||
$(window).on('beforeunload', function () {
|
||||
displayBusyIndicator();
|
||||
});
|
||||
@ -143,20 +140,20 @@
|
||||
$('ul.navbar-nav').find('a[href="' + location.pathname + '"]')
|
||||
.closest('a')
|
||||
.removeClass('text-white')
|
||||
.addClass('text-red');
|
||||
.addClass('text-black');
|
||||
}
|
||||
|
||||
function searchActive() {
|
||||
$('#searchLi').addClass("active");
|
||||
$('#searchLi > a')
|
||||
.removeClass('text-white')
|
||||
.addClass('text-red');
|
||||
.addClass('text-black');
|
||||
}
|
||||
|
||||
function searchInactive() {
|
||||
$('#searchLi').removeClass("active");
|
||||
$('#searchLi > a')
|
||||
.removeClass('text-red')
|
||||
.removeClass('text-black')
|
||||
.addClass('text-white');
|
||||
}
|
||||
|
||||
@ -167,18 +164,16 @@
|
||||
|
||||
$('ul.navbar-nav').find('a[href="' + location.pathname + '"]')
|
||||
.closest('a')
|
||||
.removeClass('text-red')
|
||||
.removeClass('text-black')
|
||||
.addClass('text-white');
|
||||
}
|
||||
|
||||
function displayBusyIndicator() {
|
||||
setTimeout(function () {
|
||||
$('#wrapper').fadeOut('slow');
|
||||
$('.loading').show();
|
||||
}, 5000);
|
||||
//$('body').fadeOut(1000);
|
||||
$('body').slideUp('slow');
|
||||
}
|
||||
|
||||
$(".hide-body").fadeOut(2000);
|
||||
//$(".hide-body").fadeOut(2000);
|
||||
});
|
||||
</script>
|
||||
@await RenderSectionAsync("Scripts", required: false)
|
||||
|
||||
@ -13,12 +13,16 @@ a {
|
||||
|
||||
.btn-primary {
|
||||
color: #fff;
|
||||
background-color: #1b6ec2;
|
||||
background-color: #63783F;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
|
||||
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
|
||||
/*
|
||||
color: #fff;
|
||||
|
||||
*/
|
||||
color: black !important;
|
||||
background-color: #1b6ec2;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
@ -116,7 +120,7 @@ button.accept-policy {
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #00ff21;
|
||||
background-color: #63783F;
|
||||
}
|
||||
|
||||
.navbar-inner {
|
||||
@ -156,22 +160,36 @@ button.accept-policy {
|
||||
}
|
||||
}
|
||||
|
||||
.navbar .navbar-collapse ul.navbar-nav .nav-item.active {
|
||||
color: white;
|
||||
background-color: #00ff21 !important;
|
||||
.navbar .navbar-collapse ul.navbar-nav .nav-item {
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
a.nav-link.text-white {
|
||||
background-color: green;
|
||||
.navbar .navbar-collapse ul.navbar-nav .nav-item.active {
|
||||
color: white;
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
background-color: #C7CCB8 !important;
|
||||
border-radius: 7px 7px 7px 7px;
|
||||
/*
|
||||
background-color: #b8f2a1 !important;
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
a.nav-link.text-black {
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
nav.link .active {
|
||||
background-color: red;
|
||||
color: darkgreen;
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
#nav-bar {
|
||||
background-color: darkgreen;
|
||||
background-color: #63783F
|
||||
/* background-color: #darkgreen;
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
#searchLi > a {
|
||||
@ -183,6 +201,10 @@ nav.link .active {
|
||||
color: darkred;
|
||||
}
|
||||
|
||||
.text-black {
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
.btn.green {
|
||||
background-color: darkgreen;
|
||||
color: white;
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>VCart</title>
|
||||
<title>Blinks</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" integrity="sha384-gfdkjb5BdAXd+lj+gudLWI+BXq4IuLW5IT+brZEZsLFm++aCMlF1V92rMkPaX4PP" crossorigin="anonymous">
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
@using VCart
|
||||
@using Blinks
|
||||
|
||||
@*
|
||||
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||
@ -7,7 +7,7 @@
|
||||
ViewData["Title"] = "Form Example";
|
||||
}
|
||||
|
||||
@section Style {
|
||||
@section Styles {
|
||||
<style type="text/css">
|
||||
.bg-grayed {
|
||||
background-color: #D8D8D8
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
@using VCart
|
||||
@using VCart.Models
|
||||
@using Blinks
|
||||
@using Blinks.Models
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
|
||||
@ -12,4 +12,4 @@
|
||||
"SecretKey": "sua_secret_key_aqui",
|
||||
"PublishableKey": "sua_publishable_key_aqui"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -18,5 +18,6 @@ html {
|
||||
}
|
||||
|
||||
body {
|
||||
margin-bottom: 60px;
|
||||
margin-bottom: 60px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
67
VCart/wwwroot/js/wait.js
Normal file
67
VCart/wwwroot/js/wait.js
Normal file
@ -0,0 +1,67 @@
|
||||
/**
|
||||
* Module for displaying "Waiting for..." dialog using Bootstrap
|
||||
*
|
||||
* @author Eugene Maslovich <ehpc@em42.ru>
|
||||
*/
|
||||
|
||||
var waitingDialog = waitingDialog || (function ($) {
|
||||
'use strict';
|
||||
|
||||
// Creating modal dialog's DOM
|
||||
var $dialog = $(
|
||||
'<div class="modal fade" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="padding-top:15%; overflow-y:visible;">' +
|
||||
'<div class="modal-dialog modal-m">' +
|
||||
'<div class="modal-content">' +
|
||||
'<div class="modal-header"><h3 style="margin:0;"></h3></div>' +
|
||||
'<div class="modal-body">' +
|
||||
'<div class="progress progress-striped active" style="margin-bottom:0;"><div class="progress-bar" style="width: 100%"></div></div>' +
|
||||
'</div>' +
|
||||
'</div></div></div>');
|
||||
|
||||
return {
|
||||
/**
|
||||
* Opens our dialog
|
||||
* @param message Custom message
|
||||
* @param options Custom options:
|
||||
* options.dialogSize - bootstrap postfix for dialog size, e.g. "sm", "m";
|
||||
* options.progressType - bootstrap postfix for progress bar type, e.g. "success", "warning".
|
||||
*/
|
||||
show: function (message, options) {
|
||||
// Assigning defaults
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
}
|
||||
if (typeof message === 'undefined') {
|
||||
message = 'Loading';
|
||||
}
|
||||
var settings = $.extend({
|
||||
dialogSize: 'm',
|
||||
progressType: '',
|
||||
onHide: null // This callback runs after the dialog was hidden
|
||||
}, options);
|
||||
|
||||
// Configuring dialog
|
||||
$dialog.find('.modal-dialog').attr('class', 'modal-dialog').addClass('modal-' + settings.dialogSize);
|
||||
$dialog.find('.progress-bar').attr('class', 'progress-bar');
|
||||
if (settings.progressType) {
|
||||
$dialog.find('.progress-bar').addClass('progress-bar-' + settings.progressType);
|
||||
}
|
||||
$dialog.find('h3').text(message);
|
||||
// Adding callbacks
|
||||
if (typeof settings.onHide === 'function') {
|
||||
$dialog.off('hidden.bs.modal').on('hidden.bs.modal', function (e) {
|
||||
settings.onHide.call($dialog);
|
||||
});
|
||||
}
|
||||
// Opening dialog
|
||||
$dialog.modal();
|
||||
},
|
||||
/**
|
||||
* Closes dialog
|
||||
*/
|
||||
hide: function () {
|
||||
$dialog.modal('hide');
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
Loading…
Reference in New Issue
Block a user