Skip to content

Latest commit

 

History

History
42 lines (34 loc) · 1.16 KB

File metadata and controls

42 lines (34 loc) · 1.16 KB

Payment Automation System

Get Started

  1. Prerequisites

    1. Go (1.17)
    2. Docker (20.10.14)
    3. Docker Compose (1.29.22)
  2. Running the system locally

docker-compose up -d
  1. Initialize Users

    1. Start an interactive session with psql in DB container
    docker exec -it <postgres container name>  psql -U postgres
    1. connect to pas_dev database using \c pas_dev
    2. Initialize Users and their Wallets
    INSERT INTO users (id, username, password) VALUES
    (1, 'ross', 'friends'),
    (2, 'rachel', 'friends'),
    (3, 'pheobe', 'friends'),
    (4, 'joey', 'friends'),
    (5, 'chandler', 'friends');
    
    INSERT INTO wallets (id, user_id, available_amount) VALUES
    (1, 1, 1000),
    (2, 2, 1000),
    (3, 3, 1000),
    (4, 4, 1000),
    (5, 5, 1000);
    
    1. Import postman collection from docs/Payment Automation System.postman_collection.json
    2. Using the collection above we can use various APIs to view users and their wallets. Also create, view and delete agreements and view all transactions
    3. Navigate to html/index.html to see all the websocket events related to creation/deletion/charged