paytmpayments_customuisdk 1.0.0 copy "paytmpayments_customuisdk: ^1.0.0" to clipboard
paytmpayments_customuisdk: ^1.0.0 copied to clipboard

Flutter plugin for Paytm Payments custom ui sdk

paytmpayments_customuisdk #

Use this package as a library #

  1. Depend on it
Add this to your package's pubspec.yaml file:

dependencies:
  paytmpayments_customuisdk: ^1.0.0
  1. Install it
You can install packages from the command line:

with Flutter:

$ flutter pub get
Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.
  1. Import it
Now in your Dart code, you can use:

import 'package:paytmpayments_customuisdk/paytmpayments_customuisdk.dart';
  1. Call transaction method as sample below

    void getUpiIntentList() {
        PaytmPaymentsCustomUiSDK().getUpiIntentList().then((value) {
        print(value);
        setState(() {
            upiAppList = UpiAppList.fromJson(value);
        });
        }).catchError((onError) {
        if (onError is PlatformException) {
            Utils.showMessage(context,
                "${onError.message.toString()} \n  ${onError.details.toString()}");
        } else {
            Utils.showMessage(context, onError.toString());
        }
        });
    }

    void goForUpiIntentTransaction(String appName) {
        PaytmPaymentsCustomUiSDK().goForUpiIntentTransaction(appName, paymentFlow).then((value) {
        print(value);
        Utils.showMessage(context, value.toString(), true);
        }).catchError((onError) {
        if (onError is PlatformException) {
            Utils.showMessage(context,
                "${onError.message.toString()} \n  ${onError.details.toString()}");
        } else {
            Utils.showMessage(context, onError.toString());
        }
        });
    }
0
likes
140
points
118
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter plugin for Paytm Payments custom ui sdk

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on paytmpayments_customuisdk

Packages that implement paytmpayments_customuisdk