mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 13:30:39 +08:00
feat(core): add profile level config for debit routing feature (#7470)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Sayak Bhattacharya <sayak.b@Sayak-Bhattacharya-G092THXJ34.local> Co-authored-by: Sayak Bhattacharya <sayakofficial21@gmail.com>
This commit is contained in:
@ -3808,6 +3808,8 @@ impl ProfileCreateBridge for api::ProfileCreate {
|
||||
.attach_printable("error while generating card testing secret key")?,
|
||||
is_clear_pan_retries_enabled: self.is_clear_pan_retries_enabled.unwrap_or_default(),
|
||||
force_3ds_challenge: self.force_3ds_challenge.unwrap_or_default(),
|
||||
is_debit_routing_enabled: self.is_debit_routing_enabled.unwrap_or_default(),
|
||||
merchant_business_country: self.merchant_business_country,
|
||||
}))
|
||||
}
|
||||
|
||||
@ -3963,6 +3965,8 @@ impl ProfileCreateBridge for api::ProfileCreate {
|
||||
.change_context(errors::ApiErrorResponse::InternalServerError)
|
||||
.attach_printable("error while generating card testing secret key")?,
|
||||
is_clear_pan_retries_enabled: self.is_clear_pan_retries_enabled.unwrap_or_default(),
|
||||
is_debit_routing_enabled: self.is_debit_routing_enabled.unwrap_or_default(),
|
||||
merchant_business_country: self.merchant_business_country,
|
||||
}))
|
||||
}
|
||||
}
|
||||
@ -4249,7 +4253,9 @@ impl ProfileUpdateBridge for api::ProfileUpdate {
|
||||
.map(ForeignInto::foreign_into),
|
||||
card_testing_secret_key,
|
||||
is_clear_pan_retries_enabled: self.is_clear_pan_retries_enabled,
|
||||
force_3ds_challenge: self.force_3ds_challenge,
|
||||
force_3ds_challenge: self.force_3ds_challenge, //
|
||||
is_debit_routing_enabled: self.is_debit_routing_enabled.unwrap_or_default(),
|
||||
merchant_business_country: self.merchant_business_country,
|
||||
},
|
||||
)))
|
||||
}
|
||||
@ -4382,6 +4388,8 @@ impl ProfileUpdateBridge for api::ProfileUpdate {
|
||||
.card_testing_guard_config
|
||||
.map(ForeignInto::foreign_into),
|
||||
card_testing_secret_key,
|
||||
is_debit_routing_enabled: self.is_debit_routing_enabled.unwrap_or_default(),
|
||||
merchant_business_country: self.merchant_business_country,
|
||||
},
|
||||
)))
|
||||
}
|
||||
|
||||
@ -191,6 +191,8 @@ impl ForeignTryFrom<domain::Profile> for ProfileResponse {
|
||||
.map(ForeignInto::foreign_into),
|
||||
is_clear_pan_retries_enabled: item.is_clear_pan_retries_enabled,
|
||||
force_3ds_challenge: item.force_3ds_challenge,
|
||||
is_debit_routing_enabled: Some(item.is_debit_routing_enabled),
|
||||
merchant_business_country: item.merchant_business_country,
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -266,6 +268,8 @@ impl ForeignTryFrom<domain::Profile> for ProfileResponse {
|
||||
.card_testing_guard_config
|
||||
.map(ForeignInto::foreign_into),
|
||||
is_clear_pan_retries_enabled: item.is_clear_pan_retries_enabled,
|
||||
is_debit_routing_enabled: Some(item.is_debit_routing_enabled),
|
||||
merchant_business_country: item.merchant_business_country,
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -442,5 +446,7 @@ pub async fn create_profile_from_merchant_account(
|
||||
.attach_printable("error while generating card testing secret key")?,
|
||||
is_clear_pan_retries_enabled: request.is_clear_pan_retries_enabled.unwrap_or_default(),
|
||||
force_3ds_challenge: request.force_3ds_challenge.unwrap_or_default(),
|
||||
is_debit_routing_enabled: request.is_debit_routing_enabled.unwrap_or_default(),
|
||||
merchant_business_country: request.merchant_business_country,
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user