mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
fix: ( telebirr ) fix webhook return types
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user