payStackPayment static method
Future<void>
payStackPayment({
- required BuildContext context,
- required String secretKey,
- required String customerEmail,
- required int amount,
- String currency = "NGN",
- String? callbackUrl,
- String paymentGatewayName = "Paystack",
- bool testMode = false,
- dynamic onShowToast()?,
- dynamic onPaymentSuccess()?,
- dynamic onPaymentFailure()?,
PayStack Payment
Implementation
static Future<void> payStackPayment({
required BuildContext context,
required String secretKey,
required String customerEmail,
required int amount,
String currency = "NGN",
String? callbackUrl,
String paymentGatewayName = "Paystack",
bool testMode = false,
Function()? onShowToast,
Function()? onPaymentSuccess,
Function()? onPaymentFailure,
}) {
return PaystackService.openPaystack(
context: context,
secretKey: secretKey,
customerEmail: customerEmail,
amount: amount,
currency: currency,
callbackUrl: callbackUrl,
paymentGatewayName: paymentGatewayName,
testMode: testMode,
onShowToast: onShowToast,
onPaymentSuccess: onPaymentSuccess,
onPaymentFailure: onPaymentFailure,
);
}