Skip to content

Commit

Permalink
feat: dynamic field changes for boleto
Browse files Browse the repository at this point in the history
  • Loading branch information
swangi-kumari committed Feb 11, 2024
1 parent b9c29e7 commit e8b6557
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ mini_stop = { country = "JP", currency = "JPY" }
family_mart = { country = "JP", currency = "JPY" }
seicomart = { country = "JP", currency = "JPY" }
pay_easy = { country = "JP", currency = "JPY" }
boleto = { country = "BR", currency = "BRL" }

[pm_filters.volt]
open_banking_uk = {country = "DE,GB", currency = "EUR,GBP"}
Expand Down
1 change: 1 addition & 0 deletions config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ family_mart = {country = "JP", currency = "JPY"}
seicomart = {country = "JP", currency = "JPY"}
pay_easy = {country = "JP", currency = "JPY"}
pix = { country = "BR", currency = "BRL" }
boleto = { country = "BR", currency = "BRL" }

[pm_filters.braintree]
paypal = { currency = "AUD,BRL,CAD,CNY,CZK,DKK,EUR,HKD,HUF,ILS,JPY,MYR,MXN,TWD,NZD,NOK,PHP,PLN,GBP,RUB,SGD,SEK,CHF,THB,USD" }
Expand Down
1 change: 1 addition & 0 deletions config/docker_compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ mini_stop = {country = "JP", currency = "JPY"}
family_mart = {country = "JP", currency = "JPY"}
seicomart = {country = "JP", currency = "JPY"}
pay_easy = {country = "JP", currency = "JPY"}
boleto = { country = "BR", currency = "BRL" }

[pm_filters.volt]
open_banking_uk = {country = "DE,GB", currency = "EUR,GBP"}
Expand Down
38 changes: 38 additions & 0 deletions crates/router/src/configs/defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6143,6 +6143,44 @@ impl Default for super::settings::RequiredFields {
),
])),
),
(
enums::PaymentMethod::Voucher,
PaymentMethodType(HashMap::from([
(
enums::PaymentMethodType::Boleto,
ConnectorFields {
fields: HashMap::from([
(
enums::Connector::Adyen,
RequiredFieldFinal {
mandate : HashMap::new(),
non_mandate : HashMap::from([
(
"payment_method_data.voucher.boleto.social_security_number".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.voucher.boleto.social_security_number".to_string(),
display_name: "social_security_number".to_string(),
field_type: enums::FieldType::Text,
value: None,
}
),
]),
common : HashMap::new(),
}
),
(
enums::Connector::Zen,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: HashMap::new(),
common: HashMap::new(),
}
)
]),
},
),
])),
),
(
enums::PaymentMethod::BankDebit,
PaymentMethodType(HashMap::from([(
Expand Down
3 changes: 3 additions & 0 deletions loadtest/config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ cards = [
[pm_filters.volt]
open_banking_uk = {country = "DE,GB", currency = "EUR,GBP"}

[pm_filters.adyen]
boleto = { country = "BR", currency = "BRL" }

[pm_filters.zen]
credit = { not_available_flows = { capture_method = "manual" } }
debit = { not_available_flows = { capture_method = "manual" } }
Expand Down

0 comments on commit e8b6557

Please sign in to comment.