paytm_payments 0.3.1

paytm_payments #

Paytm Payments Flutter SDK

Usage #

Example

To use this package :

  • add the dependency to your pubspec.yaml file.
  dependencies:
    flutter:
      sdk: flutter
    paytm_payments:
  • add following permissions to you AndroidManifest.xml file.
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="xyz.ajax.paytm_payments_example">
    
        <!-- Include these permissions in your manifest file -->
        <uses-permission android:name="android.permission.INTERNET"/>
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
        <uses-permission android:name="android.permission.READ_SMS"/>
        <uses-permission android:name="android.permission.RECEIVE_SMS"/>
        
        <application></application>
    </manifest>
  • Host a checksum generation file which will become your checksum URL which is one of the 2 required fields.

See Step- 5 of Paytm Developer Generate Checksum Url For any assistance with this step mail me at the give email address.

You may use the url with MID provided in example app to test the working of paytm staging environment. Note that you are supposed to use test credentials with the staging setup for loggin into paytm.

Test Credentials:

Number: 7777777777
OTP: 489871

License #

Copyright 2019 Apoorv Jain

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Getting Started #

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

0.0.1 #

  • Pass Paytm Staging/Production user specific data and setup paytm payments within your app in a minute.

0.1.0 #

  • Tested Staging Environment.
  • Hosted php based checksum Urls. Example call to 'makePaytmPayment' works with default values too.

0.2.0 #

  • Production environment fixed and tested
  • Now generate random customer and order IDs too.

0.2.1 #

  • Option to disable Transaction Response Toast message added.
  • Method Channel call fixed.

0.3.0 #

  • Now you can listen for the transaction status response using 'PaytmPayments.responseStream.listen'.

0.3.1 #

  • Receive complete response object on 'PaytmPayments.responseStream.listen'.
  • Bad State error on setting stream listener fixed.
  • Example code more clear and easy to follow.

example/README.md

paytm_payments_example #

Demonstrates how to use the paytm_payments plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

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


dependencies:
  paytm_payments: ^0.3.1

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:paytm_payments/paytm_payments.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
66
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
83
Learn more about scoring.

We analyzed this package on Aug 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-1 points)

10 out of 10 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/paytm_payments.dart. (-0.50 points)

Analysis of lib/paytm_payments.dart reported 1 hint:

line 12 col 49: Close instances of dart.core.Sink.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
http ^0.12.0+2 0.12.0+2
Transitive dependencies
async 2.3.0
charcode 1.1.2
collection 1.14.11 1.14.12
http_parser 3.1.3
meta 1.1.6 1.1.7
path 1.6.4
pedantic 1.8.0+1
sky_engine 0.0.99
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test