feat(payment): implement payment feature with Telebirr integration first try

- Define shared payment types and interfaces in payment.ts
- Create PaymentModal component for handling payment interactions
- Implement payment API client for initiating and confirming payments
- Add payment history management with localStorage
- Create PaymentsPage for displaying payment status and history
- Introduce utility functions for money conversion and formatting
- Set up hooks for managing payment flow and state
- Update SeamanBookApplicationPage to utilize new payment modal
- Add tests for payment API functions and history management
This commit is contained in:
estifanos
2026-07-30 07:30:56 +00:00
parent 4a6f2954b5
commit 06eb9eca4f
15 changed files with 1076 additions and 148 deletions

View File

@@ -90,6 +90,8 @@ npm run dev:all
|---|---|---|---|
| `VITE_BASE_API_URL` | Yes | `http://localhost:3000` | Base URL for all API requests |
| `VITE_ENABLE_DEVELOPER_TOOLS` | No | `true` | Toggle Redux DevTools |
| `VITE_PAYMENT_API_URL` | Yes (portal) | — | Base URL for the payment service (portal `payment` feature). Can be a same-origin path if a backend proxy is later placed in front of it |
| `VITE_PAYMENT_SERVICE_TOKEN` | Yes (portal) | — | Sent as `x-service-token` on every payment request. Note: bundled `VITE_*` values are public in the built app, not secret |
| `PORTAL_PORT` | No | `4200` | Docker host port for portal |
| `BACKOFFICE_PORT` | No | `4201` | Docker host port for backoffice |