mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
refactor(connector): [Adyen] change error message from not supported to not implemented (#2845)
Co-authored-by: Swangi Kumari <85639103+swangi-kumari@users.noreply.github.com> Co-authored-by: swangi-kumari <swangi.12015941@lpu.in>
This commit is contained in:
@ -752,10 +752,9 @@ impl TryFrom<&api_enums::BankNames> for OnlineBankingCzechRepublicBanks {
|
||||
api::enums::BankNames::KomercniBanka => Ok(Self::KB),
|
||||
api::enums::BankNames::CeskaSporitelna => Ok(Self::CS),
|
||||
api::enums::BankNames::PlatnoscOnlineKartaPlatnicza => Ok(Self::C),
|
||||
_ => Err(errors::ConnectorError::NotSupported {
|
||||
message: String::from("BankRedirect"),
|
||||
connector: "Adyen",
|
||||
})?,
|
||||
_ => Err(errors::ConnectorError::NotImplemented(
|
||||
utils::get_unimplemented_payment_method_error_message("Adyen"),
|
||||
))?,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -832,10 +831,9 @@ impl TryFrom<&api_enums::BankNames> for OnlineBankingPolandBanks {
|
||||
api_models::enums::BankNames::ToyotaBank => Ok(Self::ToyotaBank),
|
||||
api_models::enums::BankNames::VeloBank => Ok(Self::VeloBank),
|
||||
api_models::enums::BankNames::ETransferPocztowy24 => Ok(Self::ETransferPocztowy24),
|
||||
_ => Err(errors::ConnectorError::NotSupported {
|
||||
message: String::from("BankRedirect"),
|
||||
connector: "Adyen",
|
||||
})?,
|
||||
_ => Err(errors::ConnectorError::NotImplemented(
|
||||
utils::get_unimplemented_payment_method_error_message("Adyen"),
|
||||
))?,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -884,10 +882,9 @@ impl TryFrom<&api_enums::BankNames> for OnlineBankingSlovakiaBanks {
|
||||
api::enums::BankNames::SporoPay => Ok(Self::Sporo),
|
||||
api::enums::BankNames::TatraPay => Ok(Self::Tatra),
|
||||
api::enums::BankNames::Viamo => Ok(Self::Viamo),
|
||||
_ => Err(errors::ConnectorError::NotSupported {
|
||||
message: String::from("BankRedirect"),
|
||||
connector: "Adyen",
|
||||
})?,
|
||||
_ => Err(errors::ConnectorError::NotImplemented(
|
||||
utils::get_unimplemented_payment_method_error_message("Adyen"),
|
||||
))?,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -914,10 +911,9 @@ impl TryFrom<&api_enums::BankNames> for OnlineBankingFpxIssuer {
|
||||
api::enums::BankNames::RhbBank => Ok(Self::FpxRhb),
|
||||
api::enums::BankNames::StandardCharteredBank => Ok(Self::FpxScb),
|
||||
api::enums::BankNames::UobBank => Ok(Self::FpxUob),
|
||||
_ => Err(errors::ConnectorError::NotSupported {
|
||||
message: String::from("BankRedirect"),
|
||||
connector: "Adyen",
|
||||
})?,
|
||||
_ => Err(errors::ConnectorError::NotImplemented(
|
||||
utils::get_unimplemented_payment_method_error_message("Adyen"),
|
||||
))?,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -931,10 +927,9 @@ impl TryFrom<&api_enums::BankNames> for OnlineBankingThailandIssuer {
|
||||
api::enums::BankNames::KrungThaiBank => Ok(Self::Krungthaibank),
|
||||
api::enums::BankNames::TheSiamCommercialBank => Ok(Self::Siamcommercialbank),
|
||||
api::enums::BankNames::KasikornBank => Ok(Self::Kbank),
|
||||
_ => Err(errors::ConnectorError::NotSupported {
|
||||
message: String::from("BankRedirect"),
|
||||
connector: "Adyen",
|
||||
})?,
|
||||
_ => Err(errors::ConnectorError::NotImplemented(
|
||||
utils::get_unimplemented_payment_method_error_message("Adyen"),
|
||||
))?,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1087,10 +1082,9 @@ impl TryFrom<&api_enums::BankNames> for OpenBankingUKIssuer {
|
||||
| enums::BankNames::Yoursafe
|
||||
| enums::BankNames::N26
|
||||
| enums::BankNames::NationaleNederlanden
|
||||
| enums::BankNames::KasikornBank => Err(errors::ConnectorError::NotSupported {
|
||||
message: String::from("BankRedirect"),
|
||||
connector: "Adyen",
|
||||
})?,
|
||||
| enums::BankNames::KasikornBank => Err(errors::ConnectorError::NotImplemented(
|
||||
utils::get_unimplemented_payment_method_error_message("Adyen"),
|
||||
))?,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1485,10 +1479,9 @@ impl<'a> TryFrom<&api_enums::BankNames> for AdyenTestBankNames<'a> {
|
||||
api_models::enums::BankNames::VolkskreditbankAg => {
|
||||
Self("4a0a975b-0594-4b40-9068-39f77b3a91f9")
|
||||
}
|
||||
_ => Err(errors::ConnectorError::NotSupported {
|
||||
message: String::from("BankRedirect"),
|
||||
connector: "Adyen",
|
||||
})?,
|
||||
_ => Err(errors::ConnectorError::NotImplemented(
|
||||
utils::get_unimplemented_payment_method_error_message("Adyen"),
|
||||
))?,
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -1592,10 +1585,9 @@ impl<'a> TryFrom<&AdyenRouterData<&types::PaymentsAuthorizeRouterData>>
|
||||
| payments::PaymentMethodData::Reward
|
||||
| payments::PaymentMethodData::Upi(_)
|
||||
| payments::PaymentMethodData::CardToken(_) => {
|
||||
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"),
|
||||
))?
|
||||
}
|
||||
},
|
||||
}
|
||||
@ -1894,10 +1886,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())
|
||||
}
|
||||
}
|
||||
@ -1945,10 +1936,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()),
|
||||
}
|
||||
}
|
||||
@ -2133,10 +2123,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()),
|
||||
}
|
||||
}
|
||||
@ -2266,11 +2255,12 @@ impl<'a>
|
||||
check_required_field(billing_address, "billing")?;
|
||||
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()),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2430,10 +2420,9 @@ impl<'a> TryFrom<(&api_models::payments::BankRedirectData, Option<bool>)>
|
||||
}
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user