mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-11-01 02:57:02 +08:00 
			
		
		
		
	refactor(connector): [Adyen] Removed deprecated PMTs from Ayden (Giropay, Sofort) (#7100)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
		| @ -192,8 +192,6 @@ impl ConnectorValidation for Adyen { | ||||
|                 | PaymentMethodType::Alfamart | ||||
|                 | PaymentMethodType::Indomaret | ||||
|                 | PaymentMethodType::FamilyMart | ||||
|                 | PaymentMethodType::Sofort | ||||
|                 | PaymentMethodType::Giropay | ||||
|                 | PaymentMethodType::Seicomart | ||||
|                 | PaymentMethodType::PayEasy | ||||
|                 | PaymentMethodType::MiniStop | ||||
| @ -228,10 +226,12 @@ impl ConnectorValidation for Adyen { | ||||
|                 | PaymentMethodType::Pse | ||||
|                 | PaymentMethodType::LocalBankTransfer | ||||
|                 | PaymentMethodType::Efecty | ||||
|                 | PaymentMethodType::Giropay | ||||
|                 | PaymentMethodType::PagoEfectivo | ||||
|                 | PaymentMethodType::PromptPay | ||||
|                 | PaymentMethodType::RedCompra | ||||
|                 | PaymentMethodType::RedPagos | ||||
|                 | PaymentMethodType::Sofort | ||||
|                 | PaymentMethodType::CryptoCurrency | ||||
|                 | PaymentMethodType::Evoucher | ||||
|                 | PaymentMethodType::Cashapp | ||||
| @ -274,9 +274,7 @@ impl ConnectorValidation for Adyen { | ||||
|             PaymentMethodDataType::VippsRedirect, | ||||
|             PaymentMethodDataType::KlarnaRedirect, | ||||
|             PaymentMethodDataType::Ideal, | ||||
|             PaymentMethodDataType::Sofort, | ||||
|             PaymentMethodDataType::OpenBankingUk, | ||||
|             PaymentMethodDataType::Giropay, | ||||
|             PaymentMethodDataType::Trustly, | ||||
|             PaymentMethodDataType::BancontactCard, | ||||
|             PaymentMethodDataType::AchBankDebit, | ||||
|  | ||||
| @ -551,7 +551,6 @@ pub enum AdyenPaymentMethod<'a> { | ||||
|     Eps(Box<BankRedirectionWithIssuer<'a>>), | ||||
|     #[serde(rename = "gcash")] | ||||
|     Gcash(Box<GcashData>), | ||||
|     Giropay(Box<PmdForPaymentType>), | ||||
|     Gpay(Box<AdyenGPay>), | ||||
|     #[serde(rename = "gopay_wallet")] | ||||
|     GoPay(Box<GoPayData>), | ||||
| @ -585,8 +584,6 @@ pub enum AdyenPaymentMethod<'a> { | ||||
|     PayBright, | ||||
|     #[serde(rename = "doku_permata_lite_atm")] | ||||
|     PermataBankTransfer(Box<DokuBankData>), | ||||
|     #[serde(rename = "directEbanking")] | ||||
|     Sofort, | ||||
|     #[serde(rename = "trustly")] | ||||
|     Trustly, | ||||
|     #[serde(rename = "walley")] | ||||
| @ -1310,7 +1307,6 @@ pub enum PaymentType { | ||||
|     Dana, | ||||
|     Eps, | ||||
|     Gcash, | ||||
|     Giropay, | ||||
|     Googlepay, | ||||
|     #[serde(rename = "gopay_wallet")] | ||||
|     GoPay, | ||||
| @ -1346,8 +1342,6 @@ pub enum PaymentType { | ||||
|     PayBright, | ||||
|     Paypal, | ||||
|     Scheme, | ||||
|     #[serde(rename = "directEbanking")] | ||||
|     Sofort, | ||||
|     #[serde(rename = "networkToken")] | ||||
|     NetworkToken, | ||||
|     Trustly, | ||||
| @ -2075,13 +2069,11 @@ impl TryFrom<&storage_enums::PaymentMethodType> for PaymentType { | ||||
|             | storage_enums::PaymentMethodType::BancontactCard | ||||
|             | storage_enums::PaymentMethodType::Blik | ||||
|             | storage_enums::PaymentMethodType::Eps | ||||
|             | storage_enums::PaymentMethodType::Giropay | ||||
|             | storage_enums::PaymentMethodType::Ideal | ||||
|             | storage_enums::PaymentMethodType::OnlineBankingCzechRepublic | ||||
|             | storage_enums::PaymentMethodType::OnlineBankingFinland | ||||
|             | storage_enums::PaymentMethodType::OnlineBankingPoland | ||||
|             | storage_enums::PaymentMethodType::OnlineBankingSlovakia | ||||
|             | storage_enums::PaymentMethodType::Sofort | ||||
|             | storage_enums::PaymentMethodType::Trustly | ||||
|             | storage_enums::PaymentMethodType::GooglePay | ||||
|             | storage_enums::PaymentMethodType::AliPay | ||||
| @ -2458,11 +2450,6 @@ impl | ||||
|                     ), | ||||
|                 }), | ||||
|             )), | ||||
|             domain::BankRedirectData::Giropay { .. } => { | ||||
|                 Ok(AdyenPaymentMethod::Giropay(Box::new(PmdForPaymentType { | ||||
|                     payment_type: PaymentType::Giropay, | ||||
|                 }))) | ||||
|             } | ||||
|             domain::BankRedirectData::Ideal { bank_name, .. } => { | ||||
|                 let issuer = if test_mode.unwrap_or(true) { | ||||
|                     Some( | ||||
| @ -2533,11 +2520,12 @@ impl | ||||
|                     }, | ||||
|                 })), | ||||
|             ), | ||||
|             domain::BankRedirectData::Sofort { .. } => Ok(AdyenPaymentMethod::Sofort), | ||||
|             domain::BankRedirectData::Trustly { .. } => Ok(AdyenPaymentMethod::Trustly), | ||||
|             domain::BankRedirectData::Interac { .. } | ||||
|             domain::BankRedirectData::Giropay { .. } | ||||
|             | domain::BankRedirectData::Interac { .. } | ||||
|             | domain::BankRedirectData::LocalBankRedirect {} | ||||
|             | domain::BankRedirectData::Przelewy24 { .. } => { | ||||
|             | domain::BankRedirectData::Przelewy24 { .. } | ||||
|             | domain::BankRedirectData::Sofort { .. } => { | ||||
|                 Err(errors::ConnectorError::NotImplemented( | ||||
|                     utils::get_unimplemented_payment_method_error_message("Adyen"), | ||||
|                 ) | ||||
| @ -3220,20 +3208,13 @@ fn get_redirect_extra_details( | ||||
| ) -> errors::CustomResult<(Option<String>, Option<api_enums::CountryAlpha2>), errors::ConnectorError> | ||||
| { | ||||
|     match item.request.payment_method_data { | ||||
|         domain::PaymentMethodData::BankRedirect(ref redirect_data) => match redirect_data { | ||||
|             domain::BankRedirectData::Sofort { | ||||
|                 preferred_language, .. | ||||
|             } => { | ||||
|                 let country = item.get_optional_billing_country(); | ||||
|                 Ok((preferred_language.clone(), country)) | ||||
|             } | ||||
|         domain::PaymentMethodData::BankRedirect( | ||||
|             domain::BankRedirectData::Trustly { .. } | ||||
|             | domain::BankRedirectData::OpenBankingUk { .. } => { | ||||
|                 let country = item.get_optional_billing_country(); | ||||
|                 Ok((None, country)) | ||||
|             } | ||||
|             _ => Ok((None, None)), | ||||
|         }, | ||||
|             | domain::BankRedirectData::OpenBankingUk { .. }, | ||||
|         ) => { | ||||
|             let country = item.get_optional_billing_country(); | ||||
|             Ok((None, country)) | ||||
|         } | ||||
|         _ => Ok((None, None)), | ||||
|     } | ||||
| } | ||||
| @ -4074,7 +4055,6 @@ pub fn get_wait_screen_metadata( | ||||
|         | PaymentType::Dana | ||||
|         | PaymentType::Eps | ||||
|         | PaymentType::Gcash | ||||
|         | PaymentType::Giropay | ||||
|         | PaymentType::Googlepay | ||||
|         | PaymentType::GoPay | ||||
|         | PaymentType::Ideal | ||||
| @ -4094,7 +4074,6 @@ pub fn get_wait_screen_metadata( | ||||
|         | PaymentType::PayBright | ||||
|         | PaymentType::Paypal | ||||
|         | PaymentType::Scheme | ||||
|         | PaymentType::Sofort | ||||
|         | PaymentType::NetworkToken | ||||
|         | PaymentType::Trustly | ||||
|         | PaymentType::TouchNGo | ||||
| @ -4191,7 +4170,6 @@ pub fn get_present_to_shopper_metadata( | ||||
|         | PaymentType::Dana | ||||
|         | PaymentType::Eps | ||||
|         | PaymentType::Gcash | ||||
|         | PaymentType::Giropay | ||||
|         | PaymentType::Googlepay | ||||
|         | PaymentType::GoPay | ||||
|         | PaymentType::Ideal | ||||
| @ -4213,7 +4191,6 @@ pub fn get_present_to_shopper_metadata( | ||||
|         | PaymentType::PayBright | ||||
|         | PaymentType::Paypal | ||||
|         | PaymentType::Scheme | ||||
|         | PaymentType::Sofort | ||||
|         | PaymentType::NetworkToken | ||||
|         | PaymentType::Trustly | ||||
|         | PaymentType::TouchNGo | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 sweta-sharma
					sweta-sharma