Skip to content

Commit

Permalink
Update TODOs and adjust code
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenkumarct committed Jan 31, 2024
1 parent 0bebe40 commit 7727e2b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
4 changes: 1 addition & 3 deletions processor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
"start:dev": "node_modules/.bin/nodemon -q dist/server/main.js",
"lint": "prettier --check \"src/**/*.{ts,js,json}\" && eslint --ext .ts src",
"lint:fix": "prettier --write \"src/**/*.{ts,js,json}\" && eslint --fix --ext .ts src",
"build:server": "tsc -p tsconfig.server.json",
"build": "npm run build:server && npm run build:client",
"build:dev": "npm run build:server && npm run build:client:dev",
"build": "tsc -p tsconfig.server.json",
"dev": "ts-node --project tsconfig.server.json src/server/main.ts | pino-pretty",
"test": "jest --detectOpenHandles",
"connector:post-deploy": "node src/connectors/post-deploy.ts",
Expand Down
1 change: 1 addition & 0 deletions processor/src/clients/mockPaymentAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { v4 as uuid } from 'uuid';
import {CreatePaymentRequest, MockPaymentProviderResponse} from '../services/types/payment.type';
import {PaymentOutcome} from "../dtos/payment.dto";

// TODO: Make it class , add interface and provide implementation
export const paymentProviderApi = (): any => {

const allowedCreditCards = ['4111111111111111', '5555555555554444', '341925950237632'];
Expand Down
2 changes: 2 additions & 0 deletions processor/src/dtos/payment.dto.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import {Static, Type} from '@sinclair/typebox';

export const CardPaymentMethod = Type.Object({
// TODO: Remove the fields according to the payment provider solution,
// Strongly recommend not to process PAN data to Connectors.
type: Type.Literal('card'),
cardNumber: Type.String(),
expiryMonth: Type.Number(),
Expand Down
1 change: 0 additions & 1 deletion processor/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as dotenv from 'dotenv';
dotenv.config();

import { config } from "./config/config";
import { setupFastify } from "./server";

(async () => {
Expand Down
3 changes: 2 additions & 1 deletion processor/src/routes/payment.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export const paymentRoutes = async (fastify: FastifyInstance, opts: FastifyPlugi
fastify.post<{ Body: PaymentRequestSchemaDTO; Reply: PaymentResponseSchemaDTO }>(
'/payments',
{
onRequest: opts.sessionAuthHook,
// TODO: implement session
// onRequest: opts.sessionAuthHook,
schema: {
body: PaymentRequestSchema,
response: {
Expand Down
1 change: 0 additions & 1 deletion processor/src/security/auth/token.auth.ts

This file was deleted.

0 comments on commit 7727e2b

Please sign in to comment.