flutter_razorpay_sdk 0.1.3

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

💳 Razorpay Plugin for flutter #

A Flutter plugin to integrate razorpay SDK for Android and iOS.

Features #

  • [x] Android and iOS

    • [x] Credit Card, Netbanking Payment
    • [x] Wallet payment
    • [x] All supported payment options with your account

Screenshots #

Show some ❤️ and star the repo to support the project

  • Please note this is a plugin only. This plugin has used the Android SDK. Note: This plugin is still under development. Feedback and Pull Requests are most welcome!

Instaling #

To use this plugin :

Add this in pubspec.yaml

  flutter_razorpay_sdk: ^0.1.2

Usage #

To call payment procedure:

import 'package:flutter_razorpay_sdk/flutter_razorpay_sdk.dart';

Future<Null> _showNativeView() async {
    String apiKey = "API_KEY_HERE";
    Map<String, String> notes = new Map();
    notes.putIfAbsent('billing_address', () => "Somewhere on earth");
    notes.putIfAbsent('shipping_address', () => "Somewhere near India");

    Map<String, dynamic> options = new Map();
    options.putIfAbsent("name", () => "Laptop");
    options.putIfAbsent("image", () => "https://s3.amazonaws.com/rzp-mobile/images/rzp.png"); // optional arguement
    options.putIfAbsent("description", () => "Testing razorpay transaction");
    options.putIfAbsent("amount", () => "100");
    options.putIfAbsent("email", () => "test@gmail.com");
    options.putIfAbsent("contact", () => "+919825123456");

    // additional notes support. https://docs.razorpay.com/docs/notes
    options.putIfAbsent("notes", () => notes);

    options.putIfAbsent("theme", () => "#4D68FF"); // optional arguement
    options.putIfAbsent("api_key", () => apiKey);

    Map<dynamic,dynamic> paymentResponse = new Map();
    paymentResponse = await FlutterRazorpaySdk.openPaymentDialog(options);
    print("response $paymentResponse");
  }

Response :

 {"code": 0, "message": "Payment Cancelled"}

or

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

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

Created & Maintained By

Vijay Rathod

If you found this plugin helpful and want to thank me, consider buying me a cup of ☕

License #

Copyright 2018 seven-re.com

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.

0.1.3 #

example/README.md

flutter_razorpay_sdk_example #

Demonstrates how to use the flutter_razorpay_sdk 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:
  flutter_razorpay_sdk: ^0.1.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:flutter_razorpay_sdk/flutter_razorpay_sdk.dart';
  
Version Uploaded Documentation Archive
0.1.4 Jan 1, 2019 Go to the documentation of flutter_razorpay_sdk 0.1.4 Download flutter_razorpay_sdk 0.1.4 archive
0.1.3 Dec 28, 2018 Go to the documentation of flutter_razorpay_sdk 0.1.3 Download flutter_razorpay_sdk 0.1.3 archive
0.1.2 Dec 28, 2018 Go to the documentation of flutter_razorpay_sdk 0.1.2 Download flutter_razorpay_sdk 0.1.2 archive
0.1.1 Dec 27, 2018 Go to the documentation of flutter_razorpay_sdk 0.1.1 Download flutter_razorpay_sdk 0.1.1 archive
0.1.0 Dec 27, 2018 Go to the documentation of flutter_razorpay_sdk 0.1.0 Download flutter_razorpay_sdk 0.1.0 archive
0.0.2 Dec 27, 2018 Go to the documentation of flutter_razorpay_sdk 0.0.2 Download flutter_razorpay_sdk 0.0.2 archive
0.0.1 Sep 22, 2018 Go to the documentation of flutter_razorpay_sdk 0.0.1 Download flutter_razorpay_sdk 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
66
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
95
Overall:
Weighted score of the above. [more]
82
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 suggestions

Format lib/flutter_razorpay_sdk.dart.

Run flutter format to format lib/flutter_razorpay_sdk.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