Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@ jobs:
runs-on: ubuntu-latest
env:
OS: ubuntu-latest
PYTHON: '3.7'
steps:
- name: checkout code
uses: actions/checkout@v2

- name: Checkmarx One ClI Action
uses: checkmarx/ast-github-action@main
with:
project_name: Python-v2
project_name: Node-v3
cx_tenant: Flutterwave
base_uri: https://eu.ast.checkmarx.net/
cx_client_id: ${{ secrets.CX_CLIENT_ID }}
Expand Down
57 changes: 27 additions & 30 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,97 +1,100 @@
# Changelog

## 1.2.1 | 2025-04-14

Added validation for mobile money networks.

### Version Changes

- [ADDED] `network` validations for mobilemoney collections in the momoSchema.
- [ADDED] checkmarx security scan to the package build pipeline.

## 1.2.0 | 2025-04-09

Replace `Request` package with `Fetch` for HTTP requests and update the charge schema.

### Version Changes

- [ADDED] `sa_bank_code` in the chargeSchema.
- [ADDED] Fetch API to handle HTTP calls in the SDK.
- [FIXED] Bumped axios version to the latest.
- [REMOVED] The deprecated request package as a dependency.



## 1.1.15 | 2025-02-28

Added transaction verification by reference and updated the settlement imports for the `fetch_all()` and `fetch()` settlement methods.

### Version Changes

