forked from thijooree/android
1.8 KiB
1.8 KiB
PayMV QR Screen
Generates a receive-payment PayMV / Favara QR code. Generation only — the send/scan side of PayMV lives in TransferFragment via newInstanceWithAutoScan() and the QR scanner.
Fragment — PayMvQrFragment
A single screen (no tabs). Re-renders the QR live as the user edits the form.
Fields
| Field | Source / behaviour |
|---|---|
| Source account dropdown | viewModel.accounts, filtered to non-card MVR accounts (MIB and BML USD currently excluded — both flagged as TODO in source). Defaults to CredentialStore.getDefaultAccountNumber() when set |
Amount (etAmount) |
Optional. Blank → open-amount QR |
Reference (etReference) |
Free-text purpose; defaults to paymvqr_reference_default if blank — written to tag 62→08 |
Include phone (switchIncludePhone) |
When on, writes the saved BML / Fahipay mobile to sub-tag 26→05 (auto-prefixed +960 if 7-digit local) |
Generation
buildQrPayload() assembles a decimal TLV payload per the PayMV QR Format:
- Tag 26 container: GUI (
mv.favara.mpqr), acquirer BIC, account number, optional mobile,IPAY - Acquirer BIC is derived from the source account's bank:
MALBMVMV(BML) /MADVMVMV(MIB) /FAHIMVMV(Fahipay) - Tag 62 container: random 9-char reference + the purpose text
- Tag 80 container: GUI + ISO timestamp
- Appends
"6304"and computes CRC-16/CCITT-FALSE over the full string
The rendered card image (bank-styled background plus QR) is shown in-place.
Actions
- Share (
btnShare) — exports the rendered card viaFileProvider+ACTION_SEND - Save (
btnSave,PayMvQrFragment.kt:78) — writes the PNG toMediaStore.Images/Pictures/
← OTP Screen Next → BML QR Pay