indian_pay 0.0.2 copy "indian_pay: ^0.0.2" to clipboard
indian_pay: ^0.0.2 copied to clipboard

A Flutter plugin that enables seamless integration of Indian payment gateways including Payin, Payout, and transaction status APIs with clean UI components.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

import 'utils/routes/routes.dart';
import 'utils/routes/routes_name.dart';
import 'view_model/payin_status_view_model.dart';
import 'view_model/payout_status_view_model.dart';
import 'view_model/payout_view_model.dart';
import 'view_model/pyin_view_model.dart';



double height = 0.0;
double width = 0.0;

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return LayoutBuilder(
      builder: (context, constraints) {
        height = constraints.maxHeight;
        width = constraints.maxWidth;
        return MultiProvider(
          providers: [
            ChangeNotifierProvider(create: (_) => PayinViewModel()),
            ChangeNotifierProvider(create: (_) => PayoutViewModel()),
            ChangeNotifierProvider(create: (_) => PayinStatusViewModel()),
            ChangeNotifierProvider(create: (_) => MerchantPayoutHistoryViewModel()),




          ],
          child:const MaterialApp(
          debugShowCheckedModeBanner: false,
          home: PayinDemoScreen(),
        ),
        );
      },
    );
  }
}

class PayinDemoScreen extends StatelessWidget {
  const PayinDemoScreen({super.key});

  @override
  Widget build(BuildContext context) {
    final payinVM = Provider.of<PayinViewModel>(context);

    return Scaffold(
      appBar: AppBar(
        title: const Text("IndianPay SDK Demo"),
        backgroundColor: Colors.blue,
      ),
      body: Stack(
        children: [
          Center(
            child: ElevatedButton(
              onPressed: () {
                payinVM.payinApi(
                  "ORDER123",
                  "100",
                  "Demo User",
                  "[email protected]",
                  "9999999999",
                  "SDK Test",
                  context,
                );
              },
              child: const Text("Pay Now"),
            ),
          ),
          if (payinVM.isLoading)
            const Center(child: CircularProgressIndicator()),
        ],
      ),
    );
  }
}
0
likes
0
points
20
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin that enables seamless integration of Indian payment gateways including Payin, Payout, and transaction status APIs with clean UI components.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_web_plugins, http, plugin_platform_interface, web

More

Packages that depend on indian_pay

Packages that implement indian_pay