feat(dimentorin): payment module - gateway-agnostic VA/QRIS with admin confirm
- app_payments table + PaymentEntity (amount from mentor mentoring_rate + service fee 2000)
- PaymentRepository (postgres) + PaymentServiceImpl (create/get/confirm/list)
- Routes: POST /payments/sessions/{id}/create, GET /payments/me, GET /payments/{id}, POST /payments/{id}/confirm
- confirm guarded by Admin/Admin Pembayaran role; ownership guard mentee-only view
- provider=manual default (swap midtrans/xendit later), e2e verified: VA+QRIS create, confirm 200, re-confirm 409, non-admin 403, foreign payment 403
This commit is contained in:
@@ -7,7 +7,8 @@ use imphnen_cms::{
|
||||
};
|
||||
use imphnen_dimentorin::{
|
||||
articles_protected_routes, articles_public_routes, mentors_protected_routes,
|
||||
mentors_public_routes, sessions_protected_routes, sessions_public_routes,
|
||||
mentors_public_routes, payments_protected_routes, sessions_protected_routes,
|
||||
sessions_public_routes,
|
||||
};
|
||||
use imphnen_gacha::gacha_router;
|
||||
use imphnen_hackathon::hackathon_router;
|
||||
@@ -79,6 +80,7 @@ pub async fn gateway_service(postgres_clients: PostgresClients) -> Router {
|
||||
Router::new()
|
||||
.merge(mentors_protected_routes(db.clone(), Arc::clone(&state_arc)))
|
||||
.merge(sessions_protected_routes(db.clone(), Arc::clone(&state_arc)))
|
||||
.merge(payments_protected_routes(db.clone(), Arc::clone(&state_arc)))
|
||||
.merge(articles_protected_routes(
|
||||
db.clone(),
|
||||
Arc::clone(&state_arc),
|
||||
|
||||
Reference in New Issue
Block a user