Bug: [BUG] Trustly and Ideal Failing Payments for Ayden Fixed



Trustly and Ideal Failing Payments for Ayden Fixed
diff --git a/crates/router/src/connector/adyen/transformers.rs b/crates/router/src/connector/adyen/transformers.rs
index c9bfdbf3d4a..8aba3573f68 100644
--- a/crates/router/src/connector/adyen/transformers.rs
+++ b/crates/router/src/connector/adyen/transformers.rs
@@ -148,7 +148,7 @@ pub struct LineItem {
 pub struct AdyenPaymentRequest<'a> {
     amount: Amount,
     merchant_account: Secret<String>,
-    payment_method: AdyenPaymentMethod<'a>,
+    payment_method: PaymentMethod<'a>,
     mpi_data: Option<AdyenMpiData>,
     reference: String,
     return_url: String,
@@ -527,22 +527,37 @@ pub struct Amount {
 
 #[derive(Debug, Clone, Serialize)]
 #[serde(untagged)]
+pub enum PaymentMethod<'a> {
+    AdyenPaymentMethod(Box<AdyenPaymentMethod<'a>>),
+    AdyenMandatePaymentMethod(Box<AdyenMandate>),
+}
+
+#[derive(Debug, Clone, Serialize)]
+#[serde(tag = "type")]
 #[serde(rename_all = "lowercase")]
 pub enum AdyenPaymentMethod<'a> {
-    AdyenAffirm(Box<PmdForPaymentType>),
+    #[serde(rename = "affirm")]
+    AdyenAffirm,
+    #[serde(rename = "scheme")]
     AdyenCard(Box<AdyenCard>),
-    AdyenKlarna(Box<PmdForPaymentType>),
-    AdyenPaypal(Box<PmdForPaymentType>),
+    #[serde(rename = "klarna")]
+    AdyenKlarna,
+    #[serde(rename = "paypal")]
+    AdyenPaypal,
+    #[serde(rename = "networkToken")]
+    AdyenPaze(Box<AdyenPazeData>),
     #[serde(rename = "afterpaytouch")]
-    AfterPay(Box<PmdForPaymentType>),
-    AlmaPayLater(Box<PmdForPaymentType>),
-    AliPay(Box<PmdForPaymentType>),
-    AliPayHk(Box<PmdForPaymentType>),
+    AfterPay,
+    #[serde(rename = "alma")]
+    AlmaPayLater,
+    AliPay,
+    #[serde(rename = "alipay_hk")]
+    AliPayHk,
     ApplePay(Box<AdyenApplePay>),
-    #[serde(rename = "atome")]
     Atome,
-    BancontactCard(Box<BancontactCardData>),
-    Bizum(Box<PmdForPaymentType>),
+    #[serde(rename = "scheme")]
+    BancontactCard(Box<AdyenCard>),
+    Bizum,
     Blik(Box<BlikRedirectionData>),
     #[serde(rename = "boletobancario")]
     BoletoBancario,
@@ -556,21 +571,24 @@ pub enum AdyenPaymentMethod<'a> {
     Gpay(Box<AdyenGPay>),
     #[serde(rename = "gopay_wallet")]
     GoPay(Box<GoPayData>),
-    Ideal(Box<BankRedirectionWithIssuer<'a>>),
+    Ideal,
     #[serde(rename = "kakaopay")]
     Kakaopay(Box<KakaoPayData>),
-    Mandate(Box<AdyenMandate>),
     Mbway(Box<MbwayData>),
-    MobilePay(Box<PmdForPaymentType>),
+    MobilePay,
     #[serde(rename = "momo_wallet")]
     Momo(Box<MomoData>),
     #[serde(rename = "momo_atm")]
     MomoAtm,
     #[serde(rename = "touchngo")]
     TouchNGo(Box<TouchNGoData>),
+    #[serde(rename = "onlineBanking_CZ")]
     OnlineBankingCzechRepublic(Box<OnlineBankingCzechRepublicData>),
-    OnlineBankingFinland(Box<PmdForPaymentType>),
+    #[serde(rename = "ebanking_FI")]
+    OnlineBankingFinland,
+    #[serde(rename = "onlineBanking_PL")]
     OnlineBankingPoland(Box<OnlineBankingPolandData>),
+    #[serde(rename = "onlineBanking_SK")]
     OnlineBankingSlovakia(Box<OnlineBankingSlovakiaData>),
     #[serde(rename = "molpay_ebanking_fpx_MY")]
     OnlineBankingFpx(Box<OnlineBankingFpxData>),
@@ -592,9 +610,11 @@ pub enum AdyenPaymentMethod<'a> {
     Walley,
     #[serde(rename = "wechatpayWeb")]
     WeChatPayWeb,
+    #[serde(rename = "ach")]
     AchDirectDebit(Box<AchDirectDebitData>),
     #[serde(rename = "sepadirectdebit")]
     SepaDirectDebit(Box<SepaDirectDebitData>),
+    #[serde(rename = "directdebit_GB")]
     BacsDirectDebit(Box<BacsDirectDebitData>),
     SamsungPay(Box<SamsungPayPmData>),
     #[serde(rename = "doku_bca_va")]
@@ -617,7 +637,9 @@ pub enum AdyenPaymentMethod<'a> {
     Indomaret(Box<DokuBankData>),
     #[serde(rename = "doku_alfamart")]
     Alfamart(Box<DokuBankData>),
+    #[serde(rename = "givex")]
     PaymentMethodBalance(Box<BalancePmData>),
+    #[serde(rename = "giftcard")]
     AdyenGiftCard(Box<GiftCardData>),
     #[serde(rename = "swish")]
     Swish,
@@ -637,15 +659,9 @@ pub enum AdyenPaymentMethod<'a> {
     Seicomart(Box<JCSVoucherData>),
     #[serde(rename = "econtext_stores")]
     PayEasy(Box<JCSVoucherData>),
-    Pix(Box<PmdForPaymentType>),
+    Pix,
+    #[serde(rename = "networkToken")]
     NetworkToken(Box<AdyenNetworkTokenData>),
-    AdyenPaze(Box<AdyenPazeData>),
-}
-
-#[derive(Debug, Clone, Serialize)]
-pub struct PmdForPaymentType {
-    #[serde(rename = "type")]
-    payment_type: PaymentType,
 }
 
 #[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, serde::Deserialize)]
@@ -660,8 +676,6 @@ pub struct JCSVoucherData {
 #[derive(Debug, Clone, Serialize)]
 #[serde(rename_all = "camelCase")]
 pub struct BalancePmData {
-    #[serde(rename = "type")]
-    payment_type: GiftCardBrand,
     number: Secret<String>,
     cvc: Secret<String>,
 }
@@ -669,8 +683,6 @@ pub struct BalancePmData {
 #[derive(Debug, Clone, Serialize)]
 #[serde(rename_all = "camelCase")]
 pub struct GiftCardData {
-    #[serde(rename = "type")]
-    payment_type: PaymentType,
     brand: GiftCardBrand,
     number: Secret<String>,
     cvc: Secret<String>,
@@ -679,8 +691,6 @@ pub struct GiftCardData {
 #[derive(Debug, Clone, Serialize)]
 #[serde(rename_all = "camelCase")]
 pub struct AchDirectDebitData {
-    #[serde(rename = "type")]
-    payment_type: PaymentType,
     bank_account_number: Secret<String>,
     bank_location_id: Secret<String>,
     owner_name: Secret<String>,
@@ -698,45 +708,25 @@ pub struct SepaDirectDebitData {
 #[derive(Debug, Clone, Serialize)]
 #[serde(rename_all = "camelCase")]
 pub struct BacsDirectDebitData {
-    #[serde(rename = "type")]
-    payment_type: PaymentType,
     bank_account_number: Secret<String>,
     bank_location_id: Secret<String>,
     holder_name: Secret<String>,
 }
 
-#[derive(Debug, Clone, Serialize)]
-#[serde(rename_all = "camelCase")]
-pub struct BancontactCardData {
-    #[serde(rename = "type")]
-    payment_type: PaymentType,
-    brand: String,
-    number: CardNumber,
-    expiry_month: Secret<String>,
-    expiry_year: Secret<String>,
-    holder_name: Secret<String>,
-}
-
 #[derive(Debug, Clone, Serialize)]
 #[serde(rename_all = "camelCase")]
 pub struct MbwayData {
-    #[serde(rename = "type")]
-    payment_type: PaymentType,
     telephone_number: Secret<String>,
 }
 
 #[derive(Debug, Clone, Serialize)]
 pub struct SamsungPayPmData {
-    #[serde(rename = "type")]
-    payment_type: PaymentType,
     #[serde(rename = "samsungPayToken")]
     samsung_pay_token: Secret<String>,
 }
 
 #[derive(Debug, Clone, Serialize)]
 pub struct OnlineBankingCzechRepublicData {
-    #[serde(rename = "type")]
-    payment_type: PaymentType,
     issuer: OnlineBankingCzechRepublicBanks,
 }
 
@@ -774,8 +764,6 @@ impl TryFrom<&common_enums::BankNames> for OnlineBankingCzechRepublicBanks {
 
 #[derive(Debug, Clone, Serialize)]
 pub struct OnlineBankingPolandData {
-    #[serde(rename = "type")]
-    payment_type: PaymentType,
     issuer: OnlineBankingPolandBanks,
 }
 
@@ -854,8 +842,6 @@ impl TryFrom<&common_enums::BankNames> for OnlineBankingPolandBanks {
 #[derive(Debug, Clone, Serialize)]
 #[serde(rename_all = "camelCase")]
 pub struct OnlineBankingSlovakiaData {
-    #[serde(rename = "type")]
-    payment_type: PaymentType,
     issuer: OnlineBankingSlovakiaBanks,
 }
 
@@ -1108,8 +1094,6 @@ impl TryFrom<&common_enums::BankNames> for OpenBankingUKIssuer {
 #[derive(Debug, Clone, Serialize)]
 #[serde(rename_all = "camelCase")]
 pub struct BlikRedirectionData {
-    #[serde(rename = "type")]
-    payment_type: PaymentType,
     blik_code: Secret<String>,
 }
 
@@ -1117,8 +1101,6 @@ pub struct BlikRedirectionData {
 #[derive(Debug, Clone, Serialize)]
 #[serde(rename_all = "camelCase")]
 pub struct BankRedirectionWithIssuer<'a> {
-    #[serde(rename = "type")]
-    payment_type: PaymentType,
     issuer: Option<&'a str>,
 }
 
@@ -1134,8 +1116,6 @@ pub struct AdyenMandate {
 #[derive(Debug, Clone, Serialize, Deserialize)]
 #[serde(rename_all = "camelCase")]
 pub struct AdyenCard {
-    #[serde(rename = "type")]
-    payment_type: PaymentType,
     number: CardNumber,
     expiry_month: Secret<String>,
     expiry_year: Secret<String>,
@@ -1149,8 +1129,6 @@ pub struct AdyenCard {
 #[derive(Debug, Clone, Serialize, Deserialize)]
 #[serde(rename_all = "camelCase")]
 pub struct AdyenPazeData {
-    #[serde(rename = "type")]
-    payment_type: PaymentType,
     number: NetworkTokenNumber,
     expiry_month: Secret<String>,
     expiry_year: Secret<String>,
@@ -1239,16 +1217,12 @@ pub struct TouchNGoData {}
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct AdyenGPay {
-    #[serde(rename = "type")]
-    payment_type: PaymentType,
     #[serde(rename = "googlePayToken")]
     google_pay_token: Secret<String>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct AdyenApplePay {
-    #[serde(rename = "type")]
-    payment_type: PaymentType,
     #[serde(rename = "applePayToken")]
     apple_pay_token: Secret<String>,
 }
@@ -1257,8 +1231,6 @@ pub struct AdyenApplePay {
 #[derive(Debug, Clone, Serialize, Deserialize)]
 #[serde(rename_all = "camelCase")]
 pub struct AdyenNetworkTokenData {
-    #[serde(rename = "type")]
-    payment_type: PaymentType,
     number: NetworkTokenNumber,
     expiry_month: Secret<String>,
     expiry_year: Secret<String>,
@@ -1362,6 +1334,7 @@ pub enum PaymentType {
     Scheme,
     #[serde(rename = "networkToken")]
     NetworkToken,
+    #[serde(rename = "trustly")]
     Trustly,
     #[serde(rename = "touchngo")]
     TouchNGo,
@@ -1555,34 +1528,6 @@ impl TryFrom<&common_enums::BankNames> for AdyenTestBankNames<'_> {
     }
 }
 
-pub struct AdyenBankNames<'a>(&'a str);
-
-impl TryFrom<&common_enums::BankNames> for AdyenBankNames<'_> {
-    type Error = Error;
-    fn try_from(bank: &common_enums::BankNames) -> Result<Self, Self::Error> {
-        Ok(match bank {
-            common_enums::BankNames::AbnAmro => Self("0031"),
-            common_enums::BankNames::AsnBank => Self("0761"),
-            common_enums::BankNames::Bunq => Self("0802"),
-            common_enums::BankNames::Ing => Self("0721"),
-            common_enums::BankNames::Knab => Self("0801"),
-            common_enums::BankNames::N26 => Self("0807"),
-            common_enums::BankNames::NationaleNederlanden => Self("0808"),
-            common_enums::BankNames::Rabobank => Self("0021"),
-            common_enums::BankNames::Regiobank => Self("0771"),
-            common_enums::BankNames::Revolut => Self("0805"),
-            common_enums::BankNames::SnsBank => Self("0751"),
-            common_enums::BankNames::TriodosBank => Self("0511"),
-            common_enums::BankNames::VanLanschot => Self("0161"),
-            common_enums::BankNames::Yoursafe => Self("0806"),
-            _ => Err(errors::ConnectorError::NotSupported {
-                message: String::from("BankRedirect"),
-                connector: "Adyen",
-            })?,
-        })
-    }
-}
-
 impl TryFrom<&types::ConnectorAuthType> for AdyenAuthType {
     type Error = Error;
     fn try_from(auth_type: &types::ConnectorAuthType) -> Result<Self, Self::Error> {
@@ -1676,7 +1621,6 @@ impl TryFrom<&types::PaymentsPreProcessingRouterData> for AdyenBalanceRequest<'_
                 match gift_card_data.as_ref() {
                     domain::GiftCardData::Givex(gift_card_data) => {
                         let balance_pm = BalancePmData {
-                            payment_type: GiftCardBrand::Givex,
                             number: gift_card_data.number.clone(),
                             cvc: gift_card_data.cvc.clone(),
                         };
@@ -1943,7 +1887,6 @@ impl TryFrom<(&domain::BankDebitData, &types::PaymentsAuthorizeRouterData)>
                 ..
             } => Ok(AdyenPaymentMethod::AchDirectDebit(Box::new(
                 AchDirectDebitData {
-                    payment_type: PaymentType::AchDirectDebit,
                     bank_account_number: account_number.clone(),
                     bank_location_id: routing_number.clone(),
                     owner_name: item.get_billing_full_name()?,
@@ -1961,12 +1904,12 @@ impl TryFrom<(&domain::BankDebitData, &types::PaymentsAuthorizeRouterData)>
                 ..
             } => Ok(AdyenPaymentMethod::BacsDirectDebit(Box::new(
                 BacsDirectDebitData {
-                    payment_type: PaymentType::BacsDirectDebit,
                     bank_account_number: account_number.clone(),
                     bank_location_id: sort_code.clone(),
                     holder_name: item.get_billing_full_name()?,
                 },
             ))),
+
             domain::BankDebitData::BecsBankDebit { .. } => {
                 Err(errors::ConnectorError::NotImplemented(
                     utils::get_unimplemented_payment_method_error_message("Adyen"),
@@ -2031,7 +1974,6 @@ impl TryFrom<&domain::GiftCardData> for AdyenPaymentMethod<'_> {
             domain::GiftCardData::PaySafeCard {} => Ok(AdyenPaymentMethod::PaySafeCard),
             domain::GiftCardData::Givex(givex_data) => {
                 let gift_card_pm = GiftCardData {
-                    payment_type: PaymentType::Giftcard,
                     brand: GiftCardBrand::Givex,
                     number: givex_data.number.clone(),
                     cvc: givex_data.cvc.clone(),
@@ -2064,7 +2006,6 @@ impl TryFrom<(&domain::Card, Option<Secret<String>>)> for AdyenPaymentMethod<'_>
         (card, card_holder_name): (&domain::Card, Option<Secret<String>>),
     ) -> Result<Self, Self::Error> {
         let adyen_card = AdyenCard {
-            payment_type: PaymentType::Scheme,
             number: card.card_number.clone(),
             expiry_month: card.card_exp_month.clone(),
             expiry_year: card.get_expiry_year_4_digit(),
@@ -2143,37 +2084,20 @@ impl TryFrom<(&domain::WalletData, &types::PaymentsAuthorizeRouterData)>
         match wallet_data {
             domain::WalletData::GooglePay(data) => {
                 let gpay_data = AdyenGPay {
-                    payment_type: PaymentType::Googlepay,
                     google_pay_token: Secret::new(data.tokenization_data.token.to_owned()),
                 };
                 Ok(AdyenPaymentMethod::Gpay(Box::new(gpay_data)))
             }
             domain::WalletData::ApplePay(data) => {
                 let apple_pay_data = AdyenApplePay {
-                    payment_type: PaymentType::Applepay,
                     apple_pay_token: Secret::new(data.payment_data.to_string()),
                 };
 
                 Ok(AdyenPaymentMethod::ApplePay(Box::new(apple_pay_data)))
             }
-            domain::WalletData::PaypalRedirect(_) => {
-                let wallet = PmdForPaymentType {
-                    payment_type: PaymentType::Paypal,
-                };
-                Ok(AdyenPaymentMethod::AdyenPaypal(Box::new(wallet)))
-            }
-            domain::WalletData::AliPayRedirect(_) => {
-                let alipay_data = PmdForPaymentType {
-                    payment_type: PaymentType::Alipay,
-                };
-                Ok(AdyenPaymentMethod::AliPay(Box::new(alipay_data)))
-            }
-            domain::WalletData::AliPayHkRedirect(_) => {
-                let alipay_hk_data = PmdForPaymentType {
-                    payment_type: PaymentType::AlipayHk,
-                };
-                Ok(AdyenPaymentMethod::AliPayHk(Box::new(alipay_hk_data)))
-            }
+            domain::WalletData::PaypalRedirect(_) => Ok(AdyenPaymentMethod::AdyenPaypal),
+            domain::WalletData::AliPayRedirect(_) => Ok(AdyenPaymentMethod::AliPay),
+            domain::WalletData::AliPayHkRedirect(_) => Ok(AdyenPaymentMethod::AliPayHk),
             domain::WalletData::GoPayRedirect(_) => {
                 let go_pay_data = GoPayData {};
                 Ok(AdyenPaymentMethod::GoPay(Box::new(go_pay_data)))
@@ -2197,21 +2121,14 @@ impl TryFrom<(&domain::WalletData, &types::PaymentsAuthorizeRouterData)>
             domain::WalletData::MbWayRedirect(_) => {
                 let phone_details = item.get_billing_phone()?;
                 let mbway_data = MbwayData {
-                    payment_type: PaymentType::Mbway,
                     telephone_number: phone_details.get_number_with_country_code()?,
                 };
                 Ok(AdyenPaymentMethod::Mbway(Box::new(mbway_data)))
             }
-            domain::WalletData::MobilePayRedirect(_) => {
-                let data = PmdForPaymentType {
-                    payment_type: PaymentType::MobilePay,
-                };
-                Ok(AdyenPaymentMethod::MobilePay(Box::new(data)))
-            }
+            domain::WalletData::MobilePayRedirect(_) => Ok(AdyenPaymentMethod::MobilePay),
             domain::WalletData::WeChatPayRedirect(_) => Ok(AdyenPaymentMethod::WeChatPayWeb),
             domain::WalletData::SamsungPay(samsung_data) => {
                 let data = SamsungPayPmData {
-                    payment_type: PaymentType::Samsungpay,
                     samsung_pay_token: samsung_data.payment_credential.token_data.data.to_owned(),
                 };
                 Ok(AdyenPaymentMethod::SamsungPay(Box::new(data)))
@@ -2219,7 +2136,6 @@ impl TryFrom<(&domain::WalletData, &types::PaymentsAuthorizeRouterData)>
             domain::WalletData::Paze(_) => match item.payment_method_token.clone() {
                 Some(types::PaymentMethodToken::PazeDecrypt(paze_decrypted_data)) => {
                     let data = AdyenPazeData {
-                        payment_type: PaymentType::NetworkToken,
                         number: paze_decrypted_data.token.payment_token,
                         expiry_month: paze_decrypted_data.token.token_expiration_month,
                         expiry_year: paze_decrypted_data.token.token_expiration_year,
@@ -2308,14 +2224,11 @@ impl
         ) = value;
         match pay_later_data {
             domain::payments::PayLaterData::KlarnaRedirect { .. } => {
-                let klarna = PmdForPaymentType {
-                    payment_type: PaymentType::Klarna,
-                };
                 check_required_field(shopper_email, "email")?;
                 check_required_field(shopper_reference, "customer_id")?;
                 check_required_field(country_code, "billing.country")?;
 
-                Ok(AdyenPaymentMethod::AdyenKlarna(Box::new(klarna)))
+                Ok(AdyenPaymentMethod::AdyenKlarna)
             }
             domain::payments::PayLaterData::AffirmRedirect { .. } => {
                 check_required_field(shopper_email, "email")?;
@@ -2323,11 +2236,7 @@ impl
                 check_required_field(telephone_number, "billing.phone")?;
                 check_required_field(billing_address, "billing")?;
 
-                Ok(AdyenPaymentMethod::AdyenAffirm(Box::new(
-                    PmdForPaymentType {
-                        payment_type: PaymentType::Affirm,
-                    },
-                )))
+                Ok(AdyenPaymentMethod::AdyenAffirm)
             }
             domain::payments::PayLaterData::AfterpayClearpayRedirect { .. } => {
                 check_required_field(shopper_email, "email")?;
@@ -2341,9 +2250,7 @@ impl
                         | api_enums::CountryAlpha2::FR
                         | api_enums::CountryAlpha2::ES
                         | api_enums::CountryAlpha2::GB => Ok(AdyenPaymentMethod::ClearPay),
-                        _ => Ok(AdyenPaymentMethod::AfterPay(Box::new(PmdForPaymentType {
-                            payment_type: PaymentType::Afterpaytouch,
-                        }))),
+                        _ => Ok(AdyenPaymentMethod::AfterPay),
                     }
                 } else {
                     Err(errors::ConnectorError::MissingRequiredField {
@@ -2371,11 +2278,7 @@ impl
                 check_required_field(shopper_email, "email")?;
                 check_required_field(billing_address, "billing")?;
                 check_required_field(delivery_address, "shipping")?;
-                Ok(AdyenPaymentMethod::AlmaPayLater(Box::new(
-                    PmdForPaymentType {
-                        payment_type: PaymentType::Alma,
-                    },
-                )))
+                Ok(AdyenPaymentMethod::AlmaPayLater)
             }
             domain::payments::PayLaterData::AtomeRedirect { .. } => {
                 check_required_field(shopper_email, "email")?;
@@ -2397,15 +2300,13 @@ impl
 impl
     TryFrom<(
         &domain::BankRedirectData,
-        Option<bool>,
         &types::PaymentsAuthorizeRouterData,
     )> for AdyenPaymentMethod<'_>
 {
     type Error = Error;
     fn try_from(
-        (bank_redirect_data, test_mode, item): (
+        (bank_redirect_data, item): (
             &domain::BankRedirectData,
-            Option<bool>,
             &types::PaymentsAuthorizeRouterData,
         ),
     ) -> Result<Self, Self::Error> {
@@ -2415,39 +2316,33 @@ impl
                 card_exp_month,
                 card_exp_year,
                 ..
-            } => Ok(AdyenPaymentMethod::BancontactCard(Box::new(
-                BancontactCardData {
-                    payment_type: PaymentType::Scheme,
-                    brand: "bcmc".to_string(),
-                    number: card_number
-                        .as_ref()
-                        .ok_or(errors::ConnectorError::MissingRequiredField {
-                            field_name: "bancontact_card.card_number",
-                        })?
-                        .clone(),
-                    expiry_month: card_exp_month
-                        .as_ref()
-                        .ok_or(errors::ConnectorError::MissingRequiredField {
-                            field_name: "bancontact_card.card_exp_month",
-                        })?
-                        .clone(),
-                    expiry_year: card_exp_year
-                        .as_ref()
-                        .ok_or(errors::ConnectorError::MissingRequiredField {
-                            field_name: "bancontact_card.card_exp_year",
-                        })?
-                        .clone(),
-                    holder_name: item.get_billing_full_name()?,
-                },
-            ))),
-            domain::BankRedirectData::Bizum { .. } => {
-                Ok(AdyenPaymentMethod::Bizum(Box::new(PmdForPaymentType {
-                    payment_type: PaymentType::Bizum,
-                })))
-            }
+            } => Ok(AdyenPaymentMethod::BancontactCard(Box::new(AdyenCard {
+                brand: Some(CardBrand::Bcmc),
+                number: card_number
+                    .as_ref()
+                    .ok_or(errors::ConnectorError::MissingRequiredField {
+                        field_name: "bancontact_card.card_number",
+                    })?
+                    .clone(),
+                expiry_month: card_exp_month
+                    .as_ref()
+                    .ok_or(errors::ConnectorError::MissingRequiredField {
+                        field_name: "bancontact_card.card_exp_month",
+                    })?
+                    .clone(),
+                expiry_year: card_exp_year
+                    .as_ref()
+                    .ok_or(errors::ConnectorError::MissingRequiredField {
+                        field_name: "bancontact_card.card_exp_year",
+                    })?
+                    .clone(),
+                holder_name: Some(item.get_billing_full_name()?),
+                cvc: None,
+                network_payment_reference: None,
+            }))),
+            domain::BankRedirectData::Bizum { .. } => Ok(AdyenPaymentMethod::Bizum),
             domain::BankRedirectData::Blik { blik_code } => {
                 Ok(AdyenPaymentMethod::Blik(Box::new(BlikRedirectionData {
-                    payment_type: PaymentType::Blik,
                     blik_code: Secret::new(blik_code.clone().ok_or(
                         errors::ConnectorError::MissingRequiredField {
                             field_name: "blik_code",
@@ -2457,7 +2352,6 @@ impl
             }
             domain::BankRedirectData::Eps { bank_name, .. } => Ok(AdyenPaymentMethod::Eps(
                 Box::new(BankRedirectionWithIssuer {
-                    payment_type: PaymentType::Eps,
                     issuer: Some(
                         AdyenTestBankNames::try_from(&bank_name.ok_or(
                             errors::ConnectorError::MissingRequiredField {
@@ -2468,55 +2362,24 @@ impl
                     ),
                 }),
             )),
-            domain::BankRedirectData::Ideal { bank_name, .. } => {
-                let issuer = if test_mode.unwrap_or(true) {
-                    Some(
-                        AdyenTestBankNames::try_from(&bank_name.ok_or(
-                            errors::ConnectorError::MissingRequiredField {
-                                field_name: "ideal.bank_name",
-                            },
-                        )?)?
-                        .0,
-                    )
-                } else {
-                    Some(
-                        AdyenBankNames::try_from(&bank_name.ok_or(
-                            errors::ConnectorError::MissingRequiredField {
-                                field_name: "ideal.bank_name",
-                            },
-                        )?)?
-                        .0,
-                    )
-                };
-                Ok(AdyenPaymentMethod::Ideal(Box::new(
-                    BankRedirectionWithIssuer {
-                        payment_type: PaymentType::Ideal,
-                        issuer,
-                    },
-                )))
-            }
+            domain::BankRedirectData::Ideal { .. } => Ok(AdyenPaymentMethod::Ideal),
             domain::BankRedirectData::OnlineBankingCzechRepublic { issuer } => {
                 Ok(AdyenPaymentMethod::OnlineBankingCzechRepublic(Box::new(
                     OnlineBankingCzechRepublicData {
-                        payment_type: PaymentType::OnlineBankingCzechRepublic,
                         issuer: OnlineBankingCzechRepublicBanks::try_from(issuer)?,
                     },
                 )))
             }
-            domain::BankRedirectData::OnlineBankingFinland { .. } => Ok(
-                AdyenPaymentMethod::OnlineBankingFinland(Box::new(PmdForPaymentType {
-                    payment_type: PaymentType::OnlineBankingFinland,
-                })),
-            ),
+            domain::BankRedirectData::OnlineBankingFinland { .. } => {
+                Ok(AdyenPaymentMethod::OnlineBankingFinland)
+            }
             domain::BankRedirectData::OnlineBankingPoland { issuer } => Ok(
                 AdyenPaymentMethod::OnlineBankingPoland(Box::new(OnlineBankingPolandData {
-                    payment_type: PaymentType::OnlineBankingPoland,
                     issuer: OnlineBankingPolandBanks::try_from(issuer)?,
                 })),
             ),
             domain::BankRedirectData::OnlineBankingSlovakia { issuer } => Ok(
                 AdyenPaymentMethod::OnlineBankingSlovakia(Box::new(OnlineBankingSlovakiaData {
-                    payment_type: PaymentType::OnlineBankingSlovakia,
                     issuer: OnlineBankingSlovakiaBanks::try_from(issuer)?,
                 })),
             ),
@@ -2589,11 +2452,7 @@ impl
             domain::BankTransferData::MandiriVaBankTransfer {} => Ok(
                 AdyenPaymentMethod::MandiriVa(Box::new(DokuBankData::try_from(item)?)),
             ),
-            domain::BankTransferData::Pix { .. } => {
-                Ok(AdyenPaymentMethod::Pix(Box::new(PmdForPaymentType {
-                    payment_type: PaymentType::Pix,
-                })))
-            }
+            domain::BankTransferData::Pix { .. } => Ok(AdyenPaymentMethod::Pix),
             domain::BankTransferData::AchBankTransfer { .. }
             | domain::BankTransferData::SepaBankTransfer { .. }
             | domain::BankTransferData::BacsBankTransfer { .. }
@@ -2673,9 +2532,9 @@ impl
                             .ok_or_else(missing_field_err("mandate_id"))?,
                     ),
                 };
-                Ok::<AdyenPaymentMethod<'_>, Self::Error>(AdyenPaymentMethod::Mandate(Box::new(
-                    adyen_mandate,
-                )))
+                Ok::<PaymentMethod<'_>, Self::Error>(PaymentMethod::AdyenMandatePaymentMethod(
+                    Box::new(adyen_mandate),
+                ))
             }
             payments::MandateReferenceId::NetworkMandateId(network_mandate_id) => {
                 match item.router_data.request.payment_method_data {
@@ -2695,7 +2554,6 @@ impl
 
                         let card_holder_name = item.router_data.get_optional_billing_full_name();
                         let adyen_card = AdyenCard {
-                            payment_type: PaymentType::Scheme,
                             number: card_details_for_network_transaction_id.card_number.clone(),
                             expiry_month: card_details_for_network_transaction_id
                                 .card_exp_month
@@ -2708,7 +2566,9 @@ impl
                             brand: Some(brand),
                             network_payment_reference: Some(Secret::new(network_mandate_id)),
                         };
-                        Ok(AdyenPaymentMethod::AdyenCard(Box::new(adyen_card)))
+                        Ok(PaymentMethod::AdyenPaymentMethod(Box::new(
+                            AdyenPaymentMethod::AdyenCard(Box::new(adyen_card)),
+                        )))
                     }
                     domain::PaymentMethodData::CardRedirect(_)
                     | domain::PaymentMethodData::Wallet(_)
@@ -2742,7 +2602,6 @@ impl
                         let brand = CardBrand::try_from(&card_issuer)?;
                         let card_holder_name = item.router_data.get_optional_billing_full_name();
                         let adyen_network_token = AdyenNetworkTokenData {
-                            payment_type: PaymentType::NetworkToken,
                             number: token_data.get_network_token(),
                             expiry_month: token_data.get_network_token_expiry_month(),
                             expiry_year: token_data.get_expiry_year_4_digit(),
@@ -2752,8 +2611,8 @@ impl
                                 network_mandate_id.network_transaction_id,
                             )),
                         };
-                        Ok(AdyenPaymentMethod::NetworkToken(Box::new(
-                            adyen_network_token,
+                        Ok(PaymentMethod::AdyenPaymentMethod(Box::new(
+                            AdyenPaymentMethod::NetworkToken(Box::new(adyen_network_token)),
                         )))
                     }
 
@@ -2853,7 +2712,10 @@ impl
         let additional_data = get_additional_data(item.router_data);
         let return_url = item.router_data.request.get_router_return_url()?;
         let card_holder_name = item.router_data.get_optional_billing_full_name();
-        let payment_method = AdyenPaymentMethod::try_from((card_data, card_holder_name))?;
+        let payment_method = PaymentMethod::AdyenPaymentMethod(Box::new(
+            AdyenPaymentMethod::try_from((card_data, card_holder_name))?,
+        ));
+
         let shopper_email = item.router_data.get_optional_billing_email();
         let shopper_name = get_shopper_name(item.router_data.get_optional_billing());
         let (store, splits) = match item.router_data.request.split_payments.as_ref() {
@@ -2919,7 +2781,10 @@ impl
         let browser_info = get_browser_info(item.router_data)?;
         let additional_data = get_additional_data(item.router_data);
         let return_url = item.router_data.request.get_router_return_url()?;
-        let payment_method = AdyenPaymentMethod::try_from((bank_debit_data, item.router_data))?;
+        let payment_method = PaymentMethod::AdyenPaymentMethod(Box::new(
+            AdyenPaymentMethod::try_from((bank_debit_data, item.router_data))?,
+        ));
+
         let country_code = get_country_code(item.router_data.get_optional_billing());
         let (store, splits) = match item.router_data.request.split_payments.as_ref() {
             Some(common_types::payments::SplitPaymentsRequest::AdyenSplitPayment(
@@ -2982,7 +2847,9 @@ impl
         let recurring_processing_model = get_recurring_processing_model(item.router_data)?.0;
         let browser_info = get_browser_info(item.router_data)?;
         let additional_data = get_additional_data(item.router_data);
-        let payment_method = AdyenPaymentMethod::try_from((voucher_data, item.router_data))?;
+        let payment_method = PaymentMethod::AdyenPaymentMethod(Box::new(
+            AdyenPaymentMethod::try_from((voucher_data, item.router_data))?,
+        ));
         let return_url = item.router_data.request.get_router_return_url()?;
         let social_security_number = get_social_security_number(voucher_data);
         let billing_address =
@@ -3047,7 +2914,10 @@ impl
         let amount = get_amount_data(item);
         let auth_type = AdyenAuthType::try_from(&item.router_data.connector_auth_type)?;
         let shopper_interaction = AdyenShopperInteraction::from(item.router_data);
-        let payment_method = AdyenPaymentMethod::try_from((bank_transfer_data, item.router_data))?;
+        let payment_method = PaymentMethod::AdyenPaymentMethod(Box::new(
+            AdyenPaymentMethod::try_from((bank_transfer_data, item.router_data))?,
+        ));
+
         let return_url = item.router_data.request.get_router_return_url()?;
         let (store, splits) = match item.router_data.request.split_payments.as_ref() {
             Some(common_types::payments::SplitPaymentsRequest::AdyenSplitPayment(
@@ -3108,7 +2978,9 @@ impl
         let auth_type = AdyenAuthType::try_from(&item.router_data.connector_auth_type)?;
         let shopper_interaction = AdyenShopperInteraction::from(item.router_data);
         let return_url = item.router_data.request.get_router_return_url()?;
-        let payment_method = AdyenPaymentMethod::try_from(gift_card_data)?;
+        let payment_method = PaymentMethod::AdyenPaymentMethod(Box::new(
+            AdyenPaymentMethod::try_from(gift_card_data)?,
+        ));
         let (store, splits) = match item.router_data.request.split_payments.as_ref() {
             Some(common_types::payments::SplitPaymentsRequest::AdyenSplitPayment(
                 adyen_split_payment,
@@ -3172,11 +3044,9 @@ impl
         let browser_info = get_browser_info(item.router_data)?;
         let additional_data = get_additional_data(item.router_data);
         let return_url = item.router_data.request.get_router_return_url()?;
-        let payment_method = AdyenPaymentMethod::try_from((
-            bank_redirect_data,
-            item.router_data.test_mode,
-            item.router_data,
-        ))?;
+        let payment_method = PaymentMethod::AdyenPaymentMethod(Box::new(
+            AdyenPaymentMethod::try_from((bank_redirect_data, item.router_data))?,
+        ));
         let (shopper_locale, country) = get_redirect_extra_details(item.router_data)?;
         let line_items = Some(get_line_items(item));
         let billing_address =
@@ -3274,7 +3144,9 @@ impl
         let auth_type = AdyenAuthType::try_from(&item.router_data.connector_auth_type)?;
         let browser_info = get_browser_info(item.router_data)?;
         let additional_data = get_additional_data(item.router_data);
-        let payment_method = AdyenPaymentMethod::try_from((wallet_data, item.router_data))?;
+        let payment_method = PaymentMethod::AdyenPaymentMethod(Box::new(
+            AdyenPaymentMethod::try_from((wallet_data, item.router_data))?,
+        ));
         let shopper_interaction = AdyenShopperInteraction::from(item.router_data);
         let channel = get_channel_type(item.router_data.request.payment_method_type);
         let (recurring_processing_model, store_payment_method, shopper_reference) =
@@ -3374,16 +3246,17 @@ impl
             get_address_info(item.router_data.get_optional_shipping()).and_then(Result::ok);
         let line_items = Some(get_line_items(item));
         let telephone_number = get_telephone_number(item.router_data);
-        let payment_method = AdyenPaymentMethod::try_from((
-            paylater_data,
-            &country_code,
-            &shopper_email,
-            &shopper_reference,
-            &shopper_name,
-            &telephone_number,
-            &billing_address,
-            &delivery_address,
-        ))?;
+        let payment_method =
+            PaymentMethod::AdyenPaymentMethod(Box::new(AdyenPaymentMethod::try_from((
+                paylater_data,
+                &country_code,
+                &shopper_email,
+                &shopper_reference,
+                &shopper_name,
+                &telephone_number,
+                &billing_address,
+                &delivery_address,
+            ))?));
         let (store, splits) = match item.router_data.request.split_payments.as_ref() {
             Some(common_types::payments::SplitPaymentsRequest::AdyenSplitPayment(
                 adyen_split_payment,
@@ -3440,7 +3313,10 @@ impl
         let (item, card_redirect_data) = value;
         let amount = get_amount_data(item);
         let auth_type = AdyenAuthType::try_from(&item.router_data.connector_auth_type)?;
-        let payment_method = AdyenPaymentMethod::try_from(card_redirect_data)?;
+        let payment_method = PaymentMethod::AdyenPaymentMethod(Box::new(
+            AdyenPaymentMethod::try_from(card_redirect_data)?,
+        ));
+
         let shopper_interaction = AdyenShopperInteraction::from(item.router_data);
         let return_url = item.router_data.request.get_router_return_url()?;
         let shopper_name = get_shopper_name(item.router_data.get_optional_billing());
@@ -5594,7 +5470,6 @@ impl TryFrom<(&domain::NetworkTokenData, Option<Secret<String>>)> for AdyenPayme
         (token_data, card_holder_name): (&domain::NetworkTokenData, Option<Secret<String>>),
     ) -> Result<Self, Self::Error> {
         let adyen_network_token = AdyenNetworkTokenData {
-            payment_type: PaymentType::NetworkToken,
             number: token_data.get_network_token(),
             expiry_month: token_data.get_network_token_expiry_month(),
             expiry_year: token_data.get_expiry_year_4_digit(),
@@ -5638,7 +5513,10 @@ impl
         let additional_data = get_additional_data(item.router_data);
         let return_url = item.router_data.request.get_router_return_url()?;
         let card_holder_name = item.router_data.get_optional_billing_full_name();
-        let payment_method = AdyenPaymentMethod::try_from((token_data, card_holder_name))?;
+        let payment_method = PaymentMethod::AdyenPaymentMethod(Box::new(
+            AdyenPaymentMethod::try_from((token_data, card_holder_name))?,
+        ));
+
         let shopper_email = item.router_data.request.email.clone();
         let shopper_name = get_shopper_name(item.router_data.get_optional_billing());
         let mpi_data = AdyenMpiData {

## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
`Trustly` and `Ideal` Bank Redirect payments were failing for `Ayden`.
`Trustly` error message: `Required object 'paymentMethod' is not provided.` 
`Ideal` error message: `Could not find issuer for issuerId`

For `Trustly`, populated the `paymentMethod` to fix the issue.
`Ideal` is moving to a more centralized infrastructure to process payments, which does not need issuer. So removed issuer field from connector request body.
Reference: https://docs.adyen.com/payment-methods/ideal/api-only/

Multiple PMTs were failing due to this error `Required object 'paymentMethod' is not provided.` fixed.

Also, cypress test for `Giropay` and `Sofort` is removed for connector `Adyen`. These payment methods have been deprecated and removed in this PR: https://github.com/juspay/hyperswitch/pull/7100

### Additional Changes

- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables

<!--
Provide links to the files with corresponding changes.

Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->


## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.

If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->
https://github.com/juspay/hyperswitch-cloud/issues/8251

## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->

No-3DS auto capture
<img width="1720" alt="Screenshot 2025-02-10 at 5 25 26 PM" src="https://github.com/user-attachments/assets/0ca86a25-1c0c-41cf-9348-9676b1254cf7" />

3DS auto capture
<img width="1715" alt="Screenshot 2025-02-10 at 5 25 46 PM" src="https://github.com/user-attachments/assets/fb4f99ae-2d89-4833-8e1c-f918c303020d" />

No-3DS manual capture
<img width="1724" alt="Screenshot 2025-02-10 at 5 26 06 PM" src="https://github.com/user-attachments/assets/407799ef-67de-4f26-b458-a5a4329303f4" />

3DS manual capture
<img width="1727" alt="Screenshot 2025-02-10 at 5 26 54 PM" src="https://github.com/user-attachments/assets/6dcf53b9-4c2e-45c9-a521-8985090032f8" />


Bank Redirect -- All test cases in bank redirect is passed, other than `ideal`. Ideal's cypress test failing as ideal itself is redirecting to some other origin.

<img width="1722" alt="Screenshot 2025-02-10 at 5 36 47 PM" src="https://github.com/user-attachments/assets/a823e7cb-744a-455f-b004-63b6834fb63c" />

<img width="1725" alt="Screenshot 2025-02-10 at 5 36 56 PM" src="https://github.com/user-attachments/assets/ab0369c1-d49c-4606-9830-63992c701040" />


1. Trustly
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_6yAsmqONdJRee1Za1RsUCvaXlSG6kp8qU12QlluTaHycTOiojrk2b3huLTRPT2ds' \
--data-raw '{
    "amount": 1000,
    "currency": "EUR",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 1000,
    "payment_method": "bank_redirect",
    "payment_method_type": "trustly",
    "payment_method_data": {
        "bank_redirect": {
        "trustly": {
            "billing_details": {
            "billing_name": "John Doe"
            },
            "bank_name": "ing",
            "preferred_language": "en",
            "country": "FI"
        }
        }
    },
    "customer_id": "StripeCustomer",
    "email": "abcdef123@gmail.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payment request",
    "authentication_type": "three_ds",
    "return_url": "https://duck.com",
    "billing": {
        "address": {
        "first_name": "John",
        "last_name": "Doe",
        "line1": "1467",
        "line2": "Harrison Street",
        "line3": "Harrison Street",
        "city": "San Fransico",
        "state": "California",
        "zip": "94122",
        "country": "FI"
        }
    },
    "browser_info": {
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "language": "nl-NL",
        "color_depth": 24,
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "127.0.0.1"
    },
    "shipping": {
        "address": {
        "line1": "1467",
        "line2": "Harrison Street",
        "line3": "Harrison Street",
        "city": "San Fransico",
        "state": "California",
        "zip": "94122",
        "country": "US",
        "first_name": "John",
        "last_name": "Doe"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}
'
```
Response
```
{
    "payment_id": "pay_VXuewdMlK3cNlnjOG6Ni",
    "merchant_id": "merchant_1738137594",
    "status": "requires_customer_action",
    "amount": 1000,
    "net_amount": 1000,
    "shipping_cost": null,
    "amount_capturable": 1000,
    "amount_received": null,
    "connector": "adyen",
    "client_secret": "pay_VXuewdMlK3cNlnjOG6Ni_secret_iJqTyE7HzC1WPREUTMkm",
    "created": "2025-01-29T11:00:14.555Z",
    "currency": "EUR",
    "customer_id": null,
    "customer": null,
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "bank_redirect",
    "payment_method_data": {
        "bank_redirect": {
            "type": "BankRedirectResponse",
            "bank_name": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": {
        "type": "redirect_to_url",
        "redirect_to_url": "http://localhost:8080/payments/redirect/pay_VXuewdMlK3cNlnjOG6Ni/merchant_1738137594/pay_VXuewdMlK3cNlnjOG6Ni_1"
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "trustly",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "VBLF93X8LV2D97V5",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "VBLF93X8LV2D97V5",
    "payment_link": null,
    "profile_id": "pro_LqHTmp6SEFvZsZEzNevb",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_iC4SXg873LfMdmklc82l",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-01-29T11:15:14.555Z",
    "fingerprint": null,
    "browser_info": {
        "language": "nl-NL",
        "time_zone": 0,
        "ip_address": "127.0.0.1",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
        "color_depth": 24,
        "java_enabled": true,
        "screen_width": 1536,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "screen_height": 723,
        "java_script_enabled": true
    },
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2025-01-29T11:00:15.006Z",
    "split_payments": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null
}
```

2. Ideal
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_6yAsmqONdJRee1Za1RsUCvaXlSG6kp8qU12QlluTaHycTOiojrk2b3huLTRPT2ds' \
--data-raw '{
    "amount": 100,
    "currency": "EUR",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 100,
    "customer_id": "StripeCustomer",
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "three_ds",
    "return_url": "https://duck.com",
    "payment_method": "bank_redirect",
    "payment_method_type": "ideal",
    "payment_method_data": {
        "bank_redirect": {
            "ideal": {
                "billing_details": {
                    "billing_name": "Example",
                    "email": "guest@example.com"
                },
                "bank_name": "ing"
            }
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "NL",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "NL",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "browser_info": {
        "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
        "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
        "language": "nl-NL",
        "color_depth": 24,
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "125.0.0.1"
    },
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "order_details": [
        {
            "product_name": "Apple iphone 15",
            "quantity": 1,
            "amount": 6540,
            "account_name": "transaction_processing"
        }
    ]
}'
```

Response
```
{
    "payment_id": "pay_Bs4sZJUYU8Bn6dGeXclU",
    "merchant_id": "merchant_1738137594",
    "status": "requires_customer_action",
    "amount": 100,
    "net_amount": 100,
    "shipping_cost": null,
    "amount_capturable": 100,
    "amount_received": null,
    "connector": "adyen",
    "client_secret": "pay_Bs4sZJUYU8Bn6dGeXclU_secret_AFpcBZamAqPIKy2HqZKP",
    "created": "2025-01-29T10:56:33.114Z",
    "currency": "EUR",
    "customer_id": "StripeCustomer",
    "customer": {
        "id": "StripeCustomer",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+1"
    },
    "description": "Its my first payment request",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "bank_redirect",
    "payment_method_data": {
        "bank_redirect": {
            "type": "BankRedirectResponse",
            "bank_name": "ing"
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "NL",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "NL",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "order_details": [
        {
            "brand": null,
            "amount": 6540,
            "category": null,
            "quantity": 1,
            "tax_rate": null,
            "product_id": null,
            "product_name": "Apple iphone 15",
            "product_type": null,
            "sub_category": null,
            "product_img_link": null,
            "product_tax_code": null,
            "total_tax_amount": null,
            "requires_shipping": null
        }
    ],
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://duck.com/",
    "authentication_type": "three_ds",
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "next_action": {
        "type": "redirect_to_url",
        "redirect_to_url": "http://localhost:8080/payments/redirect/pay_Bs4sZJUYU8Bn6dGeXclU/merchant_1738137594/pay_Bs4sZJUYU8Bn6dGeXclU_1"
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "ideal",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "StripeCustomer",
        "created_at": 1738148193,
        "expires": 1738151793,
        "secret": "epk_725ec96a42464776b2490a336cd39d60"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": "CRFMZRL9WB7WCCV5",
    "frm_message": null,
    "metadata": {
        "udf1": "value1",
        "login_date": "2019-09-10T10:11:12Z",
        "new_customer": "true"
    },
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "CRFMZRL9WB7WCCV5",
    "payment_link": null,
    "profile_id": "pro_LqHTmp6SEFvZsZEzNevb",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_iC4SXg873LfMdmklc82l",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-01-29T11:11:33.114Z",
    "fingerprint": null,
    "browser_info": {
        "language": "nl-NL",
        "time_zone": 0,
        "ip_address": "125.0.0.1",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
        "color_depth": 24,
        "java_enabled": true,
        "screen_width": 1536,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "screen_height": 723,
        "java_script_enabled": true
    },
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2025-01-29T10:56:33.760Z",
    "split_payments": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null
}
```

## Checklist
<!-- Put an `x` in the boxes that apply -->

- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
