Skip to content

Commit 275f59a

Browse files
committed
update README file
1 parent 8aba8fb commit 275f59a

File tree

2 files changed

+109
-96
lines changed

2 files changed

+109
-96
lines changed

CHANGELOG.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
1+
## [1.0.4] - July 4, 2022
2+
* Renamed property `isDebug` to `isTestMode`
3+
* Made property `redirectUrl` required
4+
* Updated README file
5+
6+
## [1.0.3] - October 4, 2021.
7+
* Fixed issue with webview
8+
9+
## [1.0.2] - September 23, 2021.
10+
* Fixed bug where cancel payment buttons are not clickable on iOS devices.
11+
12+
## [1.0.1] - September 14, 2021.
13+
* Fixed bug where response is not returned to initiating screen when user cancels transaction.
14+
115
## [1.0.0] - September 9, 2021.
216
* Initial release
317

418

5-
## [1.0.1] - September 14, 2021.
6-
* Fix bug where response is not returned to initiating screen when user cancels transaction.
719

8-
## [1.0.2] - September 23, 2021.
9-
* Fix bug where cancel payment buttons are not clickable on iOS devices.
1020

11-
## [1.0.3] - October 4, 2021.
12-
* Fix issue with webview
21+
22+

README.md

Lines changed: 93 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
<p align="center">
2-
<img title="Flutterwave" height="200" src="https://flutterwave.com/images/logo-colored.svg" width="50%"/>
3-
</p>
1+
2+
<p align="center">
3+
<img title="Flutterwave" height="200" src="https://flutterwave.com/images/logo-colored.svg" width="50%"/>
4+
</p>
45

56
# Flutterwave Flutter Standard SDK
67

@@ -24,109 +25,116 @@ Flutterwave's Flutter SDK is Flutterwave's offical flutter sdk to integrate Flut
2425

2526
## Getting Started
2627

