#27 added confirm endpoint for stripe
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user