FLUTTER ECOSYSTEM

binemmanuel/flutter_paystack_max

Paystack 결제 게이트웨이(https://paystack.com)를 통해 결제하는 데 사용할 수 있는 Flutter 패키지입니다. Android 및 iOS와 호환됩니다(은행, 은행 송금, 카드, USSD, 모바일 머니, QR 및 EFT)

flutter_paystack_max 프로젝트 이미지
Stars
15
Forks
10
최근 푸시(UTC)
2025. 2. 12.
프로젝트 상태
활성
Bin Emmanuel GitHub avatar
GITHUB User

Bin Emmanuel ↗

As a software engineer, I am passionate about developing efficient and effective solutions to complex problems.

SoftkodesGwainpa, Abuja, Nigeria 공식 웹사이트 ↗
언어DartRubySwiftKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 7 개

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

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

:heavy_check_mark: All Paystack supported payment methods/channels

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

:heavy_check_mark: Verifying Transactions

Supported Platforms

  • Android and
  • iOS

Prerequisites

  • Paystack secret key
  • Callback URL

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(initializedTransaction.message),
    ));

    return;
}
  1. Open the payment modal to accept payment
final response = await PaymentService.showPaymentModal(
    context,
    transaction: initializedTransaction,
    // Callback URL must match the one specified on your paystack dashboard,
    callbackUrl: '...'
).then((_) async {
    return await PaymentService.verifyTransaction(
        paystackSecretKey: '...',
        initializedTransaction.data?.reference ?? request.reference,
    );
});

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

Additional information

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

:pencil: Contributing, :disappointed: Issues and :bug: 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.