Skip to content
 
 

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

payment_api

Installation of packages(Flask is used for making REST API calls so you need to have)

1) virtualenv (pip3 install virtualenv)

2) Then you have to activate virtualenv at the desired location (. venv/bin/activate)

3) Flask (pip3 install Flask)

4) sqlite3 database for maintaining the account balances and the transaction logs (sudo apt install sqlite3)

5) Run the application using (python3 app.py)

The implemented functions include:

   You need to give phone number(which is unique) along with a password and an initial balance(minimum 5000)
   
   The case where user does not maintain the minimum balance of Rs 5000

Screenshot from 2021-05-12 19-18-01

   The case where user does maintain the minimum balance of Rs 5000 and the account is successfully created

Screenshot from 2021-05-12 19-18-11

   The case where an account linked with the given phone number alreday exist

Screenshot from 2021-05-12 19-18-18

   You need to give your phone number along with the correct password and the amount to be added.
   
   The case where the given phone number does not have a wallet account yet

Screenshot from 2021-05-12 19-19-01

   The case where the password of the given phone number is not correct

Screenshot from 2021-05-12 19-19-18

   The case where the phone number and password are valid and the specified amount is credited.

Screenshot from 2021-05-12 19-53-59

   You need to give your phone number along with the correct password and the amount to be debited. The balance after deduction should be greater than or equal to 5000 otherwise the transaction wouldn't be performed.
   
   The case where the balance after transcation becomes less than 5000 so the transaction is not performed.

Screenshot from 2021-05-12 19-20-08

   The case where the balance after the transaction is greater than 5000 so the transaction is performed.

Screenshot from 2021-05-12 19-20-19

4) Check Balance url: http://127.0.0.1:7000/checkb

   You need to give the phone number nad the corresponding valid password.

Screenshot from 2021-05-12 19-20-38

A log table is also created in the project.db database which contains all the transactions which have taken place in the order in which they have taken place. It includes the following columns (phone number,transaction type(credit/debit),amount,balance before transaction, balance after transaction)

temp.py could be used to see all the transactions that have taken place.

Screenshot from 2021-05-13 12-45-04

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages