You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you read our Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect.
Description
I am trying to validate a bill service(airtime) using "flw.Bills.validate(payload)" and expect to return success (200) or bad request (400), instead i just get a 200 status with the following response {status:"error", data: null}. After reading through the "rave.base.js" file, I think the issue is that even though the query parameters are already on the path, the logic still concatenates the query parameters to the path with the query parameters.
rave.base.js line 54 - 61:
if (requestMethod === 'GET') {
delete payload.method;
if (includeQueryParams == true) {
delete payload.excludeQuery;
requestOptions.uri = path;
} else {
const queryParams = querystring.stringify(payload);
requestOptions.uri = path += ${queryParams};
} else {
requestOptions.uri = path;
}
Steps to Reproduce
Just attempt to validate bill service.
Expected behaviour
for airtime validation, I expect a status of 200 with the following response:
{
"status": "success",
"message": "Item validated successfully",
"data": {
"response_code": "00",
"address": null,
"response_message": "Successful",
"name": "MTN",
"biller_code": "BIL099",
"customer": "08167689237,08167689237",
"product_code": "AT099",
"email": null,
"fee": 0,
"maximum": 0,
"minimum": 0
}
}
Actual behaviour
Instead I get status code 200 and the following response:
{
"status": "error",
"data": null
}
Reproduces how often
I get the error a 100% of the time, I had to alter code I should normally not alter to get the desired result.
Configuration
API Version: v3
Environment: live and test mode
Browser:
Language: [ Node 18 ]
Additional Information
The text was updated successfully, but these errors were encountered:
Have you read our Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect.
Description
I am trying to validate a bill service(airtime) using "flw.Bills.validate(payload)" and expect to return success (200) or bad request (400), instead i just get a 200 status with the following response {status:"error", data: null}. After reading through the "rave.base.js" file, I think the issue is that even though the query parameters are already on the path, the logic still concatenates the query parameters to the path with the query parameters.
rave.base.js line 54 - 61:
if (requestMethod === 'GET') {
delete payload.method;
if (includeQueryParams == true) {
delete payload.excludeQuery;
requestOptions.uri = path;
} else {
const queryParams = querystring.stringify(payload);
requestOptions.uri = path +=
${queryParams}
;} else {
requestOptions.uri = path;
}
Steps to Reproduce
Just attempt to validate bill service.
Expected behaviour
for airtime validation, I expect a status of 200 with the following response:
{
"status": "success",
"message": "Item validated successfully",
"data": {
"response_code": "00",
"address": null,
"response_message": "Successful",
"name": "MTN",
"biller_code": "BIL099",
"customer": "08167689237,08167689237",
"product_code": "AT099",
"email": null,
"fee": 0,
"maximum": 0,
"minimum": 0
}
}
Actual behaviour
Instead I get status code 200 and the following response:
{
"status": "error",
"data": null
}
Reproduces how often
I get the error a 100% of the time, I had to alter code I should normally not alter to get the desired result.
Configuration
Additional Information
The text was updated successfully, but these errors were encountered: