fapshi_pay 0.1.1 copy "fapshi_pay: ^0.1.1" to clipboard
fapshi_pay: ^0.1.1 copied to clipboard

An Unofficial payment sdk for fapshi API for seamless payments. Build with ❤️ for fun and contribution to the open source community!

example/main.dart

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

main() => runApp(const DemoApp());

class DemoApp extends StatelessWidget {
  const DemoApp({super.key});
  @override
  Widget build(BuildContext context) {
    return const MaterialApp(title: 'Fapshi Payment', home: HomePage());
  }
}

class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Padding(
          padding: const EdgeInsets.symmetric(horizontal: 20),
          child: FapshiPay(
            env: AppEnv.dev,
            sandboxApiKey: '',
            sandboxApiUser: '',
            liveApiKey: '',
            liveApiUser: '',
            title: "Pay now",
            amount: 3000,
            phone: "67xxxxxxxx",
            icon: const Icon(Icons.payment),
            shouldCheckPaymentStatus: true,
            onPayComplete: (paymentResponse) {},
            onCheckPaymentFailed: (paymentResponse) {},
            onCheckPaymentSuccess: (paymentResponse) {},
          ),
        ),
      ),
    );
  }
}
2
likes
140
points
13
downloads

Publisher

verified publisheryunweneric.com

Weekly Downloads

An Unofficial payment sdk for fapshi API for seamless payments. Build with ❤️ for fun and contribution to the open source community!

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

bloc, dio, flutter, flutter_bloc, json_annotation, json_serializable

More

Packages that depend on fapshi_pay