rave plugin for flutterwaves
a flutter plugin for flutterwaves’s rave.
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
- create your rave staging keys from the sandbox environment
- create your rave live keys from the rave dashboard
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 = "[email protected]"
..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.
Comments are closed.