Skip to content
Merged
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
2 changes: 1 addition & 1 deletion packages/node/src/providers/hubtel/hubtel.adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class HubtelAdapter implements VoltaxProvider<HubtelPaymentDTO> {
},
);

if (data.status !== 'success') {
if (data.status?.toLowerCase() !== 'success') {

Copilot AI Mar 9, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new case-insensitive status handling is not covered by existing HubtelAdapter tests (current initiatePayment success test uses only lowercase 'success'). Add a unit test where the initiate endpoint returns status values like 'Success'/'SUCCESS' to prevent regressions.

Suggested change
if (data.status?.toLowerCase() !== 'success') {
const normalizedStatus =
typeof data.status === 'string' ? data.status.toLowerCase() : '';
if (normalizedStatus !== 'success') {

Copilot uses AI. Check for mistakes.
throw new Error('Hubtel Initialization Failed');
}

Expand Down
Loading