fix BML POS QRs
This commit is contained in:
@@ -33,6 +33,16 @@ TLV path: **root tag `35` → sub-tag `20` → sub-sub-tag `01`**
|
||||
|
||||
The value at tag `01` is the full `https://pay.bml.com.mv/app/...` URL.
|
||||
|
||||
### 3. POS QR (`mv.com.bml.qtr`)
|
||||
|
||||
BML POS terminals emit an EMVCo-style dynamic QR with no tag `26` and supplementary domain
|
||||
`mv.com.bml.qtr`. The same TLV path (`35` → `20` → `01`) holds a bare reference such as
|
||||
`02:215c7b9f15ce4ed28e15697ea976db99` instead of a URL. That bare reference — not the whole payload,
|
||||
which is rejected with code `112` — is what gets Base64-encoded into the payrequest lookup below.
|
||||
The reference does **not** resolve as a `pay.bml.com.mv/app/` short code in a browser; only the API
|
||||
understands it. See
|
||||
[PayMV QR Format → BML POS QR](../thijooree/18-paymv-qr-format.md#bml-pos-qr-mvcombmlqtr).
|
||||
|
||||
---
|
||||
|
||||
## PayMV QR Format (TLV)
|
||||
@@ -71,19 +81,29 @@ PayMV QRs (static, PayMV-native) use a decimal TLV encoding (not BER-TLV):
|
||||
GET https://www.bankofmaldives.com.mv/internetbanking/api/mobile/walletpayments/payrequest/{base64Url}
|
||||
```
|
||||
|
||||
`{base64Url}` is the full QR URL (e.g. `https://pay.bml.com.mv/app/...`) base64-encoded with standard encoding (with padding).
|
||||
`{base64Url}` is the lookup key, base64-encoded with standard encoding — the full QR URL
|
||||
(e.g. `https://pay.bml.com.mv/app/...`), or for POS QRs the bare `35` → `20` → `01` reference.
|
||||
BML's own app omits the `=` padding; the padded form resolves as well, so the client matches the app
|
||||
rather than relying on either being required.
|
||||
|
||||
### Headers
|
||||
|
||||
| Header | Value |
|
||||
|---|---|
|
||||
| `accept` | `application/json` — **required in practice**, see below |
|
||||
| `Authorization` | `Bearer <access_token>` |
|
||||
| `User-Agent` | `bml-mobile-banking/348 ({manufacturer}; Android {version}; {model})` |
|
||||
| `x-app-version` | `2.1.44.348` |
|
||||
|
||||
> **`accept: application/json` is not optional.** Handled errors (codes 103, 112, …) come back as
|
||||
> JSON regardless, but when the route throws, the server renders the Internet Banking HTML login
|
||||
> page — under HTTP **200** — instead of a JSON error body. A client without the header then sees a
|
||||
> "successful" HTML response it cannot parse. All BML API requests set it in `bmlApiRequest()`.
|
||||
|
||||
```bash
|
||||
curl --request GET \
|
||||
--url 'https://www.bankofmaldives.com.mv/internetbanking/api/mobile/walletpayments/payrequest/<base64Url>' \
|
||||
--header 'accept: application/json' \
|
||||
--header 'Authorization: Bearer <access_token>' \
|
||||
--header 'User-Agent: bml-mobile-banking/348 ({manufacturer}; Android {version}; {model})' \
|
||||
--header 'x-app-version: 2.1.44.348'
|
||||
@@ -116,6 +136,16 @@ curl --request GET \
|
||||
| `amount` | Payment amount (`"0.00"` for static QRS) |
|
||||
| `currency` | Currency code (typically `"MVR"`) |
|
||||
|
||||
### Failure Responses
|
||||
|
||||
`success: false` comes back with a code and a user-facing message; the client shows BML's own
|
||||
wording and keeps the user on the Transfer screen.
|
||||
|
||||
| Code | Message |
|
||||
|---|---|
|
||||
| `103` | The payment request has expired |
|
||||
| `112` | Unsupported payment link |
|
||||
|
||||
---
|
||||
|
||||
## Step 2 — Pay (3-Step TOTP Flow)
|
||||
|
||||
Reference in New Issue
Block a user