feat: setup initial create payment endpoint
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user