API Reference

Transaction View Flutter Plugin

This package is used to list the transaction of the card associated with card91 card holders. This package directly communicates to Card91 SDK.

Card91 Transaction List plugin

This package is used to list the transaction of the card associated with card91 card holders. This package directly communicates to Card91 SDK.

Features

Package directly communicate with the SDK (secured platform) to check the transaction the card.

Getting started

Add the widget package on your pubspec version
$ flutter pub add card91_plugin

Use this package as a library

Depend on it
Run this command:
With Flutter:
$ flutter pub add card91_plugin

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):
dependencies:card91_transaction: (updated version)

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it
Now in your Dart code, you can use:
import 'package:card91_plugin/card91_flutter_library.dart';

Installation (Gradle and Manifest Configuration)

Android Minimum Requirements :

Gradle Version - 7.3.3
minSdkVersion - 21
compileSdkVersion - 32
targetSdkVersion - 32

Android Permission on Manifest:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
        tools:ignore="ScopedStorage" />
<application
        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.provider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_paths" />
        </provider>
</application>        

Update gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip

Usage

Open the widget by passing the required parameter to use it. Check out the below code snippet for the same.
Sample code below


import 'package:card91_plugin/card91_flutter_library.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';


class CardTransactionWidget extends StatefulWidget {
  const CardTransactionWidget({Key? key}) : super(key: key);

  @override
  State<CardTransactionWidget> createState() => _CardTransactionWidgetState();
}

class _CardTransactionWidgetState extends State<CardTransactionWidget> {

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SingleChildScrollView(
        child: Padding(
          padding: const EdgeInsets.only(top:20.0),
          child: Container(
            color: Colors.black12,
            height: Get.height,
            width: Get.width,
            child: Card91Transaction(
                  cardId: "##@^#^#@^@^", // cardId of the card holder
                  token: "@%%@Y@FYFHFH@GFHH@GH", //  auth token of the card holder
                  template:"xoltt", // templateId eg."xoltt"
                  env: "PROD", // "PROD" for production , "PROD_SANDBOX" for production sandbox
                  onDataResponse:(String response){
                    // Client application will receive the SDK response here
                    setState(() => print("Response from plugin transaction =$response"));
                  })
            ),
          ),
        ),
    );
  }
}

Input parameter for CardViewItemWidget

NameTypeRequiredDescription
cardIdstringtruecardId which has been received form login token service . Refer customer service SDK for getting the card holder card Id and other details.
tokenstringtrueAuth Token which has been received form login token service . Refer customer service SDK for getting the card holder card Id and other details.
templatestringtruedefault value would be "xoltt"
envstringtruebased on env base url for webview will change eg. PROD, PROD_SANDBOX
onDataResponseFunctiontrueAdd a call back function to receive the error & success event

Basic call back event type

Event NameDescription
c91_TXN_SCREEN_SUCCESSCalled when the server-side APIs load successfully. At this time, Transaction list is successfully .
C91_TXN_AUTHENTICATION_FAILURECall back event type when client is passing incorrect or expired auth token.
C91_TXN_MISSING_PARAMETERCall back event type when client is not passing any required/blank parameter .
C91_TXN_SERVER_FAILURECall back event type when there is server service exception with error code 500 to 599
C91_TXN_SCREEN_INITIALISEDCalled when the server-side ATM pin changes OTP screen loads successfully.
C91_TXN_API_FAILURECalled when the server-side api failed.