A user presents a card to a merchant. The merchant uses their camera (with build in QR code scanner) to scan the QR code. The QR code goes to a specific URL in the format of [login to view URL]
which allows the merchant to enter in the amount of the sale and record the sale against that card. The card transaction is recorded and thus reduces the balance of the card.
Only the super admin adds cards, users, merchants, and adds funds. Users and merchant can NOT perform these functions.
merchants: key_id, business name, mobile number
users: key_id, QR code, name, mobile number
cards: key_id, QR code, status (active / inactive)
transactions: key_id, timestamp, qr code, amount, merchant ID GPS position
users can have many cards, cards can have many transactions, card balance is calculated from SUM of all transactions, transactions can be negative to indicate refund.
1) CRUD users (standard WP functions, including viewing all transactions for a user, and the merchant for a transaction, and viewing all merchants for a user, and all transactions for a given merchant)
2) CRUD cards, link card to user (including viewing all transactions for a card, and the user for a transaction, and the merchant for a transaction... and viewing all merchants for a card based on all transactions for a card)
3) CRUD merchants (including viewing all transactions for merchant and users for transactions)
4) CRUD transactions (including viewing all users for transactions and merchant for a transaction)
1) log in
2) view all transactions
3) refund a specific transaction
4) scan a QR code on their phone which, if logged in, will show the balance of the card and allow them to enter in a price (can be negative). It'll then return "declined" if not enough money, otherwise record the transaction in the database and show success
5) change mobile number, password
6) view support mobile number
No functions required to be coded. Users, merchants, and cards are all added by the super admin. Even adding funds is done by the super admin.
Users then simply present their card (QR code) to a merchant to buy something.