fix: ( telebirr ) fix webhook return types

This commit is contained in:
Abubeker Yasin
2026-06-17 12:04:00 +03:00
parent 30fecc3627
commit 1b6bc47026
2 changed files with 9 additions and 10 deletions

View File

@@ -139,14 +139,14 @@ export class TelebirrProvider implements PaymentProvider {
mapWebhookTradeStatus(
tradeStatus: string | undefined,
): ProviderPaymentStatus {
switch (tradeStatus) {
case "Completed":
switch (tradeStatus?.toUpperCase()) {
case "COMPLETED":
return ProviderPaymentStatus.SUCCEEDED;
case "Failure":
case "Expired":
case "FAILURE":
return ProviderPaymentStatus.FAILED;
case "Paying":
case "Pending":
case "PAYING":
case "PENDING":
case "EXPIRED":
return ProviderPaymentStatus.PROCESSING;
default:
return ProviderPaymentStatus.PROCESSING;