Giter Site home page Giter Site logo

fahdseddik / esnd-payment-application Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 67.68 MB

Embedded Systems Professional Nanodegree Payment Application Project

C 100.00%
c c-application credit-card luhn-algorithm luhn-validation payment-application project egfwd

esnd-payment-application's Introduction

Payment Application Simulation

This is a Payment Application Simulation project for the EgFWD Embedded Systems Professional NanoDegree Scholarship. This project was written in C. It includes a Luhn card PAN generation and validation.

Program Flow Chart

payment-flowchart

Functions

These are some of the functions I thought I should highlight:

  • appStart() : this would be called in Main.c to start the application
  • getTransactionDate() : asks for a date in the form DD/MM/YYYY or can retrieve System Date automatically
  • getCardPAN() : this functions asks either to generate a Luhn valid card PAN or enter manually
    • Uses GenerateLuhn() which essentially applies the Luhn algorithm to generate the card PAN
  • readAccountDB() : this load the accounts database from the database file (read database section)
  • saveTransaction() : saves APPROVED transactions with all details into the transactions database (read database section)

Instructions

  • You would find demonstrated test cases in the "Submission Files/User Stories" Folder.
  • This demonstrates how someone would use the Simulator.
  • The test cases describe different scenarios that would happen:
    • EXCEED_MAX_AMOUNT : means that the user tried to make a transaction with more than specified max amount for card
    • DECLINED_STOLEN_CARD & INVALID_ACCOUNT : the card number is not present in the account database for the bank
    • DECLINED_INSUFFECIENT_FUND : transaction amount is greater than account balance
    • APPROVED : the transaction was successful and saved to transactions database

Databases

  • AccountsDB.txt : has all accounts PAN (Primary Account Number) and accounts balance image
  • TransactionsDB.txt : this stores different data about the transaction (shown in the picture below) image

esnd-payment-application's People

Contributors

fahdseddik avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.