getepay_pg_kit 1.0.3
getepay_pg_kit: ^1.0.3 copied to clipboard
PG SDK Kit by Getepay is a lightweight and secure Flutter SDK for seamless integration with the Getepay Payment Gateway. It supports UPI, Google Pay, PhonePe, Paytm, and other payment modes with singl [...]
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:getepay_pg_kit/bin/model/pg_invoice_response.dart';
import 'package:getepay_pg_kit/pg_kit.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Getepay PG SDK Kit Demo',
theme: ThemeData(useMaterial3: true),
home: const PaymentScreen(),
);
}
}
class PaymentScreen extends StatelessWidget {
const PaymentScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Payment Gateway Demo')),
body: Center(
child: PGKit(
terminalId: '',
mid: '',
amount: 0,
name: '',
mobile: 0,
txnType: '',
paymentMode: '',
udf4: '',
udf5: '',
udf6: '',
udf7: '',
udf8: '',
udf9: '',
callbackUrl: '',
child: const Icon(Icons.paypal),
onError: (PgInvoiceResponse error) {
debugPrint('onError: \$error');
},
onSuccess: (PgInvoiceResponse success) {
debugPrint('onSuccess: \$success');
},
test: true,
ru: '',
pgIv: '',
pgKey: '',
),
),
);
}
}