zolozkit_for_flutter

Creator: coderz1093

Last updated:

0 purchases

zolozkit_for_flutter Image
zolozkit_for_flutter Images
Add to Cart

Description:

zolozkit for flutter

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
copied to clipboard
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.1.8
copied to clipboard
With iOS project support, you need to configure the private spec in ios/Podfile:
source 'https://github.com/zoloz-pte-ltd/zoloz-demo-ios'
copied to clipboard
Import it #
Now in your Dart code, you can use:
import 'package:zolozkit_for_flutter/zolozkit_for_flutter.dart';
copied to clipboard
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;
copied to clipboard
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<Object?, Object?>? extInfo) {
print("onInterrupted:$retCode, $extInfo");
},
(String retCode, Map<Object?, Object?>? extInfo) {
print("onCompleted:$retCode, $extInfo");
},
);
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.