fastpay_iraq 1.0.3 copy "fastpay_iraq: ^1.0.3" to clipboard
fastpay_iraq: ^1.0.3 copied to clipboard

discontinuedreplaced by: fastpay_merchant
PlatformAndroidiOS

FastPay Iraq Flutter Plugin for Android and iOS to integrate FastPay payment gateway in your app.

example/lib/main.dart

import 'dart:async';

import 'package:fastpay_iraq/fastPayRequests.dart';
import 'package:flutter/material.dart';

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

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  FastpayResult? _fastpayResult;

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    if (!mounted) return;
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
          appBar: AppBar(
            title: const Text('Plugin example app'),
          ),
          body: Column(
            children: [
              Center(
                child: Text("${_fastpayResult?.toJson()}\n"),
              ),
              ElevatedButton(
                onPressed: () async {
                  FastpayResult _fastpayResult = await FastPayRequest(
                    // storeID: "0000000",
                    // storePassword: "000000",
                    // amount: "10000",

                    storeID: "748908_339",
                    storePassword: "R3D)BYN;w",
                    amount: "250",

                    orderID: DateTime.now().microsecondsSinceEpoch.toString(),
                    isProduction: false,
                  );
                  if (_fastpayResult.isSuccess ?? false) {
                    // transaction success
                    print('transaction success');
                  } else {
                    // transaction failed
                    print('transaction failed');
                  }
                  setState(() {});
                },
                child: Text("Pay"),
              ),
            ],
          )),
    );
  }
}
12
likes
110
pub points
40%
popularity

Publisher

unverified uploader

FastPay Iraq Flutter Plugin for Android and iOS to integrate FastPay payment gateway in your app.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on fastpay_iraq