How vamsiram07/payeasy works
PayEasy is a wallet-backed payment service. A merchant or client initializes a transaction, receives a payment link, and the payer validates an account, authenticates by PIN or emailed OTP, then submits payment; the service debits the payer and redirects to the callback. A separate credit endpoint credits the recipient, while account users can register, log in, and review transactions. The source also exposes recharge screens, but the sampled routes do not show recharge processing. Wiring is based on sampled source; no README was provided.
Main entry points: app.js Express app · transactionModel.js Transaction model · user.js Account routes · userModel.js User model
Components 18
Payment flow
- Express app
app.js - Transaction routes
controllers/transaction.js - Transaction creation
handlers/transactions.js - Payment validation and auth
app.js - Payment processing
app.js - Recipient credit / cancel
controllers/transaction.js
Accounts
- Account routes
controllers/user.js - User operations
handlers/userHandlers.js - Dashboard lookup
app.js
Persistence
- User model
database/models/userModel.js - Transaction model
database/models/transactionModel.js - Mongo connection
database/mongodb.js
Web views
- Pug views
views - Static assets
public/styles.css
Other components
- Merchant / client
- Payer
- Gmail SMTP
- MongoDB
Connections 38
- Merchant / client → Transaction routes: initializes transaction
- Transaction routes → Transaction creation: creates transaction
- Transaction creation → Transaction model: writes transaction
- Transaction routes → Transaction model: loads transaction
- Transaction routes → Pug views: renders payment
- Payer → Express app: submits payment details
- Express app → Payment validation and auth: handles validation and auth
- Payment validation and auth → User model: loads payer
- Payment validation and auth → Transaction model: reads and updates transaction
- Payment validation and auth → Gmail SMTP: sends OTP
- Payment validation and auth → Pug views: renders auth steps
- Express app → Payment processing: handles payment
- Payment processing → User model: debits balance
- Payment processing → Transaction model: loads transaction
- Payment processing → Pug views: renders result
- Payment processing → Merchant / client: redirects to callback
- Merchant / client → Recipient credit / cancel: requests credit or cancel
- Recipient credit / cancel → Transaction model: updates transaction
- Recipient credit / cancel → User model: credits or refunds balance
- Recipient credit / cancel → Merchant / client: returns callback or response
- Payer → Account routes: registers or logs in
- Account routes → User operations: creates or looks up user
- User operations → User model: writes or reads user
- Account routes → User model: loads dashboard user
- Account routes → Transaction model: loads user transactions
- Account routes → Pug views: renders account pages
- Payer → Express app: opens dashboard
- Express app → Dashboard lookup: handles dashboard request
- Dashboard lookup → User model: loads user
- Dashboard lookup → Transaction model: loads transactions
- Dashboard lookup → Pug views: renders dashboard
- Express app → Transaction routes: mounts routes
- Express app → Account routes: mounts routes
- Express app → Mongo connection: connects database
- Mongo connection → MongoDB: connects
- Express app → Pug views: renders home page
- Payer → Express app: loads web assets
- Express app → Static assets: serves static files