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(core): add extended authorization to profile update and add supported payment method types (#9237)
AkshayaFoigere30842892a48
diff --git a/crates/api_models/src/admin.rs b/crates/api_models/src/admin.rsindex f0af4a2e46..0f7ea4a83e 100644--- a/crates/api_models/src/admin.rs+++ b/crates/api_models/src/admin.rs@@ -2791,6 +2791,11 @@ pub struct ProfileUpdate {#[schema(default = false, example = false)]pub always_collect_billing_details_from_wallet_connector: Option<bool>,+ /// Bool indicating if extended authentication must be requested for all payments+ #[schema(value_type = Option<bool>)]+ pub always_request_extended_authorization:+ Option<primitive_wrappers::AlwaysRequestExtendedAuthorization>,+/// Indicates if the MIT (merchant initiated transaction) payments can be made connector/// agnostic, i.e., MITs may be processed through different connector than CIT (customer/// initiated transaction) based on the routing rules.diff --git a/crates/common_enums/src/connector_enums.rs b/crates/common_enums/src/connector_enums.rsindex 8b1c9e2f9e..bdc0f9b700 100644--- a/crates/common_enums/src/connector_enums.rs+++ b/crates/common_enums/src/connector_enums.rs@@ -551,12 +551,12 @@ impl Connector {}pub fn get_payment_methods_supporting_extended_authorization(self) -> HashSet<PaymentMethod> {- HashSet::new()+ HashSet::from([PaymentMethod::Card])}pub fn get_payment_method_types_supporting_extended_authorization(self,) -> HashSet<PaymentMethodType> {- HashSet::new()+ HashSet::from([PaymentMethodType::Credit, PaymentMethodType::Debit])}pub fn should_acknowledge_webhook_for_resource_not_found_errors(self) -> bool {diff --git a/crates/hyperswitch_domain_models/src/business_profile.rs b/crates/hyperswitch_domain_models/src/business_profile.rsindex 581754d601..de69e50013 100644--- a/crates/hyperswitch_domain_models/src/business_profile.rs+++ b/crates/hyperswitch_domain_models/src/business_profile.rs@@ -246,6 +246,8 @@ pub struct ProfileGeneralUpdate {pub outgoing_webhook_custom_http_headers: OptionalEncryptableValue,pub always_collect_billing_details_from_wallet_connector: Option<bool>,pub always_collect_shipping_details_from_wallet_connector: Option<bool>,+ pub always_request_extended_authorization:+ Option<primitive_wrappers::AlwaysRequestExtendedAuthorization>,pub tax_connector_id: Option<common_utils::id_type::MerchantConnectorAccountId>,pub is_tax_connector_enabled: Option<bool>,pub dynamic_routing_algorithm: Option<serde_json::Value>,@@ -348,6 +350,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {merchant_category_code,merchant_country_code,dispute_polling_interval,+ always_request_extended_authorization,} = *update;Self {@@ -385,7 +388,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {is_network_tokenization_enabled,is_auto_retries_enabled,max_auto_retries_enabled,- always_request_extended_authorization: None,+ always_request_extended_authorization,is_click_to_pay_enabled,authentication_product_ids,card_testing_guard_config,diff --git a/crates/router/src/core/admin.rs b/crates/router/src/core/admin.rsindex 767917dd6d..e289e63693 100644--- a/crates/router/src/core/admin.rs+++ b/crates/router/src/core/admin.rs@@ -3950,6 +3950,7 @@ impl ProfileUpdateBridge for api::ProfileUpdate {.always_collect_billing_details_from_wallet_connector,always_collect_shipping_details_from_wallet_connector: self.always_collect_shipping_details_from_wallet_connector,+ always_request_extended_authorization: self.always_request_extended_authorization,tax_connector_id: self.tax_connector_id,is_tax_connector_enabled: self.is_tax_connector_enabled,dynamic_routing_algorithm: dynamic_routing_algo_ref,