full
This commit is contained in:
20
routes/application/wallet/index.js
Normal file
20
routes/application/wallet/index.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const express = require('express')
|
||||
const blockCheck = require('../../../middlewares/blockCheck')
|
||||
const {
|
||||
getWalletSummary,
|
||||
getWalletTransactions,
|
||||
requestWithdrawal,
|
||||
initiateWalletCharge,
|
||||
handleWalletChargeCallback
|
||||
} = require('../../../controllers/application/wallet/walletController')
|
||||
|
||||
const router = express.Router()
|
||||
|
||||
router.get('/summary', [blockCheck], getWalletSummary)
|
||||
router.get('/transactions', [blockCheck], getWalletTransactions)
|
||||
router.post('/withdraw', [blockCheck], requestWithdrawal)
|
||||
router.post('/charge/initiate', [blockCheck], initiateWalletCharge)
|
||||
// ZarinPal calls this directly (browser redirect) — no Authorization header available
|
||||
router.get('/charge/callback', handleWalletChargeCallback)
|
||||
|
||||
module.exports = router
|
||||
Reference in New Issue
Block a user