flutter_paystack_max 1.0.1 copy "flutter_paystack_max: ^1.0.1" to clipboard
flutter_paystack_max: ^1.0.1 copied to clipboard

A Flutter package for making payments via Paystack Payment Gateway (https://paystack.com).

A Flutter package for making payments via Paystack Payment Gateway (https://paystack.com)

pub.dev likes popularity pub points

Pay with card Pay with mobile money

Features #

✔️ All Paystack supported payment methods/channels

  • Mobile Money
  • Card
  • USSD
  • Bank Transfer
  • Bank
  • QR
  • EFT

✔️ Verifying Transactions

Supported Platforms #

  • Android and
  • iOS

No configuration required for this package works out of the box.

Usage #

  1. Create a transaction request object.
final request = PaystackTransactionRequest(
    reference: '...',
    secretKey: '....',
    email: '...',
    amount: 15 * 100,
    currency: PaystackCurrency.ngn,
    channel: [
        PaystackPaymentChannel.mobileMoney,
        PaystackPaymentChannel.card,
        PaystackPaymentChannel.ussd,
        PaystackPaymentChannel.bankTransfer,
        PaystackPaymentChannel.bank,
        PaystackPaymentChannel.qr,
        PaystackPaymentChannel.eft,
    ],
);
  1. Initialize the transaction with the above transaction request.
final initializedTransaction = await PaymentService.initializeTransaction(request);

if (!initializedTransaction.status) {
    ScaffoldMessenger.of(context).showSnackBar(SnackBar(
        backgroundColor: Colors.red,
        content: Text(transactionResponse.message),
    ));

    return;
}
  1. Open the payment modal to accept payment
PaymentService.showPaymentModal(
    context,
    transaction: transactionResponse,
).then((_) async {
    final response = await PaymentService.verifyTransaction(
        paystackSecretKey: Const.paystackSecretKey,
        transactionResponse.data?.reference ?? transactionRequest.reference,
    );

    print(response); // Result of the confirmed payment
});

Additional information #

Visit the paystack documentation for more information https://paystack.com/docs/api/transaction

📝 Contributing, 😞 Issues and 🐛 Bug Reports #

This project is open to contributions.
Please feel very free to help improve the payment experience on Flutter.
Experienced an issue or want to report a bug? Please, report it here.

15
likes
0
pub points
85%
popularity

Publisher

verified publisherbinemmanuel.com

A Flutter package for making payments via Paystack Payment Gateway (https://paystack.com).

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http, webview_flutter

More

Packages that depend on flutter_paystack_max