πͺ Instamojo Flutter
A simple Flutter plugin for integrating Instamojo Payment Gateway in your mobile apps. Supports both Android and iOS, with WebView-based checkout for a smooth in-app payment flow.
π Features
π Secure Instamojo payment gateway integration
π³ Accept payments using Instamojo APIs
π WebView-based hosted payment page
π¦ Simple and developer-friendly API
βοΈ Getting Started
Add dependency
π Example Usage
Add this to your pubspec.yaml
:
dependencies:
instamojo_plus: ^0.0.2
Import the package
import 'package:instamojo_flutter/instamojo_flutter.dart';
Initialize API
final paymentRequest = InstamojoPaymentRequest(
purpose: 'Subscription',
amount: double.parse('10'),
buyerName: 'name',
email: 'name@gmail.com',
phone: 'phonenumber',
redirectUrl: 'http://www.example.com/redirect/',
);
π‘ Navigate to the screen it willreturn your respnse
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => PaymentScreen(
clientId: 'clientId',
clientsecret: 'clientsecret',
paymentRequest: paymentRequest,
onPaymentSuccess: (p0) =>
debugprint('Payment Success: $p0'),
onPaymentError: (p0) => debugprint('ΒΈ $p0'),
onPaymentCancel: () => debugprint('Payment Cancelled'),
)),
);
Steps to create CLIENTID and CLIENT SECRET
Step 1: Login to the Instamojo Dashboard.
Step 2:
Click on API&Plugin Section
Step 3:
Scroll Down and click on create credentials
Step 4:
π¬ Feedback & Suggestions
Weβd love to hear your thoughts, feature requests, or bug reports! We offer fast Support
Your feedback helps us improve the package and add features that developers really need.
##Support
If you find this package helpful, consider giving it a β on GitHub!