{"id":18719754,"url":"https://github.com/fahdseddik/esnd-payment-application","last_synced_at":"2025-11-10T19:30:15.854Z","repository":{"id":53927122,"uuid":"521897637","full_name":"FahdSeddik/ESND-Payment-Application","owner":"FahdSeddik","description":"Embedded Systems Professional Nanodegree Payment Application Project","archived":false,"fork":false,"pushed_at":"2022-08-11T18:23:45.000Z","size":69300,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-28T11:17:06.061Z","etag":null,"topics":["c","c-application","credit-card","egfwd","luhn-algorithm","luhn-validation","payment-application","project"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FahdSeddik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-06T09:05:39.000Z","updated_at":"2024-08-27T06:27:08.000Z","dependencies_parsed_at":"2022-08-13T04:40:18.696Z","dependency_job_id":null,"html_url":"https://github.com/FahdSeddik/ESND-Payment-Application","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FahdSeddik%2FESND-Payment-Application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FahdSeddik%2FESND-Payment-Application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FahdSeddik%2FESND-Payment-Application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FahdSeddik%2FESND-Payment-Application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FahdSeddik","download_url":"https://codeload.github.com/FahdSeddik/ESND-Payment-Application/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239581758,"owners_count":19662960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","c-application","credit-card","egfwd","luhn-algorithm","luhn-validation","payment-application","project"],"created_at":"2024-11-07T13:27:45.878Z","updated_at":"2025-11-10T19:30:13.530Z","avatar_url":"https://github.com/FahdSeddik.png","language":"C","readme":"# Payment Application Simulation\nThis 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.\n\n## Program Flow Chart\n![payment-flowchart](https://user-images.githubusercontent.com/62207434/183305187-4d1241fb-fa97-4daf-8a6b-a1f41a540ac7.jpg)\n\n## Functions\n\nThese are some of the functions I thought I should highlight:\n- `appStart()` : this would be called in `Main.c` to start the application\n- `getTransactionDate()` : asks for a date in the form `DD/MM/YYYY` or can retrieve `System Date` automatically\n- `getCardPAN()` : this functions asks either to generate a Luhn valid card PAN or enter manually\n  * Uses `GenerateLuhn()` which essentially applies the Luhn algorithm to generate the card PAN\n- `readAccountDB()` : this load the accounts database from the database file (*read [database](https://github.com/FahdSeddik/ESND-Payment-Application#databases) section*)\n- `saveTransaction()` : saves APPROVED transactions with all details into the transactions database (*read [database](https://github.com/FahdSeddik/ESND-Payment-Application#databases) section*)\n\n## Instructions\n- You would find demonstrated test cases in the \"Submission Files/User Stories\" Folder.\n- This demonstrates how someone would use the Simulator.\n- The test cases describe different scenarios that would happen:\n  * `EXCEED_MAX_AMOUNT` : means that the user tried to make a transaction with more than specified max amount for card\n  * `DECLINED_STOLEN_CARD` \u0026 `INVALID_ACCOUNT` : the card number is not present in the account database for the bank\n  * `DECLINED_INSUFFECIENT_FUND` : transaction amount is greater than account balance\n  *  `APPROVED` : the transaction was successful and saved to transactions database\n\n\n## Databases\n- `AccountsDB.txt` : has all accounts PAN (Primary Account Number) and accounts balance\n![image](https://user-images.githubusercontent.com/62207434/183305630-3f431a64-b4db-4ddc-8f17-a2aca3575a40.png)\n- `TransactionsDB.txt` : this stores different data about the transaction (shown in the picture below)\n![image](https://user-images.githubusercontent.com/62207434/183305680-c42ff3ef-1d5a-4dd8-bcb8-e7c0e0acf44b.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffahdseddik%2Fesnd-payment-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffahdseddik%2Fesnd-payment-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffahdseddik%2Fesnd-payment-application/lists"}