#27 added confirm endpoint for stripe

This commit is contained in:
Dominic Villemure
2024-04-24 22:14:14 -04:00
parent 6883855ecb
commit cba08b0464
8 changed files with 498 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ public class Stripe : EndpointGroupBase
public override void Map(WebApplication app)
{
app.MapGroup(this)
.MapPost(ConfirmTransaction, "/confirmTransaction")
.MapPost(CreateSessionCheckout);
}
@@ -14,4 +15,9 @@ public class Stripe : EndpointGroupBase
{
return sender.Send(command);
}
private static Task<string> ConfirmTransaction(ISender sender, ConfirmStripeTransactionCommand command)
{
return sender.Send(command);
}
}

View File

@@ -99,6 +99,38 @@
}
}
},
"/api/Stripe/confirmTransaction": {
"post": {
"tags": [
"Stripe"
],
"operationId": "ConfirmTransaction",
"requestBody": {
"x-name": "command",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfirmStripeTransactionCommand"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/Stripe": {
"post": {
"tags": [
@@ -687,6 +719,19 @@
}
}
},
"ConfirmStripeTransactionCommand": {
"type": "object",
"additionalProperties": false,
"properties": {
"userTransactionId": {
"type": "string",
"format": "guid"
},
"isConfirmed": {
"type": "boolean"
}
}
},
"CreateSessionCheckoutCommand": {
"type": "object",
"additionalProperties": false,