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
fix(connector): [ADYEN] field type fixed for required fields (#8997)
sweta-sharmab69ed06959c9
diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.tomlindex 0f9fa99540..ed96969454 100644--- a/crates/connector_configs/toml/development.toml+++ b/crates/connector_configs/toml/development.toml@@ -4328,6 +4328,24 @@ options=["Connector"]payment_method_type = "sofort"[[shift4.bank_redirect]]payment_method_type = "eps"+[[shift4.bank_redirect]]+ payment_method_type = "trustly"+[[shift4.bank_redirect]]+ payment_method_type = "blik"+[[shift4.wallet]]+ payment_method_type = "ali_pay"+[[shift4.wallet]]+ payment_method_type = "we_chat_pay"+[[shift4.wallet]]+ payment_method_type = "paysera"+[[shift4.wallet]]+ payment_method_type = "skrill"+[[shift4.pay_later]]+ payment_method_type = "klarna"+[[shift4.voucher]]+ payment_method_type = "boleto"+[[shift4.crypto]]+ payment_method_type = "crypto_currency"[shift4.connector_auth.HeaderKey]api_key="API Key"[shift4.connector_webhook_details]diff --git a/crates/connector_configs/toml/production.toml b/crates/connector_configs/toml/production.tomlindex 96d473a386..0bb0c2c3d1 100644--- a/crates/connector_configs/toml/production.toml+++ b/crates/connector_configs/toml/production.toml@@ -3183,6 +3183,24 @@ payment_method_type = "giropay"payment_method_type = "sofort"[[shift4.bank_redirect]]payment_method_type = "eps"+[[shift4.bank_redirect]]+ payment_method_type = "trustly"+[[shift4.bank_redirect]]+ payment_method_type = "blik"+[[shift4.wallet]]+ payment_method_type = "ali_pay"+[[shift4.wallet]]+ payment_method_type = "we_chat_pay"+[[shift4.wallet]]+ payment_method_type = "paysera"+[[shift4.wallet]]+ payment_method_type = "skrill"+[[shift4.pay_later]]+ payment_method_type = "klarna"+[[shift4.voucher]]+ payment_method_type = "boleto"+[[shift4.crypto]]+ payment_method_type = "crypto_currency"[shift4.connector_auth.HeaderKey]api_key = "API Key"[shift4.connector_webhook_details]diff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.tomlindex 45da96d534..7517db193b 100644--- a/crates/connector_configs/toml/sandbox.toml+++ b/crates/connector_configs/toml/sandbox.toml@@ -4288,6 +4288,24 @@ payment_method_type = "giropay"payment_method_type = "sofort"[[shift4.bank_redirect]]payment_method_type = "eps"+[[shift4.bank_redirect]]+ payment_method_type = "trustly"+[[shift4.bank_redirect]]+ payment_method_type = "blik"+[[shift4.wallet]]+ payment_method_type = "ali_pay"+[[shift4.wallet]]+ payment_method_type = "we_chat_pay"+[[shift4.wallet]]+ payment_method_type = "paysera"+[[shift4.wallet]]+ payment_method_type = "skrill"+[[shift4.pay_later]]+ payment_method_type = "klarna"+[[shift4.voucher]]+ payment_method_type = "boleto"+[[shift4.crypto]]+ payment_method_type = "crypto_currency"[shift4.connector_auth.HeaderKey]api_key = "API Key"[shift4.connector_webhook_details]diff --git a/crates/payment_methods/src/configs/payment_connector_required_fields.rs b/crates/payment_methods/src/configs/payment_connector_required_fields.rsindex f61c789fe2..511224e596 100644--- a/crates/payment_methods/src/configs/payment_connector_required_fields.rs+++ b/crates/payment_methods/src/configs/payment_connector_required_fields.rs@@ -525,10 +525,10 @@ impl RequiredField {},),Self::OpenBankingPolandIssuer => (- "payment_method_data.bank_redirect.open_banking_poland.issuer".to_string(),+ "payment_method_data.bank_redirect.online_banking_poland.issuer".to_string(),RequiredFieldInfo {- required_field: "payment_method_data.bank_redirect.open_banking_poland.issuer"- .to_string(),+ required_field:+ "payment_method_data.bank_redirect.online_banking_poland.issuer".to_string(),display_name: "issuer".to_string(),field_type: FieldType::UserBank,value: None,@@ -924,6 +924,26 @@ fn billing_name() -> Vec<RequiredField> {]}+#[cfg_attr(feature = "v2", allow(dead_code))] // This function is not used in v2+fn billing_email_billing_name() -> Vec<RequiredField> {+ vec![+ RequiredField::BillingEmail,+ RequiredField::BillingFirstName("billing_first_name", FieldType::UserBillingName),+ RequiredField::BillingLastName("billing_last_name", FieldType::UserBillingName),+ ]+}++#[cfg_attr(feature = "v2", allow(dead_code))] // This function is not used in v2+fn billing_email_billing_name_phone() -> Vec<RequiredField> {+ vec![+ RequiredField::BillingFirstName("billing_first_name", FieldType::UserBillingName),+ RequiredField::BillingLastName("billing_last_name", FieldType::UserBillingName),+ RequiredField::BillingEmail,+ RequiredField::BillingPhone,+ RequiredField::BillingPhoneCountryCode,+ ]+}+#[cfg_attr(feature = "v2", allow(dead_code))] // This function is not used in v2fn email() -> Vec<RequiredField> {[RequiredField::Email].to_vec()@@ -948,17 +968,6 @@ fn billing_email_name() -> Vec<RequiredField> {]}-#[cfg_attr(feature = "v2", allow(dead_code))] // This function is not used in v2-fn billing_email_name_phone() -> Vec<RequiredField> {- vec![- RequiredField::BillingUserFirstName,- RequiredField::BillingUserLastName,- RequiredField::BillingEmail,- RequiredField::BillingPhone,- RequiredField::BillingPhoneCountryCode,- ]-}-#[cfg_attr(feature = "v2", allow(dead_code))] // This function is not used in v2fn billing_address() -> Vec<RequiredField> {vec![@@ -1230,7 +1239,18 @@ impl RequiredFields {),(enums::PaymentMethodType::MomoAtm,- connectors(vec![(Connector::Adyen, fields(vec![], vec![], vec![]))]),+ connectors(vec![(+ Connector::Adyen,+ fields(+ vec![],+ vec![+ RequiredField::BillingEmail,+ RequiredField::BillingPhone,+ RequiredField::BillingPhoneCountryCode,+ ],+ vec![],+ ),+ )]),),])),),@@ -2963,8 +2983,16 @@ fn get_pay_later_required_fields() -> HashMap<enums::PaymentMethodType, ConnectoRequiredFieldFinal {mandate: HashMap::new(),non_mandate: HashMap::from([- RequiredField::BillingUserFirstName.to_tuple(),- RequiredField::BillingUserLastName.to_tuple(),+ RequiredField::BillingFirstName(+ "billing_first_name",+ FieldType::UserBillingName,+ )+ .to_tuple(),+ RequiredField::BillingLastName(+ "billing_last_name",+ FieldType::UserBillingName,+ )+ .to_tuple(),RequiredField::BillingAddressCity.to_tuple(),RequiredField::BillingAddressState.to_tuple(),RequiredField::BillingAddressZip.to_tuple(),@@ -3049,14 +3077,14 @@ fn get_voucher_required_fields() -> HashMap<enums::PaymentMethodType, ConnectorFenums::PaymentMethodType::Alfamart,connectors(vec![(Connector::Adyen,- fields(vec![], billing_email_name(), vec![]),+ fields(vec![], billing_email_billing_name(), vec![]),)]),),(enums::PaymentMethodType::Indomaret,connectors(vec![(Connector::Adyen,- fields(vec![], billing_email_name(), vec![]),+ fields(vec![], billing_email_billing_name(), vec![]),)]),),(@@ -3067,42 +3095,42 @@ fn get_voucher_required_fields() -> HashMap<enums::PaymentMethodType, ConnectorFenums::PaymentMethodType::SevenEleven,connectors(vec![(Connector::Adyen,- fields(vec![], billing_email_name_phone(), vec![]),+ fields(vec![], billing_email_billing_name_phone(), vec![]),)]),),(enums::PaymentMethodType::Lawson,connectors(vec![(Connector::Adyen,- fields(vec![], billing_email_name_phone(), vec![]),+ fields(vec![], billing_email_billing_name_phone(), vec![]),)]),),(enums::PaymentMethodType::MiniStop,connectors(vec![(Connector::Adyen,- fields(vec![], billing_email_name_phone(), vec![]),+ fields(vec![], billing_email_billing_name_phone(), vec![]),)]),),(enums::PaymentMethodType::FamilyMart,connectors(vec![(Connector::Adyen,- fields(vec![], billing_email_name_phone(), vec![]),+ fields(vec![], billing_email_billing_name_phone(), vec![]),)]),),(enums::PaymentMethodType::Seicomart,connectors(vec![(Connector::Adyen,- fields(vec![], billing_email_name_phone(), vec![]),+ fields(vec![], billing_email_billing_name_phone(), vec![]),)]),),(enums::PaymentMethodType::PayEasy,connectors(vec![(Connector::Adyen,- fields(vec![], billing_email_name_phone(), vec![]),+ fields(vec![], billing_email_billing_name_phone(), vec![]),)]),),])@@ -3471,49 +3499,49 @@ fn get_bank_transfer_required_fields() -> HashMap<enums::PaymentMethodType, Connenums::PaymentMethodType::PermataBankTransfer,connectors(vec![(Connector::Adyen,- fields(vec![], billing_email_name(), vec![]),+ fields(vec![], billing_email_billing_name(), vec![]),)]),),(enums::PaymentMethodType::BcaBankTransfer,connectors(vec![(Connector::Adyen,- fields(vec![], billing_email_name(), vec![]),+ fields(vec![], billing_email_billing_name(), vec![]),)]),),(enums::PaymentMethodType::BniVa,connectors(vec![(Connector::Adyen,- fields(vec![], billing_email_name(), vec![]),+ fields(vec![], billing_email_billing_name(), vec![]),)]),),(enums::PaymentMethodType::BriVa,connectors(vec![(Connector::Adyen,- fields(vec![], billing_email_name(), vec![]),+ fields(vec![], billing_email_billing_name(), vec![]),)]),),(enums::PaymentMethodType::CimbVa,connectors(vec![(Connector::Adyen,- fields(vec![], billing_email_name(), vec![]),+ fields(vec![], billing_email_billing_name(), vec![]),)]),),(enums::PaymentMethodType::DanamonVa,connectors(vec![(Connector::Adyen,- fields(vec![], billing_email_name(), vec![]),+ fields(vec![], billing_email_billing_name(), vec![]),)]),),(enums::PaymentMethodType::MandiriVa,connectors(vec![(Connector::Adyen,- fields(vec![], billing_email_name(), vec![]),+ fields(vec![], billing_email_billing_name(), vec![]),)]),),(