zolozkit_for_flutter 1.0.1 copy "zolozkit_for_flutter: ^1.0.1" to clipboard
zolozkit_for_flutter: ^1.0.1 copied to clipboard

The plugin for inject to zoloz sdk

zolozkit_for_flutter #

The plugin for inject to zoloz sdk

Getting Started #

Depend on it #

Run this command:

With Flutter:

flutter pub add zolozkit_for_flutter

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

dependencies:
  zolozkit_for_flutter: ^1.0.0

With iOS project support, you need to configure the private spec in ios/Podfile:

source 'https://github.com/zoloz-pte-ltd/zoloz-demo-ios'

Import it #

Now in your Dart code, you can use:

import 'package:zolozkit_for_flutter/zolozkit_for_flutter.dart';

Get Meta Info #

Use the ZolozkitForFlutter class and its variable metaInfo to get the meta information about the ZOLOZ SDK and the user's device. The meta information is used to initialize a transaction later.

var metaInfo = await ZolozkitForFlutter.metaInfo;

Initialize a transaction #

Send a request that contains the meta information to your (merchant) server to initialize a transaction. Then your (merchant) server needs to call the initialize API to obtain the client configuration and return it to your (merchant) application. see: Server-side integration

Start the transaction flow #

start the transaction flow by calling the start method with the clientCfg and bizCfg, You also need to override the callback functions to handle the transaction result.

await ZolozkitForFlutter.start(
    "clientCfg",
    {},
    (String retCode, Map<String, String>? extInfo) {
        print("onInterrupted:$retCode, $extInfo");
    },
    (String retCode, Map<String, String>? extInfo) {
        print("onComplete:$retCode, $extInfo");
    },
);
2
likes
0
pub points
78%
popularity

Publisher

unverified uploader

The plugin for inject to zoloz sdk

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on zolozkit_for_flutter