surepay_pos_plugin 0.0.3 copy "surepay_pos_plugin: ^0.0.3" to clipboard
surepay_pos_plugin: ^0.0.3 copied to clipboard

A Flutter plugin for integrating with Sure POS USB SDK. This plugin enables communication with Sure POS terminals via USB connection.

Surepay POS Plugin #

pub package A Flutter plugin for integrating with Surepay POS USB SDK. This plugin enables communication with Surepay POS terminals via USB connection.

Features #

  • USB connection initialization
  • Send transaction amounts to terminal
  • Receive terminal responses and events
  • Handle transaction errors and responses

Getting Started #

Add this to your package's pubspec.yaml file:

dependencies:
  surepay_pos_plugin: ^0.0.3

Usage #

First, initialize the USB connection:

try {
  String result = await SurepayPosPlugin.initializeUsb();
  print('Initialized: $result');
} catch (e) {
  print('Error initializing: $e');
}

Listen to terminal events:

SurepayPosPlugin.eventStream.listen((event) {
  print('Event received: $event');
});

Send an amount to the terminal:

try {
  String result = await SurepayPosPlugin.sendAmount("100.00");
  print('Amount sent: $result');
} catch (e) {
  print('Error sending amount: $e');
}

Additional Information #

  • Make sure to add necessary USB permissions to your Android manifest
<uses-permission android:name="android.permission.USB_PERMISSION" />
  • Requires Android API level 23 or higher
  • add surepaysdkv3.0.0.aar to android/app/libs/
  • For detailed implementation, check the example app in the repository

Contributing #

Feel free to contribute to this plugin by creating issues or submitting pull requests.

0
likes
150
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for integrating with Sure POS USB SDK. This plugin enables communication with Sure POS terminals via USB connection.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on surepay_pos_plugin