Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
refactor(connector): [Zen] change error message from NotSupported to NotImplemented (#2831)
Swangi Kumarib5ea8db2d2b7
diff --git a/crates/router/src/connector/zen/transformers.rs b/crates/router/src/connector/zen/transformers.rsindex d13c9b6421..6b0d46dec8 100644--- a/crates/router/src/connector/zen/transformers.rs+++ b/crates/router/src/connector/zen/transformers.rs@@ -290,10 +290,9 @@ impl| api_models::payments::VoucherData::FamilyMart { .. }| api_models::payments::VoucherData::Seicomart { .. }| api_models::payments::VoucherData::PayEasy { .. } => {- Err(errors::ConnectorError::NotSupported {- message: utils::SELECTED_PAYMENT_METHOD.to_string(),- connector: "Zen",- })?+ Err(errors::ConnectorError::NotImplemented(+ utils::get_unimplemented_payment_method_error_message("Zen"),+ ))?}};Ok(Self::ApiRequest(Box::new(ApiRequest {@@ -342,12 +341,8 @@ implapi_models::payments::BankTransferData::Pse { .. } => {ZenPaymentChannels::PclBoacompraPse}- api_models::payments::BankTransferData::SepaBankTransfer { .. } => {- Err(errors::ConnectorError::NotImplemented(- utils::get_unimplemented_payment_method_error_message("Zen"),- ))?- }- api_models::payments::BankTransferData::AchBankTransfer { .. }+ api_models::payments::BankTransferData::SepaBankTransfer { .. }+ | api_models::payments::BankTransferData::AchBankTransfer { .. }| api_models::payments::BankTransferData::BacsBankTransfer { .. }| api_models::payments::BankTransferData::PermataBankTransfer { .. }| api_models::payments::BankTransferData::BcaBankTransfer { .. }@@ -356,10 +351,9 @@ impl| api_models::payments::BankTransferData::CimbVaBankTransfer { .. }| api_models::payments::BankTransferData::DanamonVaBankTransfer { .. }| api_models::payments::BankTransferData::MandiriVaBankTransfer { .. } => {- Err(errors::ConnectorError::NotSupported {- message: utils::SELECTED_PAYMENT_METHOD.to_string(),- connector: "Zen",- })?+ Err(errors::ConnectorError::NotImplemented(+ utils::get_unimplemented_payment_method_error_message("Zen"),+ ))?}};Ok(Self::ApiRequest(Box::new(ApiRequest {@@ -489,12 +483,8 @@ implapi_models::payments::WalletData::WeChatPayRedirect(_)| api_models::payments::WalletData::PaypalRedirect(_)| api_models::payments::WalletData::ApplePay(_)- | api_models::payments::WalletData::GooglePay(_) => {- Err(errors::ConnectorError::NotImplemented(- utils::get_unimplemented_payment_method_error_message("Zen"),- ))?- }- api_models::payments::WalletData::AliPayQr(_)+ | api_models::payments::WalletData::GooglePay(_)+ | api_models::payments::WalletData::AliPayQr(_)| api_models::payments::WalletData::AliPayRedirect(_)| api_models::payments::WalletData::AliPayHkRedirect(_)| api_models::payments::WalletData::MomoRedirect(_)@@ -514,10 +504,9 @@ impl| api_models::payments::WalletData::CashappQr(_)| api_models::payments::WalletData::SwishQr(_)| api_models::payments::WalletData::WeChatPayQr(_) => {- Err(errors::ConnectorError::NotSupported {- message: utils::SELECTED_PAYMENT_METHOD.to_string(),- connector: "Zen",- })?+ Err(errors::ConnectorError::NotImplemented(+ utils::get_unimplemented_payment_method_error_message("Zen"),+ ))?}};let terminal_uuid = session_data@@ -719,10 +708,9 @@ impl TryFrom<&ZenRouterData<&types::PaymentsAuthorizeRouterData>> for ZenPayment| api_models::payments::PaymentMethodData::MandatePayment| api_models::payments::PaymentMethodData::Reward| api_models::payments::PaymentMethodData::Upi(_) => {- Err(errors::ConnectorError::NotSupported {- message: utils::SELECTED_PAYMENT_METHOD.to_string(),- connector: "Zen",- })?+ Err(errors::ConnectorError::NotImplemented(+ utils::get_unimplemented_payment_method_error_message("Zen"),+ ))?}}}@@ -736,13 +724,8 @@ impl TryFrom<&api_models::payments::BankRedirectData> for ZenPaymentsRequest {| api_models::payments::BankRedirectData::Sofort { .. }| api_models::payments::BankRedirectData::BancontactCard { .. }| api_models::payments::BankRedirectData::Blik { .. }- | api_models::payments::BankRedirectData::Trustly { .. } => {- Err(errors::ConnectorError::NotImplemented(- utils::get_unimplemented_payment_method_error_message("Zen"),- )- .into())- }- api_models::payments::BankRedirectData::Eps { .. }+ | api_models::payments::BankRedirectData::Trustly { .. }+ | api_models::payments::BankRedirectData::Eps { .. }| api_models::payments::BankRedirectData::Giropay { .. }| api_models::payments::BankRedirectData::Przelewy24 { .. }| api_models::payments::BankRedirectData::Bizum {}@@ -754,10 +737,9 @@ impl TryFrom<&api_models::payments::BankRedirectData> for ZenPaymentsRequest {| api_models::payments::BankRedirectData::OpenBankingUk { .. }| api_models::payments::BankRedirectData::OnlineBankingFpx { .. }| api_models::payments::BankRedirectData::OnlineBankingThailand { .. } => {- Err(errors::ConnectorError::NotSupported {- message: utils::SELECTED_PAYMENT_METHOD.to_string(),- connector: "Zen",- }+ Err(errors::ConnectorError::NotImplemented(+ utils::get_unimplemented_payment_method_error_message("Zen"),+ ).into())}}@@ -776,10 +758,9 @@ impl TryFrom<&api_models::payments::PayLaterData> for ZenPaymentsRequest {| api_models::payments::PayLaterData::WalleyRedirect {}| api_models::payments::PayLaterData::AlmaRedirect {}| api_models::payments::PayLaterData::AtomeRedirect {} => {- Err(errors::ConnectorError::NotSupported {- message: utils::SELECTED_PAYMENT_METHOD.to_string(),- connector: "Zen",- }+ Err(errors::ConnectorError::NotImplemented(+ utils::get_unimplemented_payment_method_error_message("Zen"),+ ).into())}}@@ -794,10 +775,9 @@ impl TryFrom<&api_models::payments::BankDebitData> for ZenPaymentsRequest {| api_models::payments::BankDebitData::SepaBankDebit { .. }| api_models::payments::BankDebitData::BecsBankDebit { .. }| api_models::payments::BankDebitData::BacsBankDebit { .. } => {- Err(errors::ConnectorError::NotSupported {- message: utils::SELECTED_PAYMENT_METHOD.to_string(),- connector: "Zen",- }+ Err(errors::ConnectorError::NotImplemented(+ utils::get_unimplemented_payment_method_error_message("Zen"),+ ).into())}}@@ -811,10 +791,9 @@ impl TryFrom<&api_models::payments::CardRedirectData> for ZenPaymentsRequest {api_models::payments::CardRedirectData::Knet {}| api_models::payments::CardRedirectData::Benefit {}| api_models::payments::CardRedirectData::MomoAtm {} => {- Err(errors::ConnectorError::NotSupported {- message: utils::SELECTED_PAYMENT_METHOD.to_string(),- connector: "Zen",- }+ Err(errors::ConnectorError::NotImplemented(+ utils::get_unimplemented_payment_method_error_message("Zen"),+ ).into())}}@@ -825,19 +804,13 @@ impl TryFrom<&api_models::payments::GiftCardData> for ZenPaymentsRequest {type Error = error_stack::Report<errors::ConnectorError>;fn try_from(value: &api_models::payments::GiftCardData) -> Result<Self, Self::Error> {match value {- api_models::payments::GiftCardData::PaySafeCard {} => {+ api_models::payments::GiftCardData::PaySafeCard {}+ | api_models::payments::GiftCardData::Givex(_) => {Err(errors::ConnectorError::NotImplemented(utils::get_unimplemented_payment_method_error_message("Zen"),).into())}- api_models::payments::GiftCardData::Givex(_) => {- Err(errors::ConnectorError::NotSupported {- message: utils::SELECTED_PAYMENT_METHOD.to_string(),- connector: "Zen",- }- .into())- }}}}