- [ADDED] Transaction verification by reference(`tx_ref`).
- [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.



## 1.1.14 | 2024-12-13

Updated the `voucher` parameter in the momo schema.

### Version Changes
- [FIXED] Make the `voucher` parameter optional in the create mobile money schema.


- [FIXED] Make the `voucher` parameter optional in the create mobile money schema.

## 1.1.13 | 2024-11-19

Updated the `getBalanceByCurrency` method to parse path parameters.

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


- [FIXED] Update the `balance_currency` function in the Misc object to exclude queries when parsing a path parameter.

## 1.1.12 | 2024-09-27

Update the list schema.

### Version Changes
- [FIXED] Remove the required validation on the 'account_bank' parameter.


- [FIXED] Remove the required validation on the 'account_bank' parameter.

## 1.1.11 | 2024-09-10

Update `account_bank` validation in create schema.

### Version Changes
- [FIXED] Update minLength & maxLength validation for account_bank parameter.


- [FIXED] Update minLength & maxLength validation for account_bank parameter.

## 1.1.10 | 2024-04-04

Updated the variable name "package" which happens to be a reserved word in JavaScript, and it is causing compatibility issues with certain bundlers.

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


- [FIXED] changed the variable name 'package' to 'packageJson' in the logger.js file.

## 1.1.9 | 2024-03-18

Validation hotfix on subaccounts

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


- [FIXED] Update validation (minLength & maxLength) for 'account_bank" parameter in the subaccountSchema.

## 1.1.8 | 2024-02-19

Updated BVN verification flow and hotfixes on subaccount, bills and transaction fees:

### Version Changes.

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



## 1.1.7 | 2024-01-25

Scheduled updates and bugfixes:

### Version Changes.

- [ADDED] Tanzania mobile money payment method.
- [ADDED] Fawry Pay payment method.
- [ADDED] Supplementary parameters in the createBulkTransferSchema.
Expand All @@ -110,41 +113,37 @@ Scheduled updates and bugfixes:
- [FIXED] Revised the NG bank charge (Mono).
- [REMOVED] Eliminated the "amount" parameter in the updatePlanSchema.



## 1.1.6 | 2023-06-21

Hotfix on Transfer fees and Bank lists.

### Version changes.

- [FIXED] Transfer fees returning 0 for all amounts.
- [FIXED] Null data response for Bank lists.



## 1.1.5 | 2023-04-13

Hotfix to hide header information in the library response.

### Version changes.
- [FIXED] Removed headers in the response.


- [FIXED] Removed headers in the response.

## 1.1.4 | 2023-04-13

This release fixes the empty subscription fetch query with user email.

### Version changes.
- [FIXED] Empty data in response object for subscription fetch with email query parameter


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

## 1.1.3 | 2023-03-29

Scheduled updates and bug fixes. This release fixes all the bugs in the new SDK (v1.1.0)

### Version changes.

- [FIXED] Updated validation for empty meta objects in charge and transfer methods.
- [FIXED] Added conditional validation for `Country`, `Network`and `Voucher` parameters in Mobile Money schema.
- [FIXED] [#111](https://github.com/Flutterwave/Node/issues/111) Verify transaction error.
Expand All @@ -153,22 +152,20 @@ Scheduled updates and bug fixes. This release fixes all the bugs in the new SDK
- [ADDED] Support for query parameters in listing methods.
- [REMOVED] Replaced `first_name` and `last_name` in the Card tokenization schema with a single `full_name`field.



## 1.1.1 | 2023-03-17

This release fixes all morx errors thrown in custom request class.

### Version changes.
- [FIXED] Morx error returned in custom service class in v1.1.0


- [FIXED] Morx error returned in custom service class in v1.1.0

## 1.1.0 | 2023-03-14

This release fixes all npm warnings and dependabot error messages.

### Version changes.

- [FIXED] [#103](https://github.com/Flutterwave/Node/issues/103) Multiple Vulnerabilities Introduced by dependencies
- [FIXED] [#87](https://github.com/Flutterwave/Node/issues/87) Amount is required for payment plan creation
- [FIXED] [#84](https://github.com/Flutterwave/Node/issues/84) Cannot filter bills by category
Expand Down
4 changes: 2 additions & 2 deletions services/banks/rave.banks-branches.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { logger } = require('../../utils/logger');
// const { logger } = require('../../utils/logger');
const { validator } = require('../../utils/validator');
const { fetchSchema } = require('../schema/base');

Expand All @@ -10,7 +10,7 @@ async function service(data, _rave) {
`v3/banks/${data.id}/branches`,
data,
);
logger(`Get bank branches`, _rave);
// logger(`Get bank branches`, _rave);
return response;
}

Expand Down
4 changes: 2 additions & 2 deletions services/banks/rave.banks-country.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { logger } = require('../../utils/logger');
// const { logger } = require('../../utils/logger');
const { validator } = require('../../utils/validator');
const { listSchema } = require('../schema/base');

Expand All @@ -10,7 +10,7 @@ async function service(data, _rave) {
`v3/banks/${data.country}`,
data,
);
logger(`Get banks by country`, _rave);
// logger(`Get banks by country`, _rave);
return response;
}

Expand Down
4 changes: 2 additions & 2 deletions services/beneficiaries/rave.create.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const { logger } = require('../../utils/logger');
// const { logger } = require('../../utils/logger');
const { validator } = require('../../utils/validator');
const { beneficiarySchema } = require('../schema/create');

async function service(data, _rave) {
validator(beneficiarySchema, data);
const { body: response } = await _rave.request(`v3/beneficiaries`, data);
logger(`Create beneficiary`, _rave);
// logger(`Create beneficiary`, _rave);
return response;
}

Expand Down
4 changes: 2 additions & 2 deletions services/beneficiaries/rave.delete.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { logger } = require('../../utils/logger');
// const { logger } = require('../../utils/logger');
const { validator } = require('../../utils/validator');
const { fetchSchema } = require('../schema/base');

Expand All @@ -9,7 +9,7 @@ async function service(data, _rave) {
`/v3/beneficiaries/${data.id}`,
data,
);
logger(`Delete a beneficiary`, _rave);
// logger(`Delete a beneficiary`, _rave);
return response;
}

Expand Down
4 changes: 2 additions & 2 deletions services/beneficiaries/rave.single.retrieve.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { logger } = require('../../utils/logger');
// const { logger } = require('../../utils/logger');
const { validator } = require('../../utils/validator');
const { fetchSchema } = require('../schema/base');

Expand All @@ -9,7 +9,7 @@ async function service(data, _rave) {
`/v3/beneficiaries/${data.id}`,
data,
);
logger(`Fetch a transfer beneficiary`, _rave);
// logger(`Fetch a transfer beneficiary`, _rave);
return response;
}

Expand Down
4 changes: 2 additions & 2 deletions services/bills/rave.amount.to-be-paid.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { logger } = require('../../utils/logger');
// const { logger } = require('../../utils/logger');
const { validator } = require('../../utils/validator');
const { amountQuerySchema } = require('../schema/bill');

Expand All @@ -9,7 +9,7 @@ async function service(data, _rave) {
`v3/billers/${data.id}/products/${data.product_id}`,
data,
);
logger(`Fetch bill amount`, _rave);
// logger(`Fetch bill amount`, _rave);
return response;
}

