Payment Service Provider (PSP) Desenvolvido em Node.JS
# Executar o comando no diretorio raiz do projeto
docker-compose up
curl -X POST \
http://localhost:3001/api/v1/client \
-H 'Content-Type: application/json' \
-d '{
"name" : "Client teste final de noite 2"
}'
curl -X POST \
http://localhost:3001/api/v1/psp \
-H 'Content-Type: application/json' \
-d '{
"vlrTransaction" : 870.99,
"description" : "PRODUCT IMPORT BY CHINA",
"typeTransaction" : 2,
"numCard" : 5274305431780049,
"bearerName" : "PLACE HOLDER THE CARD",
"dtExpiration" : "12.01.2020",
"cvv": 999,
"clientId" : ID_CLIENTE_CADASTRADO
}'
curl -X GET \
http://localhost:3001/api/v1/transaction
curl -X GET \
http://localhost:3001/api/v1/payable \
-H 'Accept: */*'
curl -X GET \
http://localhost:3001/api/v1/payable/1 \
-H 'Accept: */*'
* docker run -it --name PSPBackEnd -p 3000:3000 -v ../../PSP-backend/:/var/www/PSP-backend node:6.14.3 bash
* /# npm install -g nodemon
/# npm install -g node-inspector
* docker run -d --name mysqlPSPBackEnd -e MYSQL_ROOT_PASSWORD=psp -e MYSQL_DATABASE=psp -e MYSQL_USER=psp -e MYSQL_PASSWORD=psp -p 3310:3306 mysql:5.5
# Runing app in dev
docker exec -it ID_CONTAINER_NODE bash
cd /var/www/PSP-backend
npm i
npm install @types/lodash@4.14.116 --save-exact
npm run start
* A aplicação reeniciará automaticamente a cada alteração.
# Compile App
/var/www/PSP-backend/node_modules/.bin/tsc -p /var/www/PSP-backend/tsconfig.json