rave_flutter 0.0.5-alpha copy "rave_flutter: ^0.0.5-alpha" to clipboard
rave_flutter: ^0.0.5-alpha copied to clipboard

outdated

A new Flutter plugin for making payment with Flutterwave's rave.

Rave Flutter #

pub package

A robust Flutter plugin for accepting payment on Rave with

  • ✅ Card
  • ❌ Bank Account
  • ❌ 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.initialize 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()
        .initialize(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.

39
likes
0
points
6
downloads

Publisher

verified publisherwilburx9.dev

Weekly Downloads

A new Flutter plugin for making payment with Flutterwave's rave.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

async, dio, equatable, flutter, flutter_svg, get_it, http, intl, meta, tripledes, webview_flutter

More

Packages that depend on rave_flutter