Flutter

Dart version sdk: ">=2.12.0 <3.0.0"
https://github.com/hesabe-tech-team/api2-kit-flutter

Dart version sdk: ">=2.12.0 <4.0.0" (if dart version 3 and greater)
https://github.com/hesabe-tech-team/api2-kit-flutter/tree/flutterv3


You can integrate Hesabe Payment Gateway in your Flutter app by following the steps below:

  1. Download and add package/plugin in your Project’s root folder and dependency in your pubspec.yaml file (and run an implicit flutter pub get).
    For example:
  Dependencies:
  hesabe:
  path: ./hesabe
  1. Import - import 'package:hesabe/hesabe.dart';

  2. Use the Sandbox environment URL and keys to test application with the Flutter plugin.
    For example:

  Hesabe hesabe = Hesabe(
      baseUrl: 'https://XXXX.hesabe.com', // Environment URL provided by Hesabe
      accessCode: 'XXXXX',                // Access code provided by Hesabe
      ivKey: 'XXXXX',                     // Iv Key provided by Hesabe
      secretKey: 'XXXXX',                 // Secret key provided by Hesabe
  );
  1. Use Event Listener(s) to get the success and failure response from the Hesabe.
    For example:
  hesabe.on(Hesabe.EVENT_PAYMENT_SUCCESS, (data) {
  // TODO: Implementation pending
  });

  hesabe.on(Hesabe.EVENT_PAYMENT_ERROR, (data) {
  // TODO: Implementation pending
  });

{info} Downloadable kit contains plugin code alongside readymade examples that can help you to integrate the hesabe plugin in your Flutter application. You can find example here.