forked from shihaam/thijooree
107 lines
2.9 KiB
Markdown
107 lines
2.9 KiB
Markdown
# Transfer
|
|
|
|
The transfer screen initiates account-to-account fund transfers. It supports MIB, BML, and Fahipay as source banks and handles all bank-specific authentication and OTP steps.
|
|
|
|
---
|
|
|
|
## Fragment — `TransferFragment`
|
|
|
|
Opened via:
|
|
- Navigation menu
|
|
- Quick-transfer button on an account row (source pre-selected)
|
|
- `OPEN_TRANSFER` intent action
|
|
- QR scan result (recipient and optional amount pre-filled)
|
|
|
|
---
|
|
|
|
## Source Account Selection
|
|
|
|
A dropdown lists all visible accounts parsed via `AccountListParser.from(acc)?.balance`. The selected source account determines which bank's transfer flow is used.
|
|
|
|
---
|
|
|
|
## Recipient Entry
|
|
|
|
The user can specify a recipient in three ways:
|
|
|
|
1. **Manual entry** — type an account number directly
|
|
2. **Contact picker** — opens `ContactPickerSheetFragment` to select a saved contact
|
|
3. **QR scan** — opens the camera scanner; a PayMV QR result pre-fills the account number, amount, and remarks
|
|
|
|
---
|
|
|
|
## Fields
|
|
|
|
| Field | Notes |
|
|
|---|---|
|
|
| Source account | Dropdown; balance shown below |
|
|
| Recipient account number | Text input or filled from contact/QR |
|
|
| Recipient name | Auto-looked up from bank API after account number entry |
|
|
| Amount | Numeric; pre-filled from QR if available |
|
|
| Remarks / purpose | Free text; pre-filled from QR if available |
|
|
|
|
---
|
|
|
|
## Recipient Lookup
|
|
|
|
After the user finishes entering a recipient account number, the app calls the source bank's name-lookup API:
|
|
|
|
- **MIB**: account name lookup via MIB API
|
|
- **BML**: beneficiary lookup via BML API
|
|
- **Fahipay**: account name resolution via Fahipay API
|
|
|
|
The resolved name is displayed below the account number field for the user to confirm.
|
|
|
|
---
|
|
|
|
## Biometric Gate
|
|
|
|
If biometric-for-transfers is enabled in Settings → Security, `BiometricPrompt` is shown before the transfer is submitted. A failed or cancelled biometric blocks submission.
|
|
|
|
---
|
|
|
|
## Bank-Specific Flows
|
|
|
|
### MIB Transfer
|
|
|
|
1. Validates fields
|
|
2. (If biometric gate) prompts biometrics
|
|
3. Submits transfer via `MibLoginFlow` using active MIB session (serialized through `mibMutex`)
|
|
4. On success, shows `TransferReceiptFragment`
|
|
|
|
### BML Transfer
|
|
|
|
1. Validates fields
|
|
2. (If biometric gate) prompts biometrics
|
|
3. Initiates BML transfer — server responds with OTP required
|
|
4. Navigates to `OtpFragment` to collect the TOTP
|
|
5. Re-submits with OTP
|
|
6. On success, shows `TransferReceiptFragment`
|
|
|
|
### Fahipay Transfer
|
|
|
|
1. Validates fields
|
|
2. (If biometric gate) prompts biometrics
|
|
3. Submits via Fahipay API using stored `authID` + session cookie
|
|
4. On success, shows `TransferReceiptFragment`
|
|
|
|
---
|
|
|
|
## Transfer Receipt
|
|
|
|
On success the fragment navigates to `TransferReceiptFragment` passing the completed transfer details.
|
|
|
|
---
|
|
|
|
## Error Handling
|
|
|
|
All bank API errors are shown as a `Snackbar` or inline error message. Session expiry triggers a re-authentication prompt rather than a crash.
|
|
|
|
---
|
|
|
|
|
|
|
|
---
|
|
|
|
[← Transfer History](06-transfer-history.md) **Next →** [Contacts](08-contacts.md)
|