fix: ( telebirr ) redirect_url

This commit is contained in:
Abubeker Yasin
2026-06-15 14:35:14 +03:00
parent 73eeee175f
commit 96ec2923c2
2 changed files with 5 additions and 2 deletions

View File

@@ -17,6 +17,7 @@ export function buildCanonicalString(requestObject: Record<string, unknown>): st
for (const key of Object.keys(requestObject)) {
if (EXCLUDE_FIELDS.has(key)) continue;
if (requestObject[key] === undefined) continue;
fieldMap[key] = requestObject[key];
}
@@ -24,7 +25,9 @@ export function buildCanonicalString(requestObject: Record<string, unknown>): st
if (biz && typeof biz === 'object') {
for (const key of Object.keys(biz as Record<string, unknown>)) {
if (EXCLUDE_FIELDS.has(key)) continue;
fieldMap[key] = (biz as Record<string, unknown>)[key];
const value = (biz as Record<string, unknown>)[key];
if (value === undefined) continue;
fieldMap[key] = value;
}
}

View File

@@ -211,7 +211,7 @@ export class TelebirrProvider implements PaymentProvider {
total_amount: totalAmount,
trans_currency: input.currency,
timeout_express: this.timeoutExpress,
redirect_url: input.redirectUrl,
...(input.redirectUrl ? { redirect_url: input.redirectUrl } : {}),
},
};
const sign = signRequestObject(