-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create prototype for supported payment components
- Loading branch information
1 parent
9fbddcb
commit 15c1f8a
Showing
6 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Static, Type } from '@sinclair/typebox'; | ||
|
||
export const SupportedPaymentMethodData = Type.String(); | ||
|
||
export const SupportedPaymentMethodsSchema = Type.Array(SupportedPaymentMethodData); | ||
|
||
export type SupportedPaymentMethodsDTO = Static<typeof SupportedPaymentMethodsSchema>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { FastifyInstance, FastifyPluginOptions } from 'fastify'; | ||
|
||
import { PaymentService } from '../services/types/payment.type'; | ||
|
||
type PaymentComponentsRoutesOptions = { | ||
paymentService: PaymentService; | ||
}; | ||
|
||
export const paymentComponentsRoute = async ( | ||
fastify: FastifyInstance, | ||
options: FastifyPluginOptions & PaymentComponentsRoutesOptions, | ||
) => { | ||
fastify.get('/payment-components', async (request, reply) => { | ||
const result = await options.paymentService.getSupponpmrtedPaymentComponents(); | ||
reply.code(200).send(result); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters