Commit Graph

14 Commits

Author SHA1 Message Date
Tengku Achmad c32ac1882d feat: update global styles and Tailwind configuration with Inter font; remove obsolete test files and add server documentation
- Added 'Inter' font to global CSS and Tailwind config for improved typography.
- Deleted unused test files related to payment link creation and Snap token testing.
- Created comprehensive README for server setup, API endpoints, and payment flow.
- Added testing documentation for easier integration and usage of the payment system.
2025-12-04 22:57:38 +07:00
CIFO Dev 3512fa4a4d fix ux 2025-12-04 14:56:53 +07:00
CIFO Dev d051c46ac4 feat: Epic 6 Stories 6.1-6.5 - Snap Hybrid Payment Strategy
Implemented comprehensive Snap integration with hybrid Core/Snap payment strategy:

Story 6.1 - Environment Switching:
- Added PAYMENT_GATEWAY_MODE env variable (CORE/SNAP)
- Created paymentMode.ts utilities for mode detection
- Added startup validation in main.tsx
- Implemented mode-aware logging with [CORE]/[SNAP] prefixes

Story 6.2 - Snap Payment Flow:
- Created /api/payments/snap/token endpoint
- Implemented SnapPaymentTrigger component with conditional rendering
- Added Snap.js script loading for SNAP mode
- Integrated hosted payment interface

Story 6.3 - Unified Webhook Handler:
- Enhanced /api/payments/notification for Core & Snap
- Implemented mode detection from payload structure
- Added unified signature verification
- Created shared status mapping and ledger updates

Story 6.4 - Shared Backend Logic:
- Created TransactionLogger for unified mode-aware logging
- Implemented OrderManager for shared validation logic
- Added CustomerDataHandler for consistent data sanitization
- Integrated shared utilities across payment endpoints

Story 6.5 - Code Organization:
- Reorganized into core/, snap/, shared/, lib/ structure
- Moved Core components to payments/core/
- Created PaymentAdapter for factory pattern routing
- Added SnapTokenService for token management
- Updated all import paths for new structure

Key Benefits:
 Instant rollback via environment variable
 Infrastructure offloading to Midtrans hosted interface
 Clean separation of Core vs Snap implementations
 Unified webhook processing for both modes
 Shared utilities eliminate code duplication

Technical Details:
- TypeScript compilation successful (549KB bundle)
- All payment methods work in both CORE and SNAP modes
- Dynamic component loading for Core components
- Mode-aware logging throughout payment flow
- Backwards compatible with existing Core API implementation
2025-12-03 15:33:22 +07:00
Tengku Achmad ec96b71161 feat(payments): extend payment link expiration to 24 hours
Update default payment link TTL from 30 minutes to 24 hours across frontend and backend. Also modify countdown display to show hours in addition to minutes and seconds.
2025-11-22 11:54:46 +07:00
CIFO Dev 96c4cd3aba feat(server): support multiple ERP notification URLs (ERP_NOTIFICATION_URLS)\n\n- Add env ERP_NOTIFICATION_URLS (comma-separated) with fallback to ERP_NOTIFICATION_URL\n- Update
otifyERP to broadcast payload to all endpoints and aggregate results\n- Log per-endpoint result and summary via erp.notify.success and erp.notify.summary\n- Add dev endpoint /api/echo2 for local multi-URL testing\n\nThis ensures signature is included in body for all endpoints and improves visibility in logs.
2025-11-17 13:33:03 +07:00
CIFO Dev 8c42768ec3 ERP: gunakan ERP_CLIENT_SECRET untuk signature; perbaiki fallback; tambah log detail HTTP request/response; endpoint GET /api/logs untuk akses log via browser; log payload ERP dengan signature length dan presence 2025-11-17 10:58:44 +07:00
Tengku Achmad e1dbe911c9 refactor(erp): make computeErpSignature async and improve signature handling 2025-11-14 16:43:31 +07:00
CIFO Dev 80fb683dcc Remove dev-only status mock; always query Midtrans API. Add helper script to compute Midtrans webhook signature for local tests. 2025-11-14 10:04:53 +07:00
CIFO Dev 6472e95310 fixing merchant id 2025-11-12 10:29:37 +07:00
CIFO Dev 4b43c61365 update merchat order id 2025-11-11 15:11:22 +07:00
CIFO Dev baed44ecd7 Align PayPage flow and update /createtransaksi schema 2025-11-11 10:19:50 +07:00
CIFO Dev a940fda6b2 payment link change 2025-11-10 16:39:10 +07:00
CIFO Dev 85d0c9a58b improvisasi 2025-11-10 15:32:41 +07:00
CIFO Dev 4862c32978 feat(payments): stabilisasi QRIS & CStore; hapus tombol Buat QR
GoPay: spinner QRIS dalam frame, hilangkan QR dummy saat menunggu, hapus tombol Buat QR, sanitasi URL actions. CStore: panel pilihan toko di Step 2, auto-generate kode dengan guard StrictMode, perbaiki busy agar tidak nyangkut setelah respons 201. Checkout: jangan auto-advance untuk CStore, oper defaultStore sesuai pilihan. BankTransfer: stabilisasi in-flight promise untuk VA (sebelumnya).
2025-11-10 11:10:35 +07:00