Skip to main content

flutter_nmi 1.0.28 copy "flutter_nmi: ^1.0.28" to clipboard
flutter_nmi: ^1.0.28 copied to clipboard

PlatformAndroid

NMI Payment Integration.

flutter_nmi #

NMI Payment SDK for Android (Flutter plugin).

Current version: 1.0.28

SDK versions #

Platform ChipDna / NMI SDK
Android Payment Device SDK 5.4.1 Cassiopeia (full jars)

Android requirements #

  • minSdkVersion 31
  • Bluetooth + location permissions (including BLUETOOTH_CONNECT on API 31+)
  • For TCP/IP SmartPOS (Axium loopback): host app must allow cleartext / loopback (usesCleartextTraffic is declared by the plugin)

Android features (5.4.1) #

Existing Flutter API is preserved. Additive options:

  • TCP/IP connection: initialize with deviceType: "TcpIp", optional is_smart_pos: "1", pinPadIpAddress, pinPadPort (defaults 0.0.0.0 / 8088), and deviceName
  • BluetoothDeviceId: pass bluetoothDeviceId (or deviceId) on initialize, or select from the pin-pad list (IDs included)
  • Offline: FlutterNmi.processOfflineRequest({ 'userReference': '...' })
  • TMS (Android): initialize with action: "TMSUpdate" forces a TMS update (FullTmsUpdate=FALSE). Add full_tms_update: "1" to download all pin-pad configuration.
  • Get PinPad Status: initialize with action: "PinPadStatus" (or FlutterNmi.getPinPadStatus() after connect). Result arrives on onPinPadStatusUpdated. Status is also sent on the flutter_nmi_device channel for FlutterNMIDevice.
  • Connect / configure: connectAndConfigure runs off the UI thread. Progress via onPinPadConfigurationUpdate (ChipDna stage strings). Failures via onPinPadConnectionFailed with the ChipDna error string. onPinPadInitializationFailed is only for ChipDna initialize failure and currently passes no reason string.
  • Partial approval (Android): TMS-driven. Listen for onPartialApprovalRequired; when responseRequired is true, call continuePartialApproval(accept:, operatorPin?).
  • Pre-auth / confirm / void (Android):
    • preAuth({ amount, userReference, ... }) — Sale with AutoConfirm=FALSE / CloseTransaction=FALSE, ChipDna TippingType=END_OF_DAY (no TipAmount on start). Terminal TMS must allow end-of-day tipping.
    • confirmTransaction({ userReference|transactionId, amount, tip? }) — capture; optional tip (dollars) maps to ChipDna TipAmount (or null when 0). Completes to Flutter when ChipDna returns TRANSACTION_RESULT=APPROVED (not only RESULT=TRUE).
    • voidTransaction({ userReference|transactionId }) — void open auth; same TRANSACTION_RESULT=APPROVED success mapping as confirm
    • Default initialize + action: Transaction remains auto-sale (AutoConfirm=TRUE); optional tip (dollars) maps to ChipDna TipAmount (or null when 0). Sale does not send TippingType=END_OF_DAY.
    • Sale / transaction declines and ChipDna errors use onTransactionFailed, not onPinPadConnectionFailed.
  • Keyed pre-auth (Direct Post, Android): not the pin pad.
    • manualPreAuth({ api_key, ccnumber, ccexp, amount, cvv? }) — gateway type=auth. Result JSON includes transactionid.
    • manualCapture({ api_key, transactionid, amount?, tip? }) — gateway type=capture. amount is the original auth; tip is added into the capture total (amount + tip) and also sent as tip. Do not use ChipDna confirmTransaction.
    • manualVoidAuth({ api_key, transactionid }) — gateway type=void. Do not use ChipDna voidTransaction.
    • manualCreditPayment remains sale/credit (type from the caller).

Tap to Pay / Cloud Commerce AAR and surcharge Flutter APIs are not included in this release.

Getting Started #

This project is a Flutter plug-in package.

For help getting started with Flutter, see the online documentation.

3
likes
150
points
729
downloads

Documentation

API reference

Publisher

verified publisherpatel-apps.com

Weekly Downloads

NMI Payment Integration.

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on flutter_nmi

Packages that implement flutter_nmi