Skip to content
A flutter plugin to use Razorpay payment SDK for ios and android
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
android bumping v0.1.3 Dec 28, 2018
example
ios
lib
out/production/flutter_razorpay_sdk
.gitignore
1.PNG
2.PNG
3.PNG
CHANGELOG.md
LICENSE
README.md
flutter_razorpay_sdk.iml
flutter_razorpay_sdk_android.iml
pubspec.yaml

README.md

💳 Razorpay Plugin for flutter

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

Features

  • Android and iOS

    • Credit Card, Netbanking Payment
    • Wallet payment
    • 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.4

Note

iOS setup

For iOS you will need to install the followings.

  • Swift 4.2
  • Xcode 10 or above

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.
You can’t perform that action at this time.