Skip to content

Commit b9705d8

Browse files
Merge pull request #174 from Dekunledev/dev
Replaced the deprecated Request package with the Fetch API and Added support for ACH payments to supported OZOW banks.
2 parents bdee473 + 772dc3a commit b9705d8

9 files changed

Lines changed: 1076 additions & 5041 deletions

File tree

.github/workflows/change-review.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/setup-node@v1
14+
- uses: actions/setup-node@v4
1515
with:
16-
node-version: 16
16+
node-version: 18
1717

18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1919

2020
- name: 'Cache node_modules'
21-
uses: actions/cache@v2
21+
uses: actions/cache@v4
2222
with:
2323
path: ~/.npm
24-
key: ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
24+
key: ${{ runner.os }}-node-v18-${{ hashFiles('**/package-lock.json') }}
2525
restore-keys: |
26-
${{ runner.os }}-node-v${{ matrix.node }}-
26+
${{ runner.os }}-node-v18-
2727
2828
- name: Install Dependencies
2929
run: |
@@ -36,7 +36,7 @@ jobs:
3636
run: npm run coverage
3737

3838
- name: upload coverage report to codecov
39-
uses: codecov/codecov-action@v2
39+
uses: codecov/codecov-action@v4
4040

4141
- name: push build status to Slack
4242
uses: 8398a7/action-slack@v3

CHANGELOG.md

Lines changed: 53 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,91 @@
11
# Changelog
2+
3+
## 1.1.16 | 2025-03-27
4+
5+
Updated the package used for handling HTTP API calls from Request to Fetch. Added `sa_bank_code` to the chargeSchema for ACH charge in `zar` for specific OZOW banks.
6+
7+
### Version Changes
8+
9+
- [ADDED] `sa_bank_code` in the chargeSchema.
10+
- [ADDED] Fetch API to handle HTTP calls in the SDK.
11+
- [FIXED] Bumped axios version to the latest.
12+
- [REMOVED] The deprecated request package as a dependency.
13+
214
## 1.1.15 | 2025-02-28
3-
Added transaction verification by reference and updated the settlement imports for the `fetch_all()` and `fetch()` settlement methods.
15+
16+
Added transaction verification by reference and updated the settlement imports for the `fetch_all()` and `fetch()` settlement methods.
417

518
### Version Changes
19+
620
- [ADDED] Transaction verification by reference(`tx_ref`).
721
- [FIXED] Update the `fetch_all()` and `fetch()` settlement methods to use the correct settlement imports, ensuring they send the correct requests to the Flutterwave API.
822

923
## 1.1.14 | 2024-12-13
24+
1025
Updated the `voucher` parameter in the momo schema.
1126

1227
### Version Changes
28+
1329
- [FIXED] Update the `voucher` parameter in the momo schema to be an optional parameter.
1430

1531
## 1.1.13 | 2024-11-19
32+
1633
Updated the `getBalanceByCurrency` method to parse path parameters.
1734

1835
### Version Changes
36+
1937
- [FIXED] Update the `balance_currency` function in the Misc object to exclude queries when parsing a path parameter.
2038

2139
## 1.1.12 | 2024-09-27
40+
2241
Updated the `account_bank` field in the list schema.
2342

2443
### Version Changes
44+
2545
- [FIXED] Update validation from required to optional for 'account_bank" parameter in the list schema.
2646

2747
## 1.1.11 | 2024-09-10
48+
2849
Updated the `account_bank` field in all schema's.
2950

3051
### Version Changes
52+
3153
- [FIXED] Update validation (minLength & maxLength) for 'account_bank" parameter in the schema's.
3254

3355
## 1.1.10 | 2024-04-04
56+
3457
Updated the variable name "package" which happens to be a reserved word in JavaScript, and it is causing compatibility issues with certain bundlers.
3558

3659
### Version Changes
60+
3761
- [FIXED] changed the variable name 'package' to 'packageJson' in the logger.js file.
3862

3963
## 1.1.9 | 2024-03-18
64+
4065
Validation hotfix on subaccounts
4166

