mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
fix(core): add extended authorization to profile update and add supported payment method types (#9237)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -2791,6 +2791,11 @@ pub struct ProfileUpdate {
|
|||||||
#[schema(default = false, example = false)]
|
#[schema(default = false, example = false)]
|
||||||
pub always_collect_billing_details_from_wallet_connector: Option<bool>,
|
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
|
/// 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
|
/// agnostic, i.e., MITs may be processed through different connector than CIT (customer
|
||||||
/// initiated transaction) based on the routing rules.
|
/// initiated transaction) based on the routing rules.
|
||||||
|
|||||||
@ -551,12 +551,12 @@ impl Connector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_payment_methods_supporting_extended_authorization(self) -> HashSet<PaymentMethod> {
|
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(
|
pub fn get_payment_method_types_supporting_extended_authorization(
|
||||||
self,
|
self,
|
||||||
) -> HashSet<PaymentMethodType> {
|
) -> HashSet<PaymentMethodType> {
|
||||||
HashSet::new()
|
HashSet::from([PaymentMethodType::Credit, PaymentMethodType::Debit])
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn should_acknowledge_webhook_for_resource_not_found_errors(self) -> bool {
|
pub fn should_acknowledge_webhook_for_resource_not_found_errors(self) -> bool {
|
||||||
|
|||||||
@ -246,6 +246,8 @@ pub struct ProfileGeneralUpdate {
|
|||||||
pub outgoing_webhook_custom_http_headers: OptionalEncryptableValue,
|
pub outgoing_webhook_custom_http_headers: OptionalEncryptableValue,
|
||||||
pub always_collect_billing_details_from_wallet_connector: Option<bool>,
|
pub always_collect_billing_details_from_wallet_connector: Option<bool>,
|
||||||
pub always_collect_shipping_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 tax_connector_id: Option<common_utils::id_type::MerchantConnectorAccountId>,
|
||||||
pub is_tax_connector_enabled: Option<bool>,
|
pub is_tax_connector_enabled: Option<bool>,
|
||||||
pub dynamic_routing_algorithm: Option<serde_json::Value>,
|
pub dynamic_routing_algorithm: Option<serde_json::Value>,
|
||||||
@ -348,6 +350,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {
|
|||||||
merchant_category_code,
|
merchant_category_code,
|
||||||
merchant_country_code,
|
merchant_country_code,
|
||||||
dispute_polling_interval,
|
dispute_polling_interval,
|
||||||
|
always_request_extended_authorization,
|
||||||
} = *update;
|
} = *update;
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
@ -385,7 +388,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {
|
|||||||
is_network_tokenization_enabled,
|
is_network_tokenization_enabled,
|
||||||
is_auto_retries_enabled,
|
is_auto_retries_enabled,
|
||||||
max_auto_retries_enabled,
|
max_auto_retries_enabled,
|
||||||
always_request_extended_authorization: None,
|
always_request_extended_authorization,
|
||||||
is_click_to_pay_enabled,
|
is_click_to_pay_enabled,
|
||||||
authentication_product_ids,
|
authentication_product_ids,
|
||||||
card_testing_guard_config,
|
card_testing_guard_config,
|
||||||
|
|||||||
@ -3950,6 +3950,7 @@ impl ProfileUpdateBridge for api::ProfileUpdate {
|
|||||||
.always_collect_billing_details_from_wallet_connector,
|
.always_collect_billing_details_from_wallet_connector,
|
||||||
always_collect_shipping_details_from_wallet_connector: self
|
always_collect_shipping_details_from_wallet_connector: self
|
||||||
.always_collect_shipping_details_from_wallet_connector,
|
.always_collect_shipping_details_from_wallet_connector,
|
||||||
|
always_request_extended_authorization: self.always_request_extended_authorization,
|
||||||
tax_connector_id: self.tax_connector_id,
|
tax_connector_id: self.tax_connector_id,
|
||||||
is_tax_connector_enabled: self.is_tax_connector_enabled,
|
is_tax_connector_enabled: self.is_tax_connector_enabled,
|
||||||
dynamic_routing_algorithm: dynamic_routing_algo_ref,
|
dynamic_routing_algorithm: dynamic_routing_algo_ref,
|
||||||
|
|||||||
Reference in New Issue
Block a user