搜尋套件、儲存庫與 APP 分類

套件詳情v1.0.6

flutter_paystack_max

一個用於透過 Paystack 支付網關(https://paystack.com)進行支付的 Flutter 套件。

AndroidiOSmacOS
近 30 天下載
216
喜歡數
26
Pub 分數
160

安裝套件

flutter pub add flutter_paystack_max

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個 Flutter 套件,可實現與 Paystack 支付網關在 Android、iOS 與 macOS 上的無縫整合。它提供簡單的 API 來處理支付流程,包含信用卡支付、銀行轉帳與行動錢包。此套件支援測試與正式環境,讓開發與部署安全的支付解決方案變得輕鬆。專為尋求可靠且文件齊全的工具,以在非洲市場及更廣泛地區接受付款的開發者設計。

適用情境

  • 將 Paystack 支付整合到 Flutter 應用中
  • 處理信用卡和銀行付款
  • 啟用行動金錢交易
  • 支援測試和即時支付模式
  • 建構電子商務應用程式

主要特色

  • 原生 Paystack SDK 集成
  • 支援多種支付方式
  • 環境配置(測試/生產)
  • 易於使用的付款對話方塊
  • 跨平台相容性(Android、iOS、macOS)

適合對象

  • Flutter 開發人員建構電商應用
  • 接受非洲支付的初創公司
  • 需要安全支付處理的應用程式
  • 使用 Paystack 作為網關的開發人員
  • 需要多平台支付支援的專案

使用建議

  • 需要有效的 Paystack 帳戶和 API 金鑰
  • 需要正確處理支付成功/失敗回調
  • 可能需要額外的後端驗證
  • 不適用於非Paystack支付提供者
  • iOS 設定可能需要額外的設定步驟

原始 README

以下為關聯原始碼儲存庫的 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.

所屬分類

依賴

依賴清單 3 項

原始碼儲存庫

使用此套件的專案