mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
refactor(connector): [Mifinity] add a field language_preference in payment request for mifinity payment method data (#5326)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -8224,6 +8224,51 @@ impl Default for super::settings::RequiredFields {
|
||||
value: None,
|
||||
}
|
||||
),
|
||||
(
|
||||
"payment_method_data.wallet.mifinity.language_preference".to_string(),
|
||||
RequiredFieldInfo {
|
||||
required_field: "payment_method_data.wallet.mifinity.language_preference".to_string(),
|
||||
display_name: "language_preference".to_string(),
|
||||
field_type: enums::FieldType::LanguagePreference{
|
||||
options: vec![
|
||||
"BR".to_string(),
|
||||
"PT_BR".to_string(),
|
||||
"CN".to_string(),
|
||||
"ZH_CN".to_string(),
|
||||
"DE".to_string(),
|
||||
"DK".to_string(),
|
||||
"DA".to_string(),
|
||||
"DA_DK".to_string(),
|
||||
"EN".to_string(),
|
||||
"ES".to_string(),
|
||||
"FI".to_string(),
|
||||
"FR".to_string(),
|
||||
"GR".to_string(),
|
||||
"EL".to_string(),
|
||||
"EL_GR".to_string(),
|
||||
"HR".to_string(),
|
||||
"IT".to_string(),
|
||||
"JP".to_string(),
|
||||
"JA".to_string(),
|
||||
"JA_JP".to_string(),
|
||||
"LA".to_string(),
|
||||
"ES_LA".to_string(),
|
||||
"NL".to_string(),
|
||||
"NO".to_string(),
|
||||
"PL".to_string(),
|
||||
"PT".to_string(),
|
||||
"RU".to_string(),
|
||||
"SV".to_string(),
|
||||
"SE".to_string(),
|
||||
"SV_SE".to_string(),
|
||||
"ZH".to_string(),
|
||||
"TW".to_string(),
|
||||
"ZH_TW".to_string(),
|
||||
]
|
||||
},
|
||||
value: None,
|
||||
}
|
||||
),
|
||||
]),
|
||||
}
|
||||
),
|
||||
|
||||
@ -63,6 +63,8 @@ pub struct MifinityPaymentsRequest {
|
||||
destination_account_number: Secret<String>,
|
||||
brand_id: Secret<String>,
|
||||
return_url: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
language_preference: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, PartialEq)]
|
||||
@ -136,6 +138,7 @@ impl TryFrom<&MifinityRouterData<&types::PaymentsAuthorizeRouterData>> for Mifin
|
||||
let destination_account_number = metadata.destination_account_number;
|
||||
let trace_id = item.router_data.connector_request_reference_id.clone();
|
||||
let brand_id = metadata.brand_id;
|
||||
let language_preference = data.language_preference;
|
||||
Ok(Self {
|
||||
money,
|
||||
client,
|
||||
@ -147,6 +150,7 @@ impl TryFrom<&MifinityRouterData<&types::PaymentsAuthorizeRouterData>> for Mifin
|
||||
destination_account_number,
|
||||
brand_id,
|
||||
return_url: item.router_data.request.get_router_return_url()?,
|
||||
language_preference,
|
||||
})
|
||||
}
|
||||
domain::WalletData::AliPayQr(_)
|
||||
|
||||
Reference in New Issue
Block a user