ingenico_device 0.0.1+3
ingenico_device: ^0.0.1+3 copied to clipboard

A Flutter Package for Ingenico mPOS Device Connection. Support for Ingenico SDK Version 2.8.0.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:ingenico_device/ingenico_device.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
          appBar: AppBar(
            title: const Text('Plugin example app'),
          ),
          body: Column(
            children: [
              ElevatedButton(
                  onPressed: () async {
                    await IngenicoDevice.ingenicoInitialize(
                        "API-KEY", "https://uatmcm.roamdata.com/", "4.2.3");
                  },
                  child: Text('Initialize')),
              ElevatedButton(
                  onPressed: () async {
                    await IngenicoDevice.ingenicoLogin("UserName", "Password");
                  },
                  child: Text('Login')),
              ElevatedButton(
                  onPressed: () async {
                    var devices = await IngenicoDevice.setDeviceType();
                    print(devices.toString());
                  },
                  child: Text('Set Device Type')),
              ElevatedButton(
                  onPressed: () async {
                    var devices = await IngenicoDevice.search();
                    print(devices.toString());
                  },
                  child: Text('Search')),
              ElevatedButton(
                  onPressed: () async {
                    var devices = await IngenicoDevice.setUpDevice();
                    print(devices.toString());
                  },
                  child: Text('Setup Device')),
              ElevatedButton(
                  onPressed: () async {
                    var devices = await IngenicoDevice.creditSale("INR", 1000);
                    print(devices.toString());
                  },
                  child: Text('Process Credit Sale')),
            ],
          )),
    );
  }
}
0
likes
100
pub points
19%
popularity

Publisher

avinashgotluru.me

A Flutter Package for Ingenico mPOS Device Connection. Support for Ingenico SDK Version 2.8.0.

Homepage
Repository (missing)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on ingenico_device