atompaynetz 0.0.3

  • Readme
  • Changelog
  • Installing
  • 70

Atom Paynetz for Flutter Integration #

This is a helper class for Flutter Application to generate atom paynetz payment URL.

Getting Started #

Download the package from pub.dev,

Add this to dependencies in your app's pubspec.yml

atompaynetz: ^0.0.3

Usage #

Sample code to integrate can be found in example/lib/main.dart.

Import package

import 'package:atompaynetz/atompaynetz.dart';

Create AtomPaynetz instance

Create the instance and pass the mandatory parameters.

getUrl (){
    var atompay = new AtomPaynetz( 
                login:'197',
                pass:'Test@123',
                prodid:'NSE',
                amt:'100.00',
                date:'02/06/2020 16:50:00',
                txnid:'123',
                custacc:'0',
                requesthashKey:'KEY123657234',
                responsehashKey:'KEYRESP123657234',
                mode:'uat'
              );
            
      var urlToSend =  atompay.getUrl();
      return urlToSend;
  }

It will return the URL and you can open the URL in WebView using:

import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';

Getting Response From Webview

 @override
  void initState() {
    super.initState();
    flutterWebViewPlugin.onUrlChanged.listen((String url) {
     
  
             print(url);
      
      if (url.contains('/response.php')) {
        
         var substringfromurl = url.substring(0,url.indexOf('?'));
         var urlarray = substringfromurl.split('&').map((String text) => Text(text)).toList();
         print(urlarray);
            //  var atompay = new AtomPaynetz( 
            //     login:'197',
            //     pass:'Test@123',
            //     prodid:'NSE',
            //     amt:'100.00',
            //     date:'02/06/2020 16:50:00',
            //     txnid:'123',
            //     custacc:'0',
            //     requesthashKey:'KEY123657234',
            //     responsehashKey:'KEYRESP123657234',
            //     mode:'uat'
            //   );
              // var validate =  atompay.validateSignature(
              //                     mmp_txn,
              //                     mer_txn,
              //                     f_code,
              //                     prod,
              //                     discriminator,
              //                     amt,
              //                     bank_txn,
              //                     signature
              //                   );
        flutterWebViewPlugin.close();
       
      }
    });

  }

[0.0.1] - TODO: Add release date. #

  • TODO: Describe initial release.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  atompaynetz: ^0.0.3

2. 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.

3. Import it

Now in your Dart code, you can use:


import 'package:atompaynetz/atompaynetz.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
50
Health:
Code health derived from static analysis. [more]
97
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
78
Overall:
Weighted score of the above. [more]
70
Learn more about scoring.

We analyzed this package on Jul 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.15
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

Because:

  • atompaynetz that is a package requiring null.

Health issues and suggestions

Document public APIs. (-1 points)

20 out of 20 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/atompaynetz.dart. (-1.99 points)

Analysis of lib/atompaynetz.dart reported 4 hints:

line 59 col 4: Name non-constant identifiers using lowerCamelCase.

line 60 col 5: Name non-constant identifiers using lowerCamelCase.

line 61 col 5: Name non-constant identifiers using lowerCamelCase.

line 65 col 5: Name non-constant identifiers using lowerCamelCase.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and atompaynetz.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

The package description is too short. (-2 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
crypto ^2.1.4 2.1.5
flutter 0.0.0
Transitive dependencies
charcode 1.1.3
collection 1.14.12 1.14.13
convert 2.1.1
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test