Files
android/docs/thijooree/11-paymv-qr-screen.md
2026-06-13 21:30:12 +05:00

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:

  1. Tag 26 container: GUI (mv.favara.mpqr), acquirer BIC, account number, optional mobile, IPAY
  2. Acquirer BIC is derived from the source account's bank: MALBMVMV (BML) / MADVMVMV (MIB) / FAHIMVMV (Fahipay)
  3. Tag 62 container: random 9-char reference + the purpose text
  4. Tag 80 container: GUI + ISO timestamp
  5. 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 via FileProvider + ACTION_SEND
  • Save (btnSave, PayMvQrFragment.kt:78) — writes the PNG to MediaStore.Images / Pictures/

 


← OTP Screen     Next → BML QR Pay