FLUTTER ECOSYSTEM

wilburx9/rave_flutter

一個用於 Flutterwaves 的 rave 的 Flutter 外掛。

rave_flutter 專案封面
Stars
31
Forks
58
最近推送(UTC)
2022年8月28日
專案狀態
未封存
Wilberforce Uwadiegwu  GitHub avatar
GITHUB User

Wilberforce Uwadiegwu ↗

I make computers do things.

MindvalleyEarth
語言DartRubyKotlinSwiftObjective-C

技術主題

使用的依賴

依賴清單 12 項

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

Rave Flutter

build status Coverage Status pub package

https://raw.githubusercontent.com/wilburt/rave_flutter/master/screenshots/payment_methods.png https://raw.githubusercontent.com/wilburt/rave_flutter/master/screenshots/card_payment.png https://raw.githubusercontent.com/wilburt/rave_flutter/master/screenshots/nigerian_bank_payment.png

A robust Flutter plugin for accepting payment on Rave with

  • [x] Card
  • [x] Nigerian Bank Account
  • [x] ACH Payments
  • [x] Mobile money Francophone Africa
  • [x] Mpesa
  • [ ] Ghana Mobile Money
  • [ ] Uganda Mobile Money

Keys

Installation

To use this plugin, add rave_flutter as a dependency in your pubspec.yaml file.

Webview is required so enable PlatformView on iOS by adding:

<key>io.flutter.embedded_views_preview</key>
<true/

to Info.plist file

Making Payment

Instantiate RavePayInitializer and pass it to RavePayManager.prompt along with the BuildContext. The result of the transaction is the Future returned by RavePayManager.initialize

processTransaction() async {
    // Get a reference to RavePayInitializer
    var initializer = RavePayInitializer(
        amount: 500, publicKey: publicKey, encryptionKey: encryptionKey)
      ..country = "NG"
      ..currency = "NGN"
      ..email = "customer@email.com"
      ..fName = "Ciroma"
      ..lName = "Adekunle"
      ..narration = narration ?? ''
      ..txRef = txRef
      ..subAccounts = subAccounts
      ..acceptMpesaPayments = acceptMpesaPayment
      ..acceptAccountPayments = acceptAccountPayment
      ..acceptCardPayments = acceptCardPayment
      ..acceptAchPayments = acceptAchPayments
      ..acceptGHMobileMoneyPayments = acceptGhMMPayments
      ..acceptUgMobileMoneyPayments = acceptUgMMPayments
      ..staging = true
      ..isPreAuth = preAuthCharge
      ..displayFee = shouldDisplayFee;

    // Initialize and get the transaction result
    RaveResult response = await RavePayManager()
        .prompt(context: context, initializer: initializer);
  }

Documentation

Documentation can be found here.

Contributing, Issues and Bug Reports

The project is open to public contribution. Please feel very free to contribute. Experienced an issue or want to report a bug? Please, report it here. Remember to be as descriptive as possible.