From 4d9d993d3282deced6b503cf45a31d3de8c9cf34 Mon Sep 17 00:00:00 2001 From: Cornelius Ashley-Osuzoka <59456456+Corvus97@users.noreply.github.com> Date: Sun, 17 Jul 2022 07:37:41 +0100 Subject: [PATCH 1/2] updated developer docs --- README.md | 108 +++++++++++++++++++++++++++--------------------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/README.md b/README.md index 33a2bf1..6b577b0 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,61 @@

- +

-# Flutterwave Flutter Standard SDK +# Flutterwave Flutter SDK (Standard) -## Table of Contents +The Flutter library helps you create seamless payment experiences in your dart mobile app. By connecting to our modal, you can start collecting payment in no time. -- [About](#about) -- [Getting Started](#getting-started) -- [Usage](#usage) -- [Deployment](#deployment) -- [Built Using](#build-tools) -- [References](#references) -- [Support](#support) - -## About -Flutterwave's Flutter SDK is Flutterwave's offical flutter sdk to integrate Flutterwave's [Standard](https://developer.flutterwave.com/docs/flutterwave-standard) payment into your flutter app. It comes with a ready made Drop In UI. +Available features include: +- Collections: Card, Account, Mobile money, Bank Transfers, USSD, Barter. +- Recurring payments: Tokenization and Subscriptions. +- Split payments - +## Table of Contents -## Getting Started +1. [Requirements](#requirements) +2. [Installation](#installation) +3. [Usage](#usage) +4. [Support](#support) +5. [Contribution guidelines](#contribution-guidelines) +6. [License](#license) -These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See [deployment](#deployment) for notes on how to deploy the project on a live system. -See [references](#references) for links to dashboard and API documentation. ## Requirements -- Ensure you have your test (and live) [API keys](https://developer.flutterwave.com/docs/api-keys). - ``` Flutter version >= 1.17.0 Flutterwave version 3 API keys ``` -## Installation Add the dependency +1. Flutterwave for business [API Keys](https://developer.flutterwave.com/docs/integration-guides/authentication) +2. Supported Flutter version >= 1.17.0 + + +## Installation -In your `pubspec.yaml` file add: +1. Add the dependency to your project. In your `pubspec.yaml` file add: `flutterwave_standard: 1.0.2` +2. Run `flutter pub get` -1. `flutterwave_standard: ^1.0.4` -2. run `flutter pub get` - ## Usage -Create a `Flutterwave` instance by calling the constructor `Flutterwave` The constructor accepts a mandatory instance of the following: -the calling `Context` , `publicKey`, `Customer`, `amount`, `currency`, `email`, `fullName`, `txRef`, `isDebug`, `paymentOptions`, and `Customization` . It returns an instance of `Flutterwave` which we then call the `async` method `.charge()` on. +### Initializing a Flutterwave instance + +To create an instance, you should call the Flutterwave constructor. This constructor accepts a mandatory instance of the following: + +- The calling `Context` +- `publicKey` +- `Customer` +- `amount` +- `currency` +- `email` +- `fullName` +- `txRef` +- `isDebug` +- `paymentOptions` +- `Customization` + +It returns an instance of Flutterwave which we then call the async method `.charge()` on. _handlePaymentInitialization() async { final style = FlutterwaveStyle( @@ -86,10 +98,9 @@ the calling `Context` , `publicKey`, `Customer`, `amount`, `currency`, `email`, ); } -### 2. Handle the response +### Handling the response -Calling the `.charge()` method returns a `Future` -of `ChargeResponse` which we await for the actual response as seen above. +Calling the `.charge()` method returns a Future of `ChargeResponse` which we await for the actual response as seen above. @@ -105,45 +116,34 @@ of `ChargeResponse` which we await for the actual response as seen above. // User cancelled } -#### Please note that: -- `ChargeResponse` can be null, depending on if the user cancels - the transaction by pressing back. -- You need to check the status of the transaction from the instance of `ChargeResponse` returned from calling `.charge()`, the `status`, `success` and `txRef` are successful and correct before providing value to the customer +#### Note -> **PLEASE NOTE** + 1. `ChargeResponse` can be null if a user cancels the transaction by pressing back. + 2. You need to confirm the transaction is succesful. Ensure that the txRef, amount, and status are correct and successful. Be sure to [verify the transaction details](https://developer.flutterwave.com/docs/verifications/transaction) before providing value. -> We advise you to do a further verification of transaction's details on your server to be sure everything checks out before providing service. - +## Support -##Testing -`pub run test` +For additional assistance using this library, contact the developer experience (DX) team via [email](mailto:developers@flutterwavego.com) or on [slack](https://bit.ly/34Vkzcg). -## Debugging Errors -We understand that you may run into some errors while integrating our library. You can read more about our error messages [here](https://developer.flutterwave.com/docs/integration-guides/errors). +You can also follow us [@FlutterwaveEng](https://twitter.com/FlutterwaveEng) and let us know what you think 😊. -For `authorization` and `validation` error responses, double-check your API keys and request. If you get a `server` error, kindly engage the team for support. - -## Support For additional assistance using this library, contact the developer experience (DX) team via [email](mailto:developers@flutterwavego.com) or on [slack](https://bit.ly/34Vkzcg). +## Contribution guidelines -You can also follow us [@FlutterwaveEng](https://twitter.com/FlutterwaveEng) and let us know what you think 😊 +Read more about our community contribution guidelines [here](/CONTRIBUTING). -## Contribution guidelines -Read more about our community contribution guidelines [here](https://www.notion.so/flutterwavego/Community-contribution-guide-ca1d8a876ba04d45ab4b663c758ae42a). ## License -By contributing to the Flutter library, you agree that your contributions will be licensed under its [MIT license](https://opensource.org/licenses/MIT). + +By contributing to the Flutter library, you agree that your contributions will be licensed under its [MIT license](/LICENSE). + +Copyright (c) Flutterwave Inc. + ## Built Using + - [flutter](https://flutter.dev/) - [http](https://pub.dev/packages/http) - [flutter_inappwebview](https://pub.dev/packages/flutter_inappwebview) - [fluttertoast](https://pub.dev/packages/fluttertoast) - - -## Flutterwave API References - -- [Flutterwave API Doc](https://developer.flutterwave.com/docs) -- [Flutterwave Inline Payment Doc](https://developer.flutterwave.com/docs/flutterwave-inline) -- [Flutterwave Dashboard](https://dashboard.flutterwave.com/login) \ No newline at end of file From 85f6ef56f9c13e77cd9f484faaf4ce9ec61aaa2e Mon Sep 17 00:00:00 2001 From: "Amoo .O. Faruk" <65780663+bookwarmdev@users.noreply.github.com> Date: Thu, 29 Sep 2022 07:10:59 +0100 Subject: [PATCH 2/2] Update on flutterwave test credentials --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 6b577b0..4edefb1 100644 --- a/README.md +++ b/README.md @@ -84,18 +84,18 @@ It returns an instance of Flutterwave which we then call the async method `.char ); final Flutterwave flutterwave = Flutterwave( - context: context, - style: style, - publicKey: "Public Key, - currency: "RWF", - redirectUrl: "my_redirect_url" - txRef: "unique_transaction_reference", - amount: "3000", - customer: customer, - paymentOptions: "ussd, card, barter, payattitude", - customization: Customization(title: "Test Payment"), - isDebug: true - ); + context: context, + style: style, + publicKey: "Public Key", + currency: "RWF", + redirectUrl: "my_redirect_url" , + txRef: "unique_transaction_reference", + amount: "3000", + customer: customer, + paymentOptions: "ussd, card, barter, payattitude", + customization: Customization(title: "Test Payment"), + isTestMode: true + ); } ### Handling the response