4267
### Version Changes.
68+
4369
- [FIXED] Update validation (minLength & maxLength) for 'account_bank" parameter in the subaccountSchema.
4470

4571
## 1.1.8 | 2024-02-19
72+
4673
Updated BVN verification flow and hotfixes on subaccount, bills and transaction fees:
4774

4875
### Version Changes.
76+
4977
- [ADDED] New BVN verification flow (via NIBBS).
5078
- [ADDED] Unit tests for more coverage on the BVN verification, fees, and split payments.
5179
- [ADDED] Subaccounts parameter (optional) to card charge and PWBT requests.
5280
- [FIXED] Resolved "URL Not Found" Error returned from Validate Bill Service method.
5381
- [FIXED] Resolved "Invalid currency provided" Error returned from the Transaction fees method.
5482

5583
## 1.1.7 | 2024-01-25
84+
5685
Scheduled updates and bugfixes:
5786

5887
### Version Changes.
88+
5989
- [ADDED] Tanzania mobile money payment method.
6090
- [ADDED] Fawry Pay payment method.
6191
- [ADDED] Supplementary parameters in the createBulkTransferSchema.
@@ -75,25 +105,36 @@ Scheduled updates and bugfixes:
75105
- [REMOVED] Eliminated the "amount" parameter in the updatePlanSchema.
76106

77107
## 1.1.6 | 2023-06-21
108+
78109
Hotfix on Transfer fees and Bank lists.
110+
79111
### Version changes.
112+
80113
- [FIXED] Transfer fees returning 0 for all amounts.
81114
- [FIXED] Null data response for Bank lists.
82115

83116
## 1.1.5 | 2023-04-13
117+
84118
Hotfix to hide header information in the library response.
119+
85120
### Version changes.
121+
86122
- [FIXED] Removed headers in the response.
87123

88124
## 1.1.4 | 2023-04-13
125+
89126
This release fixes the empty subscription fetch query with user email.
127+
90128
### Version changes.
91-
- [FIXED] Empty data in response object for subscription fetch with email query parameter
92129

130+
- [FIXED] Empty data in response object for subscription fetch with email query parameter
93131

