Skip to content

wukong121/bank-counter-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinkedIn


Logo

Intra Bank Payment Transfer System

Table of Contents
  1. Introduction
  2. Getting Started
  3. Usage
  4. Contact

Introduction

A new intra-bank payment transfer system to allow real time payments between internal accounts.

High Level Requirements

System should be:

  • Accessible by Restful Webservices
  • Able to tell account balance in real time
  • Able to get mini statement for last 20 transactions
  • Able to transfer money in real time
  • Able to fetch accounts details from accounts service (new / deleted)

Acceptance criteria

  • Given valid account details and positive funds available
When account-id 111 sends £10 to account-id 222
Then account-111’s account should be debited with £10
And account-222’s account should be credited with £10
  • Given invalid receiver account details and positive funds available
When account-id 111 sends £10 to account-id 999
Then system should reject the transfer and report invalid account
details
  • Given valid account details and no funds available (£0)
When account-id 111 sends £10 to account-id 222
Then system should reject the transfer with error Insufficient
funds available
  • Given valid account details
When I call a service to check my account balance
Then system should be able to report my current balance
  • Given valid account details
When I call mini-statement service
Then system should be able to show me last 20 transactions
  • Given invalid account details
When I call a service to check my account balance
Then system should return error saying invalid account number
  • Given invalid account details
When I call mini statement service
Then system should return error saying invalid account number

(back to top)

Built With

  • Java
  • Spring Boot
  • Spring Data JPA
  • In-memory H2 database
  • Flyway for database migrations
  • JUnit 5
  • Lombok
  • Maven
  • Swagger for API documentation

(back to top)

Getting Started

To get this project up and running simply clone this repository using your preferred IDE.

If you wish to build the project run the following command at the root of the project:

mvn clean install

To get the application up and running execute the main method found at the following path:

src/main/java/com/mastercard/paymenttransfersystem/PaymentTransferApplication.java

(back to top)

Usage

This project will pre-populate the database with the following accounts:

Account 1: id=786, balance=10000, currency=USD, state=ACTIVE
Account 2: id=555, balance=10000, currency=USD, state=ACTIVE)

API Endpoints

All endpoints have been documented using swagger. Once the project is up and running the documentation can be accessed via this link:

http://localhost:8080/swagger-ui.html

(back to top)

Contact

Fahad Ali Sajad - @LinkedIn - Fahadalisajad@hotmail.com

(back to top)

About

Appraisal project of China CITIC Bank

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages