getepay_pg_kit 1.0.8
getepay_pg_kit: ^1.0.8 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(
debugShowCheckedModeBanner: false,
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,
email: '',
name: '',
mobile: 0,
txnType: '', //if you are not using multi payment use 'single' else 'multi'
paymentMode: '', // ALL, cc, dc, nb, upi
currency: '',
udf4: '',
udf5: '',
udf6: '', // product code for multi payments
udf7: '',
udf8: '',
udf9: '',
udf10: '',
transactionDate: '', //'yyyy/MM/dd'
merchantTransactionId: '',
productType: '', //'IPG'
txnNote: '',
callbackUrl: '',
onError: (PgInvoiceResponse error) {
debugPrint('onError: \$error');
},
onSuccess: (PgInvoiceResponse success) {
debugPrint('onSuccess: \$success');
},
test: true,
ru: '',
pgIv: '',
pgKey: '',
child: Center(child: const Icon(Icons.paypal)),
),
),
);
}
}