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.
These are some of the functions I thought I should highlight:
appStart(): this would be called inMain.cto start the applicationgetTransactionDate(): asks for a date in the formDD/MM/YYYYor can retrieveSystem DateautomaticallygetCardPAN(): 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
- Uses
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)
- 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 cardDECLINED_STOLEN_CARD&INVALID_ACCOUNT: the card number is not present in the account database for the bankDECLINED_INSUFFECIENT_FUND: transaction amount is greater than account balanceAPPROVED: the transaction was successful and saved to transactions database
