flutter_razorpay_sdk 0.1.4 copy "flutter_razorpay_sdk: ^0.1.4" to clipboard
flutter_razorpay_sdk: ^0.1.4 copied to clipboard

A Flutter plugin to integrate razorpay payment SDK. Supports iOS and Android.

💳 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.
3
likes
40
pub points
0%
popularity

Publisher

unverified uploader

A Flutter plugin to integrate razorpay payment SDK. Supports iOS and Android.

Repository (GitHub)
View/report issues

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_razorpay_sdk