From fffaa53a5fe4859bea607f2eb6bf866b4a20b949 Mon Sep 17 00:00:00 2001 From: Nithin N <57832822+Nithin1506200@users.noreply.github.com> Date: Mon, 14 Jul 2025 14:59:06 +0530 Subject: [PATCH] chore(stripe): Eps bank_name should be mandatory (#8577) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> --- api-reference/v1/openapi_spec_v1.json | 22 ++++++ api-reference/v2/openapi_spec_v2.json | 22 ++++++ crates/api_models/src/enums.rs | 1 + .../payment_connector_required_fields.rs | 77 +++++++++++++++++++ 4 files changed, 122 insertions(+) diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.json index d748f65261..5656a7f887 100644 --- a/api-reference/v1/openapi_spec_v1.json +++ b/api-reference/v1/openapi_spec_v1.json @@ -14281,6 +14281,28 @@ "user_bank" ] }, + { + "type": "object", + "required": [ + "user_bank_options" + ], + "properties": { + "user_bank_options": { + "type": "object", + "required": [ + "options" + ], + "properties": { + "options": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, { "type": "string", "enum": [ diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.json index 53bbace7df..ecd899a372 100644 --- a/api-reference/v2/openapi_spec_v2.json +++ b/api-reference/v2/openapi_spec_v2.json @@ -11096,6 +11096,28 @@ "user_bank" ] }, + { + "type": "object", + "required": [ + "user_bank_options" + ], + "properties": { + "user_bank_options": { + "type": "object", + "required": [ + "options" + ], + "properties": { + "options": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, { "type": "string", "enum": [ diff --git a/crates/api_models/src/enums.rs b/crates/api_models/src/enums.rs index df1827053a..cad510b26d 100644 --- a/crates/api_models/src/enums.rs +++ b/crates/api_models/src/enums.rs @@ -257,6 +257,7 @@ pub enum FieldType { UserSocialSecurityNumber, UserBlikCode, UserBank, + UserBankOptions { options: Vec }, UserBankAccountNumber, UserSourceBankAccountId, UserDestinationBankAccountId, diff --git a/crates/payment_methods/src/configs/payment_connector_required_fields.rs b/crates/payment_methods/src/configs/payment_connector_required_fields.rs index ec3ea46ccd..2dd291d16f 100644 --- a/crates/payment_methods/src/configs/payment_connector_required_fields.rs +++ b/crates/payment_methods/src/configs/payment_connector_required_fields.rs @@ -173,6 +173,7 @@ enum RequiredField { BanContactCardExpYear, IdealBankName, EpsBankName, + EpsBankOptions(HashSet), BlikCode, MifinityDateOfBirth, MifinityLanguagePreference(Vec<&'static str>), @@ -610,6 +611,17 @@ impl RequiredField { value: None, }, ), + Self::EpsBankOptions(bank) => ( + "payment_method_data.bank_redirect.eps.bank_name".to_string(), + RequiredFieldInfo { + required_field: "payment_method_data.bank_redirect.eps.bank_name".to_string(), + display_name: "bank_name".to_string(), + field_type: FieldType::UserBankOptions { + options: bank.iter().map(|bank| bank.to_string()).collect(), + }, + value: None, + }, + ), Self::BlikCode => ( "payment_method_data.bank_redirect.blik.blik_code".to_string(), RequiredFieldInfo { @@ -2015,6 +2027,71 @@ fn get_bank_redirect_required_fields() -> HashMap