Skip to content

khaliullov/payment-system

Repository files navigation

Payment system

Demo payment system with HTTP API. Its features:

  • see list of available accounts
  • see all payments (transactions)
  • make payment (transfer) from account to account in the same currency

API documentation could be found in docs/api.md and docs/swagger.yml

Running locally

To run project locally with docker-compose use:

make up

This command will create .env file from .env.dist and start Docker cluster with following components:

Running unit tests

To run unit tests

make test

This command will install dep in $GOPATH/bin/

Code linting

To check code

make lint

This command will install golangci-lint in $GOPATH/bin/

Running acceptance tests

To run acceptance tests (on running instance):

make HTTP_HOST=127.0.0.1 HTTP_PORT=8080 at

WARNING: this command will reset DB (purge all data)

Postgres config is loaded from .env file, but it is possible to override it via additional args to make:

make HTTP_HOST=127.0.0.1 POSTGRES_HOST=127.0.0.1 at