Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

flutter flutter logo razorpay gateway plugin

a flutter plugin for razorpay gateway integration for both android and ios.

installing

add this in pubspec.yaml

  razorpay_plugin: ^0.0.2

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", () => "[email protected]");
    options.putifabsent("contact", () => "9988776655");
    //must be a valid html color.
    options.putifabsent("theme", () => "#ff0000");
    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 successful message will contain the payment_id from razorpay.

demo app

integrate razorpay gateway (2os)

download the full project for this post from the following button

this source is fully free for all time

download as zip


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Comments are closed.