27-
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.
28+
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.
2829
See [references](#references) for links to dashboard and API documentation.
2930

30-
### Prerequisite
31-
32-
- Ensure you have your test (and live) [API keys](https://developer.flutterwave.com/docs/api-keys).
33-
```
34-
Flutter version >= 1.17.0
35-
Flutterwave version 3 API keys
36-
```
31+
## Requirements
32+
- Ensure you have your test (and live) [API keys](https://developer.flutterwave.com/docs/api-keys).
33+
``` Flutter version >= 1.17.0 Flutterwave version 3 API keys ```
3734

38-
### Installing
39-
40-
**Step 1.** Add the dependency
35+
## Installation Add the dependency
4136

4237
In your `pubspec.yaml` file add:
4338

44-
1. `flutterwave_standard: ^1.0.3`
45-
2. run `flutter pub get`
39+
1. `flutterwave_standard: ^1.0.4`
40+
2. run `flutter pub get`
41+
<a id="usage"></a>
4642

47-
<a id="usage"></a>
4843
## Usage
4944

50-
### 1. Create a `Flutterwave` instance
51-
52-
Create a `Flutterwave` instance by calling the constructor `Flutterwave` The constructor accepts a mandatory instance of the following:
53-
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.
54-
55-
_handlePaymentInitialization() async {
56-
final style = FlutterwaveStyle(
57-
appBarText: "My Standard Blue",
58-
buttonColor: Color(0xffd0ebff),
59-
appBarIcon: Icon(Icons.message, color: Color(0xffd0ebff)),
60-
buttonTextStyle: TextStyle(
61-
color: Colors.black,
62-
fontWeight: FontWeight.bold,
63-
fontSize: 18,
64-
),
65-
appBarColor: Color(0xffd0ebff),
66-
dialogCancelTextStyle: TextStyle(
67-
color: Colors.redAccent,
68-
fontSize: 18,
69-
),
70-
dialogContinueTextStyle: TextStyle(
71-
color: Colors.blue,
72-
fontSize: 18,
73-
)
74-
);
75-
final Customer customer = Customer(
76-
name: "FLW Developer",
77-
phoneNumber: "1234566677777",
78-
email: "[email protected]");
79-
80-
final Flutterwave flutterwave = Flutterwave(
81-
context: context,
82-
style: style,
83-
publicKey: "Public Key,
84-
currency: "RWF",
85-
txRef: "unique_transaction_reference",
86-
amount: "3000",
87-
customer: customer,
88-
paymentOptions: "ussd, card, barter, payattitude",
89-
customization: Customization(title: "Test Payment"),
90-
isDebug: true);
91-
}
92-
45+
Create a `Flutterwave` instance by calling the constructor `Flutterwave` The constructor accepts a mandatory instance of the following:
46+
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.
47+
48+
_handlePaymentInitialization() async {
49+
final style = FlutterwaveStyle(
50+
appBarText: "My Standard Blue",
51+
buttonColor: Color(0xffd0ebff),
52+
appBarIcon: Icon(Icons.message, color: Color(0xffd0ebff)),
53+
buttonTextStyle: TextStyle(
54+
color: Colors.black,
55+
fontWeight: FontWeight.bold,
56+
fontSize: 18),
57+
appBarColor: Color(0xffd0ebff),
58+
dialogCancelTextStyle: TextStyle(
59+
color: Colors.redAccent,
60+
fontSize: 18
61+
),
62+
dialogContinueTextStyle: TextStyle(
63+
color: Colors.blue,
64+
fontSize: 18
65+
)
66+
);
67+
68+
final Customer customer = Customer(
69+
name: "FLW Developer",
70+
phoneNumber: "1234566677777",
71+
72+
);
73+
74+
final Flutterwave flutterwave = Flutterwave(
75+
context: context,
76+
style: style,
77+
publicKey: "Public Key,
78+
currency: "RWF",
79+
redirectUrl: "my_redirect_url"
80+
txRef: "unique_transaction_reference",
81+
amount: "3000",
82+
customer: customer,
83+
paymentOptions: "ussd, card, barter, payattitude",
84+
customization: Customization(title: "Test Payment"),
85+
isDebug: true
86+
);
87+
}
9388

9489
### 2. Handle the response
9590

96-
Calling the `.charge()` method returns a `Future`
97-
of `ChargeResponse` which we await for the actual response as seen above.
98-
99-
```
100-
final ChargeResponse response = await flutterwave.charge();
101-
if (response != null) {
102-
print(response.toJson());
103-
if(response.success) {
104-
Call the verify transaction endpoint with the transactionID returned in `response.transactionId` to verify transaction before offering value to customer
105-
} else {
106-
// Transaction not successful
107-
}
108-
} else {
109-
// User cancelled
110-
}
111-
```
91+
Calling the `.charge()` method returns a `Future`
92+
of `ChargeResponse` which we await for the actual response as seen above.
11293

11394

11495

96+
final ChargeResponse response = await flutterwave.charge();
97+
if (response != null) {
98+
print(response.toJson());
99+
if(response.success) {
100+
Call the verify transaction endpoint with the transactionID returned in `response.transactionId` to verify transaction before offering value to customer
101+
} else {
102+
// Transaction not successful
103+
}
104+
} else {
105+
// User cancelled
106+
}
107+
115108
#### Please note that:
116-
- `ChargeResponse` can be null, depending on if the user cancels
117-
the transaction by pressing back.
118-
- 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
109+
- `ChargeResponse` can be null, depending on if the user cancels
110+
the transaction by pressing back.
111+
- 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
119112

120113
> **PLEASE NOTE**
121114
122-
> We advise you to do a further verification of transaction's details on your server to be sure everything checks out before providing service.
115+
> We advise you to do a further verification of transaction's details on your server to be sure everything checks out before providing service.
123116
<a id="deployment"></a>
124-
## Deployment
125117
126-
- Switch to Live Mode on the Dashboard settings page
127-
- Use the Live Public API key from the API tab, see [here](https://developer.flutterwave.com/docs/api-keys) for more details.
128118

129-
<a id="build-tools"></a>
119+
##Testing
120+
`pub run test`
121+
122+
## Debugging Errors
123+
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).
124+
125+
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.
126+
127+
<a id="support"></a>
128+
## Support For additional assistance using this library, contact the developer experience (DX) team via [email](mailto:[email protected]) or on [slack](https://bit.ly/34Vkzcg).
129+
130+
You can also follow us [@FlutterwaveEng](https://twitter.com/FlutterwaveEng) and let us know what you think 😊
131+
132+
## Contribution guidelines
133+
Read more about our community contribution guidelines [here](https://www.notion.so/flutterwavego/Community-contribution-guide-ca1d8a876ba04d45ab4b663c758ae42a).
134+
135+
## License
136+
By contributing to the Flutter library, you agree that your contributions will be licensed under its [MIT license](https://opensource.org/licenses/MIT).
137+
130138
## Built Using
131139
- [flutter](https://flutter.dev/)
132140
- [http](https://pub.dev/packages/http)
@@ -138,9 +146,4 @@ Create a `Flutterwave` instance by calling the constructor `Flutterwave` The con
138146

139147
- [Flutterwave API Doc](https://developer.flutterwave.com/docs)
140148
- [Flutterwave Inline Payment Doc](https://developer.flutterwave.com/docs/flutterwave-inline)
141-
- [Flutterwave Dashboard](https://dashboard.flutterwave.com/login)
142-
143-
<a id="support"></a>
144-
## Support
145-
* Have issues integrating? Reach out via [our Developer forum](https://developer.flutterwave.com/discuss) for support
146-
149+
- [Flutterwave Dashboard](https://dashboard.flutterwave.com/login)

0 commit comments

Comments
 (0)