Reset ATM PIN Flutter Plugin

Document explain the process of integrating the flutter reset atm pin plugin

Card91 reset atm pin plugin

This package is used to change the ATM pin 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 change the ATM Pin of 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_plugin: (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';

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';


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

  @override
  State<ResetPINWidget> createState() => _ResetWidgetState();
}

class _ResetWidgetState extends State<ResetPINWidget> {

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SingleChildScrollView(
        child: Padding(
          padding: const EdgeInsets.only(top: 60.0),
          child: Container(
            color: Colors.black12,
            height: Get.height,
            width: Get.width,
            child: Card91ResetAtmPin(
                cardId: "##@^#^#@^@^",// Provide card holder cardID
                token: "@%%@Y@FYFHFH@GFHH@GH", // Card holder Auth Token
                phoneNumber:"+91-98******12", // Card holder mobile number
                env: "PROD", /// Env. "PROD" for Production "PROD_SANDBOX" for production sandboxox
                onDataResponse:(String response){
                  print("response data-->"+reponse)
                })
            
            ),
          ),
        ),
      ),
    );
  }
}

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.
phoneNumberstringtrueMobile number of the card holder ( format +91-88**23 )
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_RESET_PIN_SUCCESSCalled when the server-side APIs load successfully. At this time, ATM pin change is successfully done.
C91_RESET_PIN_AUTHENTICATION_FAILURECall back event type when client is passing incorrect or expired auth token.
C91_RESET_PIN_MISSING_PARAMETERCall back event type when client is not passing any required/blank parameter .
C91_RESET_PIN_SERVER_FAILURECall back event type when there is server service exception with error code 500 to 599
C91_RESET_PIN_OTP_SCREEN_INITIALISEDCalled when the server-side ATM pin changes OTP screen loads successfully.