korapay 0.0.3
korapay: ^0.0.3 copied to clipboard
This Flutter plugin allows users to make secure payments via bank transfer or card effortlessly. Simply use the secret key provided by Korapay to enable smooth and reliable transactions within your app.
import 'dart:developer';
import 'package:flutter/material.dart'; import 'package:korapay/korapay.dart';
void main() { runApp(const MyApp()); }
class MyApp extends StatelessWidget { const MyApp({super.key});
// This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( title: 'Pay With Kora', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue), useMaterial3: true, ), home: const MyHomePage(title: 'Pay With Kora'), ); } }
class MyHomePage extends StatefulWidget { const MyHomePage({super.key, required this.title});
final String title;
@override State
class _MyHomePageState extends State
PayWithKora().now(
context: context,
secretKey: "sk_test_j9KBpCCF5Sz3i21YYYLswHe4DLKNLdvWZ......."
customerEmail: "amadipromise07@gmail.com",
reference: uniqueTransRef,
currency: "NGN",
amount: 1000.00,
transactionCompleted: () {
print("Transaction Successful");
},
transactionNotCompleted: () {
print("Transaction Not Successful!");
},
paymentChannel: ["card", "bank_transfer", "pay_with_bank"],
customerName: 'Promise Amadi',
callbackUrl: 'https://www.korahq.com');
},
),
),
);
} }