diff --git a/crates/router/src/connector/adyen/transformers.rs b/crates/router/src/connector/adyen/transformers.rs index 8bb287812800..b2112d5514a2 100644 --- a/crates/router/src/connector/adyen/transformers.rs +++ b/crates/router/src/connector/adyen/transformers.rs @@ -1381,10 +1381,9 @@ impl<'a> TryFrom<&AdyenRouterData<&types::PaymentsAuthorizeRouterData>> | payments::PaymentMethodData::MandatePayment | payments::PaymentMethodData::Reward | payments::PaymentMethodData::Upi(_) => { - Err(errors::ConnectorError::NotSupported { - message: utils::SELECTED_PAYMENT_METHOD.to_string(), - connector: "Adyen", - })? + Err(errors::ConnectorError::NotImplemented( + utils::get_unimplemented_payment_method_error_message("Adyen"), + ))? } }, } @@ -1677,10 +1676,9 @@ impl<'a> TryFrom<&api_models::payments::BankDebitData> for AdyenPaymentMethod<'a }, ))), payments::BankDebitData::BecsBankDebit { .. } => { - Err(errors::ConnectorError::NotSupported { - message: utils::SELECTED_PAYMENT_METHOD.to_string(), - connector: "Adyen", - } + Err(errors::ConnectorError::NotImplemented( + utils::get_unimplemented_payment_method_error_message("Adyen"), + ) .into()) } } @@ -1728,10 +1726,9 @@ impl<'a> TryFrom<&api_models::payments::VoucherData> for AdyenPaymentMethod<'a> payments::VoucherData::Efecty | payments::VoucherData::PagoEfectivo | payments::VoucherData::RedCompra - | payments::VoucherData::RedPagos => Err(errors::ConnectorError::NotSupported { - message: utils::SELECTED_PAYMENT_METHOD.to_string(), - connector: "Adyen", - } + | payments::VoucherData::RedPagos => Err(errors::ConnectorError::NotImplemented( + utils::get_unimplemented_payment_method_error_message("Adyen"), + ) .into()), } } @@ -1915,10 +1912,9 @@ impl<'a> TryFrom<&api::WalletData> for AdyenPaymentMethod<'a> { | payments::WalletData::GooglePayThirdPartySdk(_) | payments::WalletData::PaypalSdk(_) | payments::WalletData::WeChatPayQr(_) - | payments::WalletData::CashappQr(_) => Err(errors::ConnectorError::NotSupported { - message: utils::SELECTED_PAYMENT_METHOD.to_string(), - connector: "Adyen", - } + | payments::WalletData::CashappQr(_) => Err(errors::ConnectorError::NotImplemented( + utils::get_unimplemented_payment_method_error_message("Adyen"), + ) .into()), } } @@ -1975,11 +1971,12 @@ impl<'a> TryFrom<(&api::PayLaterData, Option)> api_models::payments::PayLaterData::AtomeRedirect { .. } => { Ok(AdyenPaymentMethod::Atome) } - payments::PayLaterData::KlarnaSdk { .. } => Err(errors::ConnectorError::NotSupported { - message: utils::SELECTED_PAYMENT_METHOD.to_string(), - connector: "Adyen", + payments::PayLaterData::KlarnaSdk { .. } => { + Err(errors::ConnectorError::NotImplemented( + utils::get_unimplemented_payment_method_error_message("Adyen"), + ) + .into()) } - .into()), } } } @@ -2110,10 +2107,9 @@ impl<'a> TryFrom<&api_models::payments::BankRedirectData> for AdyenPaymentMethod } payments::BankRedirectData::Interac { .. } | payments::BankRedirectData::Przelewy24 { .. } => { - Err(errors::ConnectorError::NotSupported { - message: utils::SELECTED_PAYMENT_METHOD.to_string(), - connector: "Adyen", - } + Err(errors::ConnectorError::NotImplemented( + utils::get_unimplemented_payment_method_error_message("Adyen"), + ) .into()) } }