Skip to content

Commit

Permalink
refactor(connector): [Forte] Remove Default Case Handling (#2625)
Browse files Browse the repository at this point in the history
  • Loading branch information
SagarDevAchar authored Oct 19, 2023
1 parent e5fbaae commit 418715b
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions crates/router/src/connector/forte/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,23 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for FortePaymentsRequest {
card,
})
}
_ => Err(errors::ConnectorError::NotImplemented(
"Payment Method".to_string(),
))?,
api_models::payments::PaymentMethodData::CardRedirect(_)
| api_models::payments::PaymentMethodData::Wallet(_)
| api_models::payments::PaymentMethodData::PayLater(_)
| api_models::payments::PaymentMethodData::BankRedirect(_)
| api_models::payments::PaymentMethodData::BankDebit(_)
| api_models::payments::PaymentMethodData::BankTransfer(_)
| api_models::payments::PaymentMethodData::Crypto(_)
| api_models::payments::PaymentMethodData::MandatePayment {}
| api_models::payments::PaymentMethodData::Reward {}
| api_models::payments::PaymentMethodData::Upi(_)
| api_models::payments::PaymentMethodData::Voucher(_)
| api_models::payments::PaymentMethodData::GiftCard(_) => {
Err(errors::ConnectorError::NotSupported {
message: utils::SELECTED_PAYMENT_METHOD.to_string(),
connector: "Forte",
})?
}
}
}
}
Expand Down

0 comments on commit 418715b

Please sign in to comment.