Expand Down
4 changes: 2 additions & 2 deletions services/bills/rave.create-bill.payment.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const { logger } = require('../../utils/logger');
// const { logger } = require('../../utils/logger');
const { validator } = require('../../utils/validator');
const { createSchema } = require('../schema/bill');

async function service(data, _rave) {
validator(createSchema, data);
const { body: response } = await _rave.request(`v3/bills`, data);
logger(`Create bill payments`, _rave);
// logger(`Create bill payments`, _rave);
return response;
}

Expand Down
4 changes: 2 additions & 2 deletions services/bills/rave.create-bulk.bills.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const { logger } = require('../../utils/logger');
// const { logger } = require('../../utils/logger');
const { validator } = require('../../utils/validator');
const { bulkCreateSchema } = require('../schema/bill');

async function service(data, _rave) {
validator(bulkCreateSchema, data);
const { body: response } = await _rave.request(`v3/bulk-bills`, data);
logger(`Create bulk bill payments`, _rave);
// logger(`Create bulk bill payments`, _rave);
return response;
}

Expand Down
4 changes: 2 additions & 2 deletions services/bills/rave.create-order-billing-code.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { logger } = require('../../utils/logger');
// const { logger } = require('../../utils/logger');
const { validator } = require('../../utils/validator');
const { createOrderSchema } = require('../schema/bill');

Expand All @@ -8,7 +8,7 @@ async function service(data, _rave) {
`v3/billers/${data.id}/products/${data.product_id}/orders`,
data,
);
logger(`Create order with billing code`, _rave);
// logger(`Create order with billing code`, _rave);
return response;
}

Expand Down
4 changes: 2 additions & 2 deletions services/bills/rave.get-bill-payments.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { logger } = require('../../utils/logger');
// const { logger } = require('../../utils/logger');
const { validator } = require('../../utils/validator');
const { listSchema } = require('../schema/base');

Expand All @@ -9,7 +9,7 @@ async function service(data, _rave) {
`v3/bills?from=${data.from}&to=${data.to}`,
data,
);
logger(`Fetch bill payments`, _rave);
// logger(`Fetch bill payments`, _rave);
return response;
}

Expand Down
4 changes: 2 additions & 2 deletions services/bills/rave.get.status.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { logger } = require('../../utils/logger');
// const { logger } = require('../../utils/logger');
const { validator } = require('../../utils/validator');
const { fetchStatusSchema } = require('../schema/bill');

Expand All @@ -9,7 +9,7 @@ async function service(data, _rave) {
`v3/bills/${data.reference}`,
data,
);
logger(`Fetch bill status`, _rave);
// logger(`Fetch bill status`, _rave);
return response;
}

Expand Down
4 changes: 2 additions & 2 deletions services/bills/rave.products-under-an-agency.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { logger } = require('../../utils/logger');
// const { logger } = require('../../utils/logger');
const { validator } = require('../../utils/validator');
const { fetchSchema } = require('../schema/base');

Expand All @@ -10,7 +10,7 @@ async function service(data, _rave) {
`v3/billers/${data.id}/products`,
data,
);
logger(`Retrieve bills by agency`, _rave);
// logger(`Retrieve bills by agency`, _rave);
return response;
}

Expand Down
4 changes: 2 additions & 2 deletions services/bills/rave.update-bills.order.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { logger } = require('../../utils/logger');
// const { logger } = require('../../utils/logger');
const { validator } = require('../../utils/validator');
const { updateOrderSchema } = require('../schema/bill');

Expand All @@ -9,7 +9,7 @@ async function service(data, _rave) {
`v3/product-orders/${data.reference}`,
data,
);
logger(`Update bill order`, _rave);
// logger(`Update bill order`, _rave);
return response;
}

Expand Down
Loading