razorpay_plugin 0.2.9

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 90

Flutter Razorpay Plugin #

image

A flutter plugin for razorpay integration for both android and ios.

If you use this library in your app, please let me know and I'll add it to the list. #

Installing #

Add this in pubspec.yaml

  razorpay_plugin: ^0.2.6

Using #

import 'package:razorpay_plugin/razorpay_plugin.dart';
  startPayment() async {
    Map<String, dynamic> options = new Map();
    options.putIfAbsent("name", () => "Razorpay T-Shirt");
    options.putIfAbsent("image", () => "https://www.73lines.com/web/image/12427");
    options.putIfAbsent("description", () => "This is a real transaction");
    options.putIfAbsent("amount", () => "100");
    options.putIfAbsent("email", () => "test@testing.com");
    options.putIfAbsent("contact", () => "9988776655");
    //Must be a valid HTML color.
    options.putIfAbsent("theme", () => "#FF0000");
    //Notes -- OPTIONAL
    Map<String, String> notes = new Map();
    notes.putIfAbsent('key', () => "value");
    notes.putIfAbsent('randomInfo', () => "haha");
    options.putIfAbsent("notes", () => notes);
    options.putIfAbsent("api_key", () => "API_KEY_HERE");
    Map<dynamic,dynamic> paymentResponse = new Map();
    paymentResponse = await Razorpay.showPaymentForm(options);
    print("response $paymentResponse");

}

Response :

 {"code": 0, "message": "payment cancelled by user"}

or

 {"code": 1, "message": "rpz_asdw23axd223s"}

If payment is sucessfull message will contain the payment_id from razorpay.

Demo app #

Apps using this library #

  • Worth It - Best Deals, Offers & Discounts Android | iOS

0.0.1 #

  • TODO: Describe initial release.

example/README.md

razorpay_plugin_example #

Demonstrates how to use the razorpay_plugin plugin.

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

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


dependencies:
  razorpay_plugin: ^0.2.9

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:razorpay_plugin/razorpay_plugin.dart';
  
Version Uploaded Documentation Archive
0.2.9 Apr 28, 2019 Go to the documentation of razorpay_plugin 0.2.9 Download razorpay_plugin 0.2.9 archive
0.2.6 Mar 22, 2019 Go to the documentation of razorpay_plugin 0.2.6 Download razorpay_plugin 0.2.6 archive
0.2.5 Feb 16, 2019 Go to the documentation of razorpay_plugin 0.2.5 Download razorpay_plugin 0.2.5 archive
0.2.4 Feb 16, 2019 Go to the documentation of razorpay_plugin 0.2.4 Download razorpay_plugin 0.2.4 archive
0.2.3 Feb 1, 2019 Go to the documentation of razorpay_plugin 0.2.3 Download razorpay_plugin 0.2.3 archive
0.2.2 Jan 6, 2019 Go to the documentation of razorpay_plugin 0.2.2 Download razorpay_plugin 0.2.2 archive
0.2.1 Jan 6, 2019 Go to the documentation of razorpay_plugin 0.2.1 Download razorpay_plugin 0.2.1 archive
0.2.0 Jan 6, 2019 Go to the documentation of razorpay_plugin 0.2.0 Download razorpay_plugin 0.2.0 archive
0.0.3 Nov 8, 2018 Go to the documentation of razorpay_plugin 0.0.3 Download razorpay_plugin 0.0.3 archive
0.0.2 Nov 8, 2018 Go to the documentation of razorpay_plugin 0.0.2 Download razorpay_plugin 0.0.2 archive

All 11 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
83
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
95
Overall:
Weighted score of the above. [more]
90
Learn more about scoring.

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

  • Dart: 2.3.2
  • pana: 0.12.18
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-1 points)

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

Format lib/razorpay_plugin.dart.

Run flutter format to format lib/razorpay_plugin.dart.

Maintenance issues and suggestions

Support latest dependencies. (-5 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency.

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