94132
## 1.1.3 | 2023-03-29
133+
95134
Scheduled updates and bug fixes. This release fixes all the bugs in the new SDK (v1.1.0)
135+
96136
### Version changes.
137+
97138
- [FIXED] Updated validation for empty meta objects in charge and transfer methods.
98139
- [FIXED] Added conditional validation for `Country`, `Network`and `Voucher` parameters in Mobile Money schema.
99140
- [FIXED] [#111](https://github.com/Flutterwave/Node/issues/111) Verify transaction error.
@@ -103,16 +144,21 @@ Scheduled updates and bug fixes. This release fixes all the bugs in the new SDK
103144
- [REMOVED] Replaced `first_name` and `last_name` in the Card tokenization schema with a single `full_name`field.
104145

105146
## 1.1.1 | 2023-03-17
147+
106148
This release fixes all morx errors thrown in custom request class.
149+
107150
### Version changes.
151+
108152
- [FIXED] Morx error returned in custom service class in v1.1.0
109153

110154
## 1.1.0 | 2023-03-14
155+
111156
This release fixes all npm warnings and dependabot error messages.
157+
112158
### Version changes.
113-
- [FIXED] [#103](https://github.com/Flutterwave/Node/issues/103) Multiple Vulnerabilities Introduced by dependencies
114-
- [FIXED] [#87](https://github.com/Flutterwave/Node/issues/87) Amount is required for payment plan creation
115-
- [FIXED] [#84](https://github.com/Flutterwave/Node/issues/84) Cannot filter bills by category
116-
- [FIXED] [#79](https://github.com/Flutterwave/Node/issues/79) Urgent: Transactions GET endpoint or any endpoints with qs doesn't work
117-
- [ADDED] Support for ApplePay, GooglePay and eNaira payments.
118159

160+
- [FIXED] [#103](https://github.com/Flutterwave/Node/issues/103) Multiple Vulnerabilities Introduced by dependencies
161+
- [FIXED] [#87](https://github.com/Flutterwave/Node/issues/87) Amount is required for payment plan creation
162+
- [FIXED] [#84](https://github.com/Flutterwave/Node/issues/84) Cannot filter bills by category
163+
- [FIXED] [#79](https://github.com/Flutterwave/Node/issues/79) Urgent: Transactions GET endpoint or any endpoints with qs doesn't work
164+
- [ADDED] Support for ApplePay, GooglePay and eNaira payments.

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Available features include:
2424
- Bill payments: Airtime, Data bundle, Cable, Power, Toll, E-bills, and Remitta.
2525
- Identity verification: Resolve bank account, resolve BVN information and generate OTP.
2626

27-
2827
## Table of Content
28+
2929
1. [Requirements](#requirements)
3030
2. [Installation](#installation)
3131
3. [Initialization](#initialization)
@@ -40,8 +40,7 @@ Available features include:
4040
## Requirements
4141

4242
1. Flutterwave for business (F4B) [API Keys](https://developer.flutterwave.com/docs/integration-guides/authentication)
43-
2. Node 12 or higher.
44-
43+
2. Node 18 or higher.
4544

4645
## Installation
4746

@@ -51,27 +50,29 @@ To install the package, run the following command in your Node terminal:
5150
npm install flutterwave-node-v3
5251
```
5352

54-
5553
## Initialization
5654

5755
```javascript
5856
const Flutterwave = require('flutterwave-node-v3');
59-
const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_KEY);
57+
const flw = new Flutterwave(
58+
process.env.FLW_PUBLIC_KEY,
59+
process.env.FLW_SECRET_KEY,
60+
);
6061
```
6162

6263
For staging (Test environment), use the TEST API Keys and for production (Live environment), use LIVE API KEYS.
6364
You can get your process.env.FLW_PUBLIC_KEY and process.env.FLW_SECRET_KEY from the Flutterwave dashboard. Read the [requirement section](#requirements) for more information on how to get your API keys.
6465

65-
6666
## Usage
67+
6768
1. [Collections](documentation/collections.md)
6869
2. [Tokenization](documentation/tokenization.md)
6970
3. [Subscriptions](documentation/subscription.md)
7071
4. [Transfers](documentation/transfers.md)
7172
5. [Virtual Account](documentation/virtualAccount.md)
7273
6. [Bill payments](documentation/billPayments.md)
7374
7. [Transactions and reporting](documentation/transactions.md)
74-
8. [Beneficiaries](documentation/beneficiary.md)
75+
8. [Beneficiaries](documentation/beneficiary.md)
7576
9. [Banks](documentation/banks.md)
7677
10. [Settlements](documentation/settlements.md)
7778
11. [OTP](documentation/otp.md)
@@ -81,28 +82,29 @@ You can get your process.env.FLW_PUBLIC_KEY and process.env.FLW_SECRET_KEY from
8182
15. [Collection Subaccounts](documentation/subaccount.md)
8283
16. [Payment-plan](documentation/payment-plan.md)
8384

84-
8585
## Testing
86+
8687
All of the libraries tests are run on Mocha. Available tests include `rave.bank.test`, `rave.beneficiaries.test`, `rave.bills.test`, `rave.charge.test`, `rave.ebills.test`, `rave.settlements.test`, `rave.subscriptions.test`. They can be run by running the test command in your terminal.
8788

8889
```sh
8990
npm run test or npm test
9091
```
9192

9293
## Debugging Errors
94+
9395
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).
9496
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.
9597

96-
9798
## Support
99+
98100
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).
99101
You can also follow us [@FlutterwaveEng](https://twitter.com/FlutterwaveEng) and let us know what you think 😊.
100102

101-
102103
## Contribution guidelines
103-
Read more about our community contribution guidelines [here](/CONTRIBUTING.md)
104104

105+
Read more about our community contribution guidelines [here](/CONTRIBUTING.md)
105106

106107
## License
108+
107109
By contributing to this library, you agree that your contributions will be licensed under its [MIT license](/LICENSE).
108110
Copyright (c) Flutterwave Inc.

0 commit comments

Comments
 (0)