halo_sdk_ui 0.2.19
halo_sdk_ui: ^0.2.19 copied to clipboard
Halo Dot tap-on-phone payments for Flutter. Wraps the native sdk_ui library behind one Dart class, so an app can take a card payment on the phone itself. Android only.
Changelog #
0.2.19 #
sdk_ui0.0.54, which makes references work the way v1's did. With no reference typed, a charge goes out asHD-<merchant's transaction count>, e.g.HD-18467. A typed reference is checked first, and if it is already taken nothing is charged: a "Reference Already Taken" dialog offersHD-<count>instead. Replaces 0.0.53'sHD-<timestamp>-<count>-<4 random digits>.
0.2.18 #
sdk_ui0.0.53. A charge given no reference now goes out asHD-<timestamp>-<merchant's transaction count>-<4 random digits>, e.g.HD-20261023090220-18467-4821, instead of ending in four random letters and digits. The count is the one v1 put on the references it made up.
0.2.17 #
sdk_ui0.0.52, which charges an app-to-app card payment under its reference numbered with the merchant's next transaction, as the old Link app did:INV-1from a merchant on 18467 transactions goes to the kernel, and to the merchant's webhook, asINV-1-18468.
0.2.16 #
setDcc(bool on): the merchant's switch for DCC, off until a host sets it. DCC shows only where the brand ships it and the merchant has switched it on. Recorded by the SDK, so an inbound payment follows it too.sdk_ui0.0.51, which carries that switch.
0.2.15 #
sdk_ui0.0.50, which lets a brand switch on Dynamic Currency Conversion with"dcc": trueinassets/halo/brand.json. Off when the key is missing. Android only, and a demonstration flow for now: the quote is a fixed demo rate, offered after the charge is approved, and the charge settles in the local currency whichever amount is picked.
0.2.14 #
sdk_ui0.0.49, which fixes a charge made while the SDK is still initialising being refused with "Camera Control Lost": the charge now also waits for the payment screen's boot to hand the camera back to the kernel.
0.2.13 #
sdk_ui0.0.48, which fixes the first payment after an app start failing with "Camera Control Lost" (close the app, open it, enter an amount, tap). The charge now waits for the payment screen itself to resume, not the host's.
0.2.12 #
sdk_ui0.0.47, which fixes the second payment of a session failing with "Camera Control Lost" in release builds: the charge now waits for the payment screen to resume, which re-arms the kernel's camera monitoring, before starting the transaction.
0.2.11 #
sdk_ui0.0.46, compiled against Halo SDK 4.0.27. sdk_ui now publishes one line per SDK kernel:0.0.xon 4.0.27 and0.1.xon 4.1.4. An app that ships a different kernel picks the matching sdk_ui line instead of swapping the SDK underneath. An sdk_ui running on a kernel it wasn't compiled against fails withNoSuchMethodErrorat the first transaction.
0.2.10 #
- Card-present refunds.
transact(..., refundOf: reference)taps the card to give the amount back from the transaction named, for acquirers that return money only to the card that paid.installmentscarries what the original was split over. The SDK's result screen says "refund" rather than "payment". Android only; iOS ignores both and charges. transactanswershaloReference, Halo's own reference for the transaction, so a host can open it in the kernel's history (a refund's record, for one).sdk_ui0.0.45, which addsHDRefundandHaloSdkUi.launch(refund:).
0.2.9 #
isPrinterReachable(device)says whether a printer is on and in range. The SDK asks the backend for the printer's make: a Zebra gets the Bluetooth check the connect flow makes before it reports success, and a built-in MobiPOS printer is checked through its printer service. A host printer screen calls it beforeselectPrinter, which does not check, so choosing a printer that is switched off no longer shows as connected.sdk_ui0.0.44, which addsHaloSdkUi.isPrinterReachable().
0.2.8 #
- The SDK is the record of a host's printers.
getPairedPrinters()lists the Zebra printers bonded to the device — what the connect flow shows under "Paired devices" — andgetSelectedPrinter()answers the one receipts go to. A host's own printer screen reads these rather than keeping a list of its own, so it shows what the SDK shows. - The selected printer is remembered across launches. A printer the
connect flow (or
selectPrinter) chose is still selected after a restart, and is dropped once the merchant unpairs it. forgetPrinter(device)removes a printer — no longer selected, and unpaired from the device, so it leaves the paired list. Answers whether the unpair took.sdk_ui0.0.43, which addsHaloSdkUi.forgetPrinter(),pairedPrinters()andselectedPrinter().
0.2.7 #
init()says how a bring-up failed, in the SDK's own words. AlongsideresultTypeanderrorCode, a failure now carrieserrorTitle,errorMessageanderrorCodesexactly as the SDK's error page words them, in the merchant's language, so the host can show one failure one way.errorShownis'true'when the SDK's own error page is already up with it (show nothing more), anderrorSettingsnames the settings page that fixes it (NFC,APP).errorCodeis always the SDK's first name for the failure — the kernel's own code where it gave one, and now also for a bring-up that failed before the kernel could report (a registration that timed out). On a failureresultTypeis null; it isInitializedon success, as before.- A charge started while
initis still running waits for it. If that bring-up fails, the charge stops on the SDK's error page (errorShownis'true') instead of starting a second bring-up and carrying on, andtransactanswers no result. - The transaction details screen offers Print only when the brand prints
(
printReceipt), as the result screen does. Without it, Retry takes the filled button. - Network failures read as network failures. A timeout or refused connection reads "No Connection" whichever call it cut off.
sdk_ui0.0.42.
0.2.6 #
-
The receipt QR is its own switch.
showTransactionResult.qrturns the receipt QR on or off independently ofshare, so a brand can send receipts without the code, or show the code with no way to send it:"showTransactionResult": { "share": ["email", "sms"], "qr": false }Off, the QR leaves the result screen and the printed slip, and the SDK makes no receipt lookup for it. On unless set to
false, so an existing brand file keeps its QR. The flatreceiptforms read it too (["-qr"]). -
setReceiptOptions(share: false)no longer hides the QR. The merchant's Share switch now covers email/SMS alone, the same as the brand'sshare. -
An app that sends a payment to itself gets its result. An inbound payment is answered whoever sent it, including the host's own build.
-
sdk_ui0.0.40.
0.2.5 #
-
The result screen is configured in one block.
showTransactionResultin your brand file now takes an object as well as a boolean, holding everything the SDK's result screen offers:"showTransactionResult": { "share": ["email", "sms"], "print": ["nfc", "bluetooth"], "autoClose": 30 }sharenames the channels the receipt sheet offers (an empty list removes Share).printturns printing on and names the ways an external printer may be connected (an empty list prints only on a printer the device finds itself, such as a MobiPOS).falsestill turns the result screens off. The flat keys this replaces —receipt,emailReceipt,smsReceipt— are still read, so an existing brand file behaves as before; where both are present the block wins. -
Auto close.
showTransactionResult.autoCloseis a number of seconds the result screen counts down on its Close (or New transaction) button before pressing it itself, so an inbound payment hands the payer back to the app that sent it without a tap. Sharing, printing, retrying or opening the details stops the countdown for that result. Off unless set. -
sdk_ui0.0.39.
0.2.4 #
- Host receipt on the SDK's result screen.
onReceiptRequest(provider)is the receipt equivalent ofonTokenRequest: on an approved charge, just before the SDK's own result screen renders, the SDK calls your provider with the charge's acquirer details —{reference, maskedPan, authCode, date, time}— and your provider returns the slip to print there,{receiptResponse, transactionBarcode, parkingBarcode}, ornullto let the SDK print its own transaction record. The acquirer details come with the call because your owntransacthas not returned yet; a till that must be told which card paid (to settle the basket and get its slip back) builds that call from them. Optional and best-effort: a build that registers no provider is never asked, and a provider that throws or is slow simply falls back to the SDK's own record — the result screen is never held hostage to it. - Zebra printing. The Zebra ZQ620 Bluetooth printer is now supported
alongside MobiPOS. Discover reachable printers with
scanForPrinters()and choose one withselectPrinter(device), or resolve one from an NFC tap withonPrinterTapped(payload)(the one place printing needs a line of host code — forwarding the tap's NDEF payload fromonNewIntent; see the docs). A lone discovered printer is selected automatically. Once a printer is selected,printgoes to it. MobiPOS stays auto-detected and unchanged. - Printing additions.
Printable.textandPrintable.htmltake an optionalcleanflag (defaultfalse) for printing a raw tillreceiptResponseas intended: the SDK decodes its HTML artefacts —
carriage returns, and, for text, the standard entities (&,<…) — so the receipt prints as a receipt rather than with the escapes showing. For HTML the fix is minimal and HTML-safe (only the carriage-return artefact), with real entities left intact.Printable.textalso takes an optionallogo(a base64 PNG/JPEG, printed centred above the text) andbarcode(a Code 128 value, printed centred below, in the same job) — both default to none, so text prints exactly as before without them. For a till slip that wants the brand mark on top and the transaction barcode at its foot on one receipt. - No setup call is needed before
print— the printer now binds on first use, soinitializePrinteris gone. CheckinggetPrinterfirst still warms the device. sdk_ui0.0.38.
0.2.3 #
sdk_ui0.0.37, which fixes theHaloPushServicemanifest declaration.
0.2.2 #
sdk_ui0.0.36.
0.2.1 #
- Printing. The MobiPOS MP5 device's built-in receipt printer, bridged for a
Flutter host.
initializePrinterbinds the device SDK;printTextandprintHTMLare one-shot primitives;printReceiptprints a structuredReceipt— an ordered list of typed lines (TextLine,ImageLine,QrLine,DividerLine,FeedLine) with per-line formatting — as a single job. Android/MobiPOS only, provided bysdk_ui. Printer failures (no paper, overheated, not initialised) surface as a thrownPlatformExceptionrather than a silent null. - The brand key
shareReceiptis nowreceipt. sdk_ui0.0.35.
0.2.0 #
- Breaking.
setTokenProvideris nowonTokenRequest, matching what the native SDK calls the same hook. Rename the call; nothing else about it changed. themeModetells the payment screens whether the app is light, dark or following the device, so they match its theme switch. Recorded likelanguage, so an inbound payment is in the merchant's mode too.sdk_ui0.0.34, which addsHaloSdkUi.setThemeMode.
0.1.3 #
- Requires Flutter 3.47.4 or later (Dart
^3.13.3).
0.1.2 #
sdk_ui0.0.31.
0.1.1 #
- The kernel address and its certificate pin come out of the documentation and
out of the example's brand file. Both are issued to an integrator with their
credentials, both go stale on their own schedule, and neither belongs in a
package on pub.dev.
kernelandkernelPinsare still described — what they are for, and that Halo issues the values.
0.1.0 #
First release. The native sdk_ui library, bridged for a Flutter host through
one class, HaloSdkUi, against za.co.synthesis.halo:sdk_ui:0.0.30.
- Payments.
transactopens the SDK's native tap flow for one charge and returns the outcome with the tender a till reconciles against. An amount opens it on the tap screen; no amount opens the SDK's own keypad first. Per-charge full-screen or sheet presentation. - Bring-up.
setTokenProvider,prepareandinit, in the order each becomes possible. - The surrounding surfaces. NFC state and the settings page behind it,
scanned payment links, camera coordination for scan-to-pay, the Push to
Terminal installation id and
forgetRegistration, the SDK's language, its version, and the browser hand-off for a link on a domain the SDK claims.