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:
asepharyana
2026-08-05 09:10:39 +07:00
parent c6ed5c5c19
commit 444c98074f
17 changed files with 636 additions and 2 deletions
+2
View File
@@ -40,6 +40,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
drop_and_create_table(&db, builder, "rate_limits", common::rate_limit::Entity)
.await?;
drop_and_create_table(&db, builder, "otp_cache", common::otp_cache::Entity).await?;
drop_and_create_table(&db, builder, "payments", common::payments::Entity)
.await?;
drop_and_create_table(&db, builder, "gacha_credits", gacha::gacha_credits::Entity)
.await?;