paytm 0.0.5

paytm #

A Flutter plugin to use the Paytm as a gateway for accepting online paymnets in Flutter app.

Getting Started #

Screenshot_20190601-141441(1) Screenshot_20190601-141512

Testing Credentials: #

MID : ParloS79006455919746

CHANNEL_ID: WAP

INDUSTRY_TYPE_ID: Retail

WEBSITE: APPSTAGING

PAYTM_MERCHANT_KEY: 380W#7mf&_SpEgsy

Lets’s begin #

You can start paytm transaction following two steps:

1. Generate CheckSum: #

You have to setup CheckSum Generation on your server ideally. But for testing purpose you can use the below api and request it and it will provide you checksum for your transaction.

CheckSum Generation URL: https://us-central1-mrdishant-4819c.cloudfunctions.net/generateCheckSum

Parameters to be passed: (Using flutter http package)

final response = await http.post(url, headers: {
  "Content-Type": "application/x-www-form-urlencoded"
}, body: {
  "mid": "ParloS79006455919746",
  "CHANNEL_ID": "WAP",
  'INDUSTRY_TYPE_ID': 'Retail',
  'WEBSITE': 'APPSTAGING',
  'PAYTM_MERCHANT_KEY': '380W#7mf&_SpEgsy',
  'TXN_AMOUNT': '10',
  'ORDER_ID': orderId,
  'CUST_ID': '122',
});

Replace the values with merchant account your values , and in response you will get checksum.

var checksum = response.body;

2. Start Payment: #

Callback Url:

For Testing(Stagging) use this: https://securegw-stage.paytm.in/theia/paytmCallback?ORDER_ID=

For Production(Stagging) use this: https://securegw.paytm.in/theia/paytmCallback?ORDER_ID=

var paytmResponse = Paytm.startPaytmPayment(
    true,
    "ParloS79006455919746",
    orderId,
    "122",
    "WAP",
    "10",
    'APPSTAGING',
    callBackUrl,
    'Retail',
    response.body);

paytmResponse.then((value) {
  setState(() {
    payment_response = value.toString();
  });
});

Parameters are like as per given below

1.Testing (Staging or Production) if true then Stagging else Production

2.MID provided by paytm

3.ORDERID your system generated order id

4.CUSTOMER ID

5.CHANNEL_ID provided by paytm

6.AMOUNT

7.WEBSITE provided by paytm

8.CallbackURL (As discussed above)

9.INDUSTRY_TYPE_ID provided by paytm

10.checksum generated now

For Cloning the example app code visit: Paytm Plugin

For detailed usage visit : Paytm Medium Post

For any query : Mail me at mr.dishantmahajan@gmail.com

0.0.5 #

  • TODO: Bug Fixes.

0.0.4 #

  • TODO: ANDROID X Support added.

0.0.3 #

  • TODO: ANDROID X Support added.

0.0.2 #

  • TODO: Bug Fixes.

0.0.1 #

  • TODO: Paytm as a payment gateway in your flutter app.

example/README.md

paytm_example #

Demonstrates how to use the paytm plugin.

Getting Started #

Use this package as a library

1. Depend on it

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


dependencies:
  paytm: ^0.0.5

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

We analyzed this package on Jul 15, 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.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-1 points)

5 out of 5 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.

Maintenance suggestions

The package description is too short. (-20 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.

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8

Admin