feat: setup initial create payment endpoint

This commit is contained in:
Stevan Freeborn
2025-12-26 08:00:04 -06:00
parent 161e857702
commit fe3928bbc7
8 changed files with 117 additions and 11 deletions
@@ -8,6 +8,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.0" />
<PackageReference Include="Stripe.net" Version="50.1.0" />
</ItemGroup>
<Target Name="InstallClientDeps" BeforeTargets="Build">
+17
View File
@@ -9,6 +9,23 @@ if (app.Environment.IsDevelopment())
app.MapOpenApi();
}
// We need a /create-payment-intent endpoint
app.MapPost("/create-payment-intent", static () =>
{
// we need to get the amount and email
// from the frontend
// we need to validate the amount and email
// we are going to use the Stripe API to create
// a payment intent
// return the secret for that intent
// to the frontend
return Results.Ok("Hello");
});
app.UseDefaultFiles();
app.UseStaticFiles();