diff --git "a/diffs/pr_10192/847552d/diff.json" "b/diffs/pr_10192/847552d/diff.json" new file mode 100644--- /dev/null +++ "b/diffs/pr_10192/847552d/diff.json" @@ -0,0 +1,34018 @@ +{ + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "pr_number": 10192, + "rust_files": [ + "crates/hyperswitch_interfaces/src/api.rs", + "crates/hyperswitch_interfaces/src/api/gateway.rs", + "crates/hyperswitch_interfaces/src/consts.rs", + "crates/hyperswitch_interfaces/src/helpers.rs", + "crates/hyperswitch_interfaces/src/types.rs", + "crates/router/src/configs/settings.rs", + "crates/router/src/core/payments.rs", + "crates/router/src/core/payments/flows.rs", + "crates/router/src/core/payments/flows/approve_flow.rs", + "crates/router/src/core/payments/flows/authorize_flow.rs", + "crates/router/src/core/payments/flows/cancel_flow.rs", + "crates/router/src/core/payments/flows/cancel_post_capture_flow.rs", + "crates/router/src/core/payments/flows/capture_flow.rs", + "crates/router/src/core/payments/flows/complete_authorize_flow.rs", + "crates/router/src/core/payments/flows/extend_authorization_flow.rs", + "crates/router/src/core/payments/flows/external_proxy_flow.rs", + "crates/router/src/core/payments/flows/incremental_authorization_flow.rs", + "crates/router/src/core/payments/flows/post_session_tokens_flow.rs", + "crates/router/src/core/payments/flows/psync_flow.rs", + "crates/router/src/core/payments/flows/reject_flow.rs", + "crates/router/src/core/payments/flows/session_flow.rs", + "crates/router/src/core/payments/flows/session_update_flow.rs", + "crates/router/src/core/payments/flows/setup_mandate_flow.rs", + "crates/router/src/core/payments/flows/update_metadata_flow.rs", + "crates/router/src/core/payments/gateway.rs", + "crates/router/src/core/payments/gateway/context.rs", + "crates/router/src/core/payments/gateway/psync_gateway.rs", + "crates/router/src/core/payments/helpers.rs", + "crates/router/src/core/unified_connector_service.rs", + "crates/router/src/routes/app.rs" + ], + "diffs": [ + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_vault_session_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_vault_session_details(\n &mut self,\n _external_vault_session_details: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_vault_session_details(\n &mut self,\n _external_vault_session_details: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::PaymentsRedirectResponseData", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PaymentsRedirectResponseData {\n pub payment_id: id_type::GlobalPaymentId,\n pub query_params: String,\n pub json_payload: Option,\n}", + "after_code": "pub struct PaymentsRedirectResponseData {\n pub payment_id: id_type::GlobalPaymentId,\n pub query_params: String,\n pub json_payload: Option,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_merchant_connector_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_merchant_connector_id_in_attempt(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_merchant_connector_id_in_attempt(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::BlockListCheck::function::transform", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn transform(output: CheckResult) -> Option {\n output.into()\n }", + "after_code": "fn transform(output: CheckResult) -> Option {\n output.into()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_capture_method", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_capture_method(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_capture_method(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::payments_core", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn payments_core(\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n payment_id: id_type::GlobalPaymentId,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n) -> RouterResponse\nwhere\n F: Send + Clone + Sync,\n Req: Send + Sync + Authenticate,\n FData: Send + Sync + Clone + serde::Serialize,\n Op: Operation + ValidateStatusForOperation + Send + Sync + Clone,\n Req: Debug,\n D: OperationSessionGetters\n + OperationSessionSetters\n + transformers::GenerateResponse\n + Send\n + Sync\n + Clone,\n // To create connector flow specific interface data\n D: ConstructFlowSpecificData,\n RouterData: Feature,\n\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n\n // To perform router related operation for PaymentResponse\n PaymentResponse: Operation,\n\n // To create updatable objects in post update tracker\n RouterData:\n hyperswitch_domain_models::router_data::TrackerPostUpdateObjects,\n{\n // Validate the request fields\n operation\n .to_validate_request()?\n .validate_request(&req, &merchant_context)?;\n\n // Get the tracker related information. This includes payment intent and payment attempt\n let get_tracker_response = operation\n .to_get_tracker()?\n .get_trackers(\n &state,\n &payment_id,\n &req,\n &merchant_context,\n &profile,\n &header_payload,\n )\n .await?;\n\n let (payment_data, connector_http_status_code, external_latency, connector_response_data) =\n if state.conf.merchant_id_auth.merchant_id_auth_enabled {\n let (\n payment_data,\n _req,\n connector_http_status_code,\n external_latency,\n connector_response_data,\n ) = internal_payments_operation_core::<_, _, _, _, _>(\n &state,\n req_state,\n merchant_context.clone(),\n &profile,\n operation.clone(),\n req,\n get_tracker_response,\n call_connector_action,\n header_payload.clone(),\n )\n .await?;\n (\n payment_data,\n connector_http_status_code,\n external_latency,\n connector_response_data,\n )\n } else {\n let (\n payment_data,\n _req,\n _customer,\n connector_http_status_code,\n external_latency,\n connector_response_data,\n ) = payments_operation_core::<_, _, _, _, _>(\n &state,\n req_state,\n merchant_context.clone(),\n &profile,\n operation.clone(),\n req,\n get_tracker_response,\n call_connector_action,\n header_payload.clone(),\n )\n .await?;\n (\n payment_data,\n connector_http_status_code,\n external_latency,\n connector_response_data,\n )\n };\n\n payment_data.generate_response(\n &state,\n connector_http_status_code,\n external_latency,\n header_payload.x_hs_latency,\n &merchant_context,\n &profile,\n Some(connector_response_data),\n )\n}", + "after_code": "pub async fn payments_core(\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n payment_id: id_type::GlobalPaymentId,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n) -> RouterResponse\nwhere\n F: Send + Clone + Sync,\n Req: Send + Sync + Authenticate,\n FData: Send + Sync + Clone + serde::Serialize,\n Op: Operation + ValidateStatusForOperation + Send + Sync + Clone,\n Req: Debug,\n D: OperationSessionGetters\n + OperationSessionSetters\n + transformers::GenerateResponse\n + Send\n + Sync\n + Clone,\n // To create connector flow specific interface data\n D: ConstructFlowSpecificData,\n RouterData: Feature,\n\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n\n // To perform router related operation for PaymentResponse\n PaymentResponse: Operation,\n\n // To create updatable objects in post update tracker\n RouterData:\n hyperswitch_domain_models::router_data::TrackerPostUpdateObjects,\n{\n // Validate the request fields\n operation\n .to_validate_request()?\n .validate_request(&req, &merchant_context)?;\n\n // Get the tracker related information. This includes payment intent and payment attempt\n let get_tracker_response = operation\n .to_get_tracker()?\n .get_trackers(\n &state,\n &payment_id,\n &req,\n &merchant_context,\n &profile,\n &header_payload,\n )\n .await?;\n\n let (payment_data, connector_http_status_code, external_latency, connector_response_data) =\n if state.conf.merchant_id_auth.merchant_id_auth_enabled {\n let (\n payment_data,\n _req,\n connector_http_status_code,\n external_latency,\n connector_response_data,\n ) = internal_payments_operation_core::<_, _, _, _, _>(\n &state,\n req_state,\n merchant_context.clone(),\n &profile,\n operation.clone(),\n req,\n get_tracker_response,\n call_connector_action,\n header_payload.clone(),\n )\n .await?;\n (\n payment_data,\n connector_http_status_code,\n external_latency,\n connector_response_data,\n )\n } else {\n let (\n payment_data,\n _req,\n _customer,\n connector_http_status_code,\n external_latency,\n connector_response_data,\n ) = payments_operation_core::<_, _, _, _, _>(\n &state,\n req_state,\n merchant_context.clone(),\n &profile,\n operation.clone(),\n req,\n get_tracker_response,\n call_connector_action,\n header_payload.clone(),\n )\n .await?;\n (\n payment_data,\n connector_http_status_code,\n external_latency,\n connector_response_data,\n )\n };\n\n payment_data.generate_response(\n &state,\n connector_http_status_code,\n external_latency,\n header_payload.x_hs_latency,\n &merchant_context,\n &profile,\n Some(connector_response_data),\n )\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use operations::ValidateStatusForOperation;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use operations::ValidateStatusForOperation;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_card_network", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n todo!()\n }", + "after_code": "fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Payouts", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Payouts;", + "after_code": "pub struct Payouts;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_aggregates_for_payments", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn get_aggregates_for_payments(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n profile_id_list: Option>,\n time_range: common_utils::types::TimeRange,\n) -> RouterResponse {\n let db = state.store.as_ref();\n let intent_status_with_count = db\n .get_intent_status_with_count(\n merchant_context.get_merchant_account().get_id(),\n profile_id_list,\n &time_range,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n\n let mut status_map: HashMap =\n intent_status_with_count.into_iter().collect();\n for status in enums::IntentStatus::iter() {\n status_map.entry(status).or_default();\n }\n\n Ok(services::ApplicationResponse::Json(\n api::PaymentsAggregateResponse {\n status_with_count: status_map,\n },\n ))\n}", + "after_code": "pub async fn get_aggregates_for_payments(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n profile_id_list: Option>,\n time_range: common_utils::types::TimeRange,\n) -> RouterResponse {\n let db = state.store.as_ref();\n let intent_status_with_count = db\n .get_intent_status_with_count(\n merchant_context.get_merchant_account().get_id(),\n profile_id_list,\n &time_range,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n\n let mut status_map: HashMap =\n intent_status_with_count.into_iter().collect();\n for status in enums::IntentStatus::iter() {\n status_map.entry(status).or_default();\n }\n\n Ok(services::ApplicationResponse::Json(\n api::PaymentsAggregateResponse {\n status_with_count: status_map,\n },\n ))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_refunds", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_refunds(&self) -> Vec {\n self.refunds.clone()\n }", + "after_code": "fn get_refunds(&self) -> Vec {\n self.refunds.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_payment_link_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_link_data(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_payment_link_data(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_mandate_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }", + "after_code": "fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_merchant_connector_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_billing_address", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_billing_address(&self) -> Option {\n self.address.get_payment_method_billing().cloned()\n }", + "after_code": "fn get_billing_address(&self) -> Option {\n self.address.get_payment_method_billing().cloned()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::function::deserialize_hashset_inner", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn deserialize_hashset_inner(value: impl AsRef) -> Result, String>\nwhere\n T: Eq + std::str::FromStr + std::hash::Hash,\n ::Err: std::fmt::Display,\n{\n let (values, errors) = value\n .as_ref()\n .trim()\n .split(',')\n .map(|s| {\n T::from_str(s.trim()).map_err(|error| {\n format!(\n \"Unable to deserialize `{}` as `{}`: {error}\",\n s.trim(),\n std::any::type_name::()\n )\n })\n })\n .fold(\n (HashSet::new(), Vec::new()),\n |(mut values, mut errors), result| match result {\n Ok(t) => {\n values.insert(t);\n (values, errors)\n }\n Err(error) => {\n errors.push(error);\n (values, errors)\n }\n },\n );\n if !errors.is_empty() {\n Err(format!(\"Some errors occurred:\\n{}\", errors.join(\"\\n\")))\n } else {\n Ok(values)\n }\n}", + "after_code": "fn deserialize_hashset_inner(value: impl AsRef) -> Result, String>\nwhere\n T: Eq + std::str::FromStr + std::hash::Hash,\n ::Err: std::fmt::Display,\n{\n let (values, errors) = value\n .as_ref()\n .trim()\n .split(',')\n .map(|s| {\n T::from_str(s.trim()).map_err(|error| {\n format!(\n \"Unable to deserialize `{}` as `{}`: {error}\",\n s.trim(),\n std::any::type_name::()\n )\n })\n })\n .fold(\n (HashSet::new(), Vec::new()),\n |(mut values, mut errors), result| match result {\n Ok(t) => {\n values.insert(t);\n (values, errors)\n }\n Err(error) => {\n errors.push(error);\n (values, errors)\n }\n },\n );\n if !errors.is_empty() {\n Err(format!(\"Some errors occurred:\\n{}\", errors.join(\"\\n\")))\n } else {\n Ok(values)\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use super::deserialize_hashset;", + "use std::collections::{HashMap, HashSet};", + "use std::collections::HashSet;" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_poll_config", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_poll_config(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_poll_config(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_merchant_connector_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::record_time_taken_with", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn record_time_taken_with(f: F) -> RouterResult\nwhere\n F: FnOnce() -> Fut,\n Fut: future::Future>,\n{\n let stime = Instant::now();\n let result = f().await;\n let etime = Instant::now();\n let duration = etime.saturating_duration_since(stime);\n tracing::info!(duration = format!(\"Duration taken: {}\", duration.as_millis()));\n result\n}", + "after_code": "async fn record_time_taken_with(f: F) -> RouterResult\nwhere\n F: FnOnce() -> Fut,\n Fut: future::Future>,\n{\n let stime = Instant::now();\n let result = f().await;\n let etime = Instant::now();\n let duration = etime.saturating_duration_since(stime);\n tracing::info!(duration = format!(\"Duration taken: {}\", duration.as_millis()));\n result\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use router_env::{instrument, tracing};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use std::future;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use router_env::{instrument, tracing};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_payment_method_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_token(&self) -> Option<&PaymentMethodToken> {\n todo!()\n }", + "after_code": "fn get_payment_method_token(&self) -> Option<&PaymentMethodToken> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_payment_method_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }", + "after_code": "fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_attempt(&self) -> &storage::PaymentAttempt {\n &self.payment_attempt\n }", + "after_code": "fn get_payment_attempt(&self) -> &storage::PaymentAttempt {\n &self.payment_attempt\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_decrypted_wallet_payment_method_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn get_decrypted_wallet_payment_method_token(\n operation: &BoxedOperation<'_, F, Req, D>,\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n payment_data: &mut D,\n connector_call_type_optional: Option<&ConnectorCallType>,\n) -> CustomResult, errors::ApiErrorResponse>\nwhere\n F: Send + Clone + Sync,\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n if is_operation_confirm(operation)\n && payment_data.get_payment_attempt().payment_method\n == Some(storage_enums::PaymentMethod::Wallet)\n && payment_data.get_payment_method_data().is_some()\n {\n let wallet_type = payment_data\n .get_payment_attempt()\n .payment_method_type\n .get_required_value(\"payment_method_type\")?;\n\n let wallet: Box> = match wallet_type {\n storage_enums::PaymentMethodType::ApplePay => Box::new(ApplePayWallet),\n storage_enums::PaymentMethodType::Paze => Box::new(PazeWallet),\n storage_enums::PaymentMethodType::GooglePay => Box::new(GooglePayWallet),\n _ => return Ok(None),\n };\n\n // Check if the wallet has already decrypted the token from the payment data.\n // If a pre-decrypted token is available, use it directly to avoid redundant decryption.\n if let Some(predecrypted_token) = wallet.check_predecrypted_token(payment_data)? {\n logger::debug!(\"Using predecrypted token for wallet\");\n return Ok(Some(predecrypted_token));\n }\n\n let merchant_connector_account =\n get_merchant_connector_account_for_wallet_decryption_flow::(\n state,\n merchant_context,\n payment_data,\n connector_call_type_optional,\n )\n .await?;\n\n let decide_wallet_flow = &wallet\n .decide_wallet_flow(state, payment_data, &merchant_connector_account)\n .attach_printable(\"Failed to decide wallet flow\")?\n .async_map(|payment_price_data| async move {\n wallet\n .decrypt_wallet_token(&payment_price_data, payment_data)\n .await\n })\n .await\n .transpose()\n .attach_printable(\"Failed to decrypt Wallet token\")?;\n Ok(decide_wallet_flow.clone())\n } else {\n Ok(None)\n }\n}", + "after_code": "pub async fn get_decrypted_wallet_payment_method_token(\n operation: &BoxedOperation<'_, F, Req, D>,\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n payment_data: &mut D,\n connector_call_type_optional: Option<&ConnectorCallType>,\n) -> CustomResult, errors::ApiErrorResponse>\nwhere\n F: Send + Clone + Sync,\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n if is_operation_confirm(operation)\n && payment_data.get_payment_attempt().payment_method\n == Some(storage_enums::PaymentMethod::Wallet)\n && payment_data.get_payment_method_data().is_some()\n {\n let wallet_type = payment_data\n .get_payment_attempt()\n .payment_method_type\n .get_required_value(\"payment_method_type\")?;\n\n let wallet: Box> = match wallet_type {\n storage_enums::PaymentMethodType::ApplePay => Box::new(ApplePayWallet),\n storage_enums::PaymentMethodType::Paze => Box::new(PazeWallet),\n storage_enums::PaymentMethodType::GooglePay => Box::new(GooglePayWallet),\n _ => return Ok(None),\n };\n\n // Check if the wallet has already decrypted the token from the payment data.\n // If a pre-decrypted token is available, use it directly to avoid redundant decryption.\n if let Some(predecrypted_token) = wallet.check_predecrypted_token(payment_data)? {\n logger::debug!(\"Using predecrypted token for wallet\");\n return Ok(Some(predecrypted_token));\n }\n\n let merchant_connector_account =\n get_merchant_connector_account_for_wallet_decryption_flow::(\n state,\n merchant_context,\n payment_data,\n connector_call_type_optional,\n )\n .await?;\n\n let decide_wallet_flow = &wallet\n .decide_wallet_flow(state, payment_data, &merchant_connector_account)\n .attach_printable(\"Failed to decide wallet flow\")?\n .async_map(|payment_price_data| async move {\n wallet\n .decrypt_wallet_token(&payment_price_data, payment_data)\n .await\n })\n .await\n .transpose()\n .attach_printable(\"Failed to decrypt Wallet token\")?;\n Ok(decide_wallet_flow.clone())\n } else {\n Ok(None)\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::GenericLinkEnvConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct GenericLinkEnvConfig {\n pub sdk_url: url::Url,\n pub expiry: u32,\n pub ui_config: GenericLinkEnvUiConfig,\n #[serde(deserialize_with = \"deserialize_hashmap\")]\n pub enabled_payment_methods: HashMap>,\n}", + "after_code": "pub struct GenericLinkEnvConfig {\n pub sdk_url: url::Url,\n pub expiry: u32,\n pub ui_config: GenericLinkEnvUiConfig,\n #[serde(deserialize_with = \"deserialize_hashmap\")]\n pub enabled_payment_methods: HashMap>,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::PaymentMethod;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use super::deserialize_hashmap;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use super::deserialize_hashmap;", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_setup_mandate", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_setup_mandate(&self) -> Option<&MandateData> {\n todo!()\n }", + "after_code": "fn get_setup_mandate(&self) -> Option<&MandateData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_authentication_type_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::CardTestingCheck::type::Output", + "file": "crates/router/src/core/payments.rs", + "kind": "type_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "type Output = CheckResult;", + "after_code": "type Output = CheckResult;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::construct_profile_id_and_get_mca", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn construct_profile_id_and_get_mca<'a, F, D>(\n state: &'a SessionState,\n merchant_context: &domain::MerchantContext,\n payment_data: &D,\n connector_name: &str,\n merchant_connector_id: Option<&id_type::MerchantConnectorAccountId>,\n _should_validate: bool,\n) -> RouterResult\nwhere\n F: Clone,\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n let profile_id = payment_data\n .get_payment_intent()\n .profile_id\n .as_ref()\n .get_required_value(\"profile_id\")\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"profile_id is not set in payment_intent\")?\n .clone();\n\n #[cfg(feature = \"v2\")]\n let profile_id = payment_data.get_payment_intent().profile_id.clone();\n\n let merchant_connector_account = helpers::get_merchant_connector_account(\n state,\n merchant_context.get_merchant_account().get_id(),\n payment_data.get_creds_identifier(),\n merchant_context.get_merchant_key_store(),\n &profile_id,\n connector_name,\n merchant_connector_id,\n )\n .await?;\n\n Ok(merchant_connector_account)\n}", + "after_code": "pub async fn construct_profile_id_and_get_mca<'a, F, D>(\n state: &'a SessionState,\n merchant_context: &domain::MerchantContext,\n payment_data: &D,\n connector_name: &str,\n merchant_connector_id: Option<&id_type::MerchantConnectorAccountId>,\n _should_validate: bool,\n) -> RouterResult\nwhere\n F: Clone,\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n let profile_id = payment_data\n .get_payment_intent()\n .profile_id\n .as_ref()\n .get_required_value(\"profile_id\")\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"profile_id is not set in payment_intent\")?\n .clone();\n\n #[cfg(feature = \"v2\")]\n let profile_id = payment_data.get_payment_intent().profile_id.clone();\n\n let merchant_connector_account = helpers::get_merchant_connector_account(\n state,\n merchant_context.get_merchant_account().get_id(),\n payment_data.get_creds_identifier(),\n merchant_context.get_merchant_key_store(),\n &profile_id,\n connector_name,\n merchant_connector_id,\n )\n .await?;\n\n Ok(merchant_connector_account)\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_vault_operation", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_vault_operation(&self) -> Option<&domain_payments::VaultOperation> {\n self.vault_operation.as_ref()\n }", + "after_code": "fn get_vault_operation(&self) -> Option<&domain_payments::VaultOperation> {\n self.vault_operation.as_ref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/psync_flow.rs::types::RouterData::function::decide_flows", + "file": "crates/router/src/core/payments/flows/psync_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": true, + "before_code": "async fn decide_flows<'a>(\n mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: domain_payments::HeaderPayload,\n return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PSync,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let capture_sync_method_result = connector_integration\n .get_multiple_capture_sync_method()\n .to_payment_failed_response();\n\n match (self.request.sync_type.clone(), capture_sync_method_result) {\n (\n types::SyncRequestType::MultipleCaptureSync(pending_connector_capture_id_list),\n Ok(services::CaptureSyncMethod::Individual),\n ) => {\n let mut new_router_data = self\n .execute_connector_processing_step_for_each_capture(\n state,\n pending_connector_capture_id_list,\n call_connector_action,\n connector_integration,\n return_raw_connector_response,\n )\n .await?;\n // Initiating Integrity checks\n let integrity_result = helpers::check_integrity_based_on_flow(\n &new_router_data.request,\n &new_router_data.response,\n );\n\n new_router_data.integrity_check = integrity_result;\n\n Ok(new_router_data)\n }\n (types::SyncRequestType::MultipleCaptureSync(_), Err(err)) => Err(err),\n _ => {\n // for bulk sync of captures, above logic needs to be handled at connector end\n let mut new_router_data = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n\n // Initiating Integrity checks\n let integrity_result = helpers::check_integrity_based_on_flow(\n &new_router_data.request,\n &new_router_data.response,\n );\n\n new_router_data.integrity_check = integrity_result;\n\n Ok(new_router_data)\n }\n }\n }", + "after_code": "async fn decide_flows<'a>(\n mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: domain_payments::HeaderPayload,\n return_raw_connector_response: Option,\n gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PSync,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let capture_sync_method_result = connector_integration\n .get_multiple_capture_sync_method()\n .to_payment_failed_response();\n\n match (self.request.sync_type.clone(), capture_sync_method_result) {\n (\n types::SyncRequestType::MultipleCaptureSync(pending_connector_capture_id_list),\n Ok(services::CaptureSyncMethod::Individual),\n ) => {\n let mut new_router_data = self\n .execute_connector_processing_step_for_each_capture(\n state,\n pending_connector_capture_id_list,\n call_connector_action,\n connector_integration,\n return_raw_connector_response,\n gateway_context,\n )\n .await?;\n // Initiating Integrity checks\n let integrity_result = helpers::check_integrity_based_on_flow(\n &new_router_data.request,\n &new_router_data.response,\n );\n\n new_router_data.integrity_check = integrity_result;\n\n Ok(new_router_data)\n }\n (types::SyncRequestType::MultipleCaptureSync(_), Err(err)) => Err(err),\n _ => {\n // for bulk sync of captures, above logic needs to be handled at connector end\n let mut new_router_data = if let Some(gateway_context) = gateway_context {\n gateway::execute_payment_gateway(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n return_raw_connector_response,\n gateway_context,\n )\n .await\n .to_payment_failed_response()?\n } else {\n services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?\n };\n\n // Initiating Integrity checks\n let integrity_result = helpers::check_integrity_based_on_flow(\n &new_router_data.request,\n &new_router_data.response,\n );\n\n new_router_data.integrity_check = integrity_result;\n\n Ok(new_router_data)\n }\n }\n }", + "diff_span": { + "before": " _ => {\n // for bulk sync of captures, above logic needs to be handled at connector end\n let mut new_router_data = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n\n // Initiating Integrity checks", + "after": " _header_payload: domain_payments::HeaderPayload,\n return_raw_connector_response: Option,\n gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PSync,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let capture_sync_method_result = connector_integration\n .get_multiple_capture_sync_method()\n .to_payment_failed_response();\n\n match (self.request.sync_type.clone(), capture_sync_method_result) {\n (\n types::SyncRequestType::MultipleCaptureSync(pending_connector_capture_id_list),\n Ok(services::CaptureSyncMethod::Individual),\n ) => {\n let mut new_router_data = self\n .execute_connector_processing_step_for_each_capture(\n state,\n pending_connector_capture_id_list,\n call_connector_action,\n connector_integration,\n return_raw_connector_response,\n gateway_context,\n )\n .await?;\n // Initiating Integrity checks\n let integrity_result = helpers::check_integrity_based_on_flow(\n &new_router_data.request,\n &new_router_data.response,\n );\n\n new_router_data.integrity_check = integrity_result;\n\n Ok(new_router_data)\n }\n (types::SyncRequestType::MultipleCaptureSync(_), Err(err)) => Err(err),\n _ => {\n // for bulk sync of captures, above logic needs to be handled at connector end\n let mut new_router_data = if let Some(gateway_context) = gateway_context {\n gateway::execute_payment_gateway(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n return_raw_connector_response,\n gateway_context,\n )\n .await\n .to_payment_failed_response()?\n } else {\n services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?\n };\n\n // Initiating Integrity checks" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n};" + ], + "after_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::{\n api::gateway,\n unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n },\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_currency", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_currency(&self) -> storage_enums::Currency {\n self.currency\n }", + "after_code": "fn get_currency(&self) -> storage_enums::Currency {\n self.currency\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::ApplePayWallet::function::decide_wallet_flow", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn decide_wallet_flow(\n &self,\n state: &SessionState,\n payment_data: &D,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let apple_pay_metadata = check_apple_pay_metadata(state, Some(merchant_connector_account));\n\n add_apple_pay_flow_metrics(\n &apple_pay_metadata,\n payment_data.get_payment_attempt().connector.clone(),\n payment_data.get_payment_attempt().merchant_id.clone(),\n );\n\n let wallet_flow = match apple_pay_metadata {\n Some(domain::ApplePayFlow::Simplified(payment_processing_details)) => Some(\n DecideWalletFlow::ApplePayDecrypt(payment_processing_details),\n ),\n Some(domain::ApplePayFlow::Manual) | None => None,\n };\n Ok(wallet_flow)\n }", + "after_code": "fn decide_wallet_flow(\n &self,\n state: &SessionState,\n payment_data: &D,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let apple_pay_metadata = check_apple_pay_metadata(state, Some(merchant_connector_account));\n\n add_apple_pay_flow_metrics(\n &apple_pay_metadata,\n payment_data.get_payment_attempt().connector.clone(),\n payment_data.get_payment_attempt().merchant_id.clone(),\n );\n\n let wallet_flow = match apple_pay_metadata {\n Some(domain::ApplePayFlow::Simplified(payment_processing_details)) => Some(\n DecideWalletFlow::ApplePayDecrypt(payment_processing_details),\n ),\n Some(domain::ApplePayFlow::Manual) | None => None,\n };\n Ok(wallet_flow)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::ApplePayWallet::function::decrypt_wallet_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn decrypt_wallet_token(\n &self,\n wallet_flow: &DecideWalletFlow,\n payment_data: &D,\n ) -> CustomResult {\n let apple_pay_payment_processing_details = wallet_flow\n .get_apple_pay_payment_processing_details()\n .get_required_value(\"Apple Pay payment processing details\")\n .attach_printable(\n \"Apple Pay payment processing details not found in Apple Pay decryption flow\",\n )?;\n let apple_pay_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_apple_pay_wallet_data())\n .get_required_value(\"Apple Pay wallet token\").attach_printable(\n \"Apple Pay wallet data not found in the payment method data during the Apple Pay decryption flow\",\n )?;\n\n let apple_pay_data =\n ApplePayData::token_json(domain::WalletData::ApplePay(apple_pay_wallet_data.clone()))\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to parse apple pay token to json\")?\n .decrypt(\n &apple_pay_payment_processing_details.payment_processing_certificate,\n &apple_pay_payment_processing_details.payment_processing_certificate_key,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to decrypt apple pay token\")?;\n\n let apple_pay_predecrypt_internal = apple_pay_data\n .parse_value::(\n \"ApplePayPredecryptDataInternal\",\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\n \"failed to parse decrypted apple pay response to ApplePayPredecryptData\",\n )?;\n\n let apple_pay_predecrypt =\n common_types::payments::ApplePayPredecryptData::try_from(apple_pay_predecrypt_internal)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\n \"failed to convert ApplePayPredecryptDataInternal to ApplePayPredecryptData\",\n )?;\n\n Ok(PaymentMethodToken::ApplePayDecrypt(Box::new(\n apple_pay_predecrypt,\n )))\n }", + "after_code": "async fn decrypt_wallet_token(\n &self,\n wallet_flow: &DecideWalletFlow,\n payment_data: &D,\n ) -> CustomResult {\n let apple_pay_payment_processing_details = wallet_flow\n .get_apple_pay_payment_processing_details()\n .get_required_value(\"Apple Pay payment processing details\")\n .attach_printable(\n \"Apple Pay payment processing details not found in Apple Pay decryption flow\",\n )?;\n let apple_pay_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_apple_pay_wallet_data())\n .get_required_value(\"Apple Pay wallet token\").attach_printable(\n \"Apple Pay wallet data not found in the payment method data during the Apple Pay decryption flow\",\n )?;\n\n let apple_pay_data =\n ApplePayData::token_json(domain::WalletData::ApplePay(apple_pay_wallet_data.clone()))\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to parse apple pay token to json\")?\n .decrypt(\n &apple_pay_payment_processing_details.payment_processing_certificate,\n &apple_pay_payment_processing_details.payment_processing_certificate_key,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to decrypt apple pay token\")?;\n\n let apple_pay_predecrypt_internal = apple_pay_data\n .parse_value::(\n \"ApplePayPredecryptDataInternal\",\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\n \"failed to parse decrypted apple pay response to ApplePayPredecryptData\",\n )?;\n\n let apple_pay_predecrypt =\n common_types::payments::ApplePayPredecryptData::try_from(apple_pay_predecrypt_internal)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\n \"failed to convert ApplePayPredecryptDataInternal to ApplePayPredecryptData\",\n )?;\n\n Ok(PaymentMethodToken::ApplePayDecrypt(Box::new(\n apple_pay_predecrypt,\n )))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use helpers::{decrypt_paze_token, ApplePayData};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use helpers::{decrypt_paze_token, ApplePayData};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::EphemeralKey", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl EphemeralKey {\n pub fn server(config: AppState) -> Scope {\n web::scope(\"/v2/client-secret\")\n .app_data(web::Data::new(config))\n .service(web::resource(\"\").route(web::post().to(client_secret_create)))\n .service(web::resource(\"/{id}\").route(web::delete().to(client_secret_delete)))\n }\n}", + "after_code": "impl EphemeralKey {\n pub fn server(config: AppState) -> Scope {\n web::scope(\"/v2/client-secret\")\n .app_data(web::Data::new(config))\n .service(web::resource(\"\").route(web::post().to(client_secret_create)))\n .service(web::resource(\"/{id}\").route(web::delete().to(client_secret_delete)))\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::enum::DecryptionScheme", + "file": "crates/router/src/configs/settings.rs", + "kind": "enum_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub enum DecryptionScheme {\n #[default]\n #[serde(rename = \"RSA-OAEP\")]\n RsaOaep,\n #[serde(rename = \"RSA-OAEP-256\")]\n RsaOaep256,\n}", + "after_code": "pub enum DecryptionScheme {\n #[default]\n #[serde(rename = \"RSA-OAEP\")]\n RsaOaep,\n #[serde(rename = \"RSA-OAEP-256\")]\n RsaOaep256,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Cache", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Cache;", + "after_code": "pub struct Cache;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_client_secret", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_client_secret(&self) -> &Option> {\n todo!()\n }", + "after_code": "fn get_client_secret(&self) -> &Option> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_payment_intent_profile_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> {\n todo!()\n }", + "after_code": "fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::GooglePayWallet::function::decrypt_wallet_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn decrypt_wallet_token(\n &self,\n wallet_flow: &DecideWalletFlow,\n payment_data: &D,\n ) -> CustomResult {\n let google_pay_payment_processing_details = wallet_flow\n .get_google_pay_payment_processing_details()\n .get_required_value(\"Google Pay payment processing details\")\n .attach_printable(\n \"Google Pay payment processing details not found in Google Pay decryption flow\",\n )?;\n\n let google_pay_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_google_pay_wallet_data())\n .get_required_value(\"Paze wallet token\").attach_printable(\n \"Google Pay wallet data not found in the payment method data during the Google Pay decryption flow\",\n )?;\n\n let decryptor = helpers::GooglePayTokenDecryptor::new(\n google_pay_payment_processing_details\n .google_pay_root_signing_keys\n .clone(),\n google_pay_payment_processing_details\n .google_pay_recipient_id\n .clone(),\n google_pay_payment_processing_details\n .google_pay_private_key\n .clone(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to create google pay token decryptor\")?;\n\n // should_verify_token is set to false to disable verification of token\n let google_pay_data_internal = decryptor\n .decrypt_token(\n google_pay_wallet_data\n .tokenization_data\n .get_encrypted_google_pay_token()\n .change_context(errors::ApiErrorResponse::InternalServerError)?\n .clone(),\n false,\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to decrypt google pay token\")?;\n let google_pay_data =\n common_types::payments::GPayPredecryptData::from(google_pay_data_internal);\n Ok(PaymentMethodToken::GooglePayDecrypt(Box::new(\n google_pay_data,\n )))\n }", + "after_code": "async fn decrypt_wallet_token(\n &self,\n wallet_flow: &DecideWalletFlow,\n payment_data: &D,\n ) -> CustomResult {\n let google_pay_payment_processing_details = wallet_flow\n .get_google_pay_payment_processing_details()\n .get_required_value(\"Google Pay payment processing details\")\n .attach_printable(\n \"Google Pay payment processing details not found in Google Pay decryption flow\",\n )?;\n\n let google_pay_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_google_pay_wallet_data())\n .get_required_value(\"Paze wallet token\").attach_printable(\n \"Google Pay wallet data not found in the payment method data during the Google Pay decryption flow\",\n )?;\n\n let decryptor = helpers::GooglePayTokenDecryptor::new(\n google_pay_payment_processing_details\n .google_pay_root_signing_keys\n .clone(),\n google_pay_payment_processing_details\n .google_pay_recipient_id\n .clone(),\n google_pay_payment_processing_details\n .google_pay_private_key\n .clone(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to create google pay token decryptor\")?;\n\n // should_verify_token is set to false to disable verification of token\n let google_pay_data_internal = decryptor\n .decrypt_token(\n google_pay_wallet_data\n .tokenization_data\n .get_encrypted_google_pay_token()\n .change_context(errors::ApiErrorResponse::InternalServerError)?\n .clone(),\n false,\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to decrypt google pay token\")?;\n let google_pay_data =\n common_types::payments::GPayPredecryptData::from(google_pay_data_internal);\n Ok(PaymentMethodToken::GooglePayDecrypt(Box::new(\n google_pay_data,\n )))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }", + "after_code": "fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/psync_flow.rs::impl::PaymentData", + "file": "crates/router/src/core/payments/flows/psync_flow.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl ConstructFlowSpecificData\n for PaymentData\n{\n async fn construct_router_data<'a>(\n &self,\n state: &SessionState,\n connector_id: &str,\n merchant_context: &domain::MerchantContext,\n customer: &Option,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n merchant_recipient_data: Option,\n header_payload: Option,\n _payment_method: Option,\n _payment_method_type: Option,\n ) -> RouterResult<\n types::RouterData,\n > {\n Box::pin(transformers::construct_payment_router_data::<\n api::PSync,\n types::PaymentsSyncData,\n >(\n state,\n self.clone(),\n connector_id,\n merchant_context,\n customer,\n merchant_connector_account,\n merchant_recipient_data,\n header_payload,\n None,\n None,\n ))\n .await\n }\n}", + "after_code": "impl ConstructFlowSpecificData\n for PaymentData\n{\n async fn construct_router_data<'a>(\n &self,\n state: &SessionState,\n connector_id: &str,\n merchant_context: &domain::MerchantContext,\n customer: &Option,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n merchant_recipient_data: Option,\n header_payload: Option,\n _payment_method: Option,\n _payment_method_type: Option,\n ) -> RouterResult<\n types::RouterData,\n > {\n Box::pin(transformers::construct_payment_router_data::<\n api::PSync,\n types::PaymentsSyncData,\n >(\n state,\n self.clone(),\n connector_id,\n merchant_context,\n customer,\n merchant_connector_account,\n merchant_recipient_data,\n header_payload,\n None,\n None,\n ))\n .await\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n};", + "use super::{ConstructFlowSpecificData, Feature};" + ], + "after_imports": [ + "use common_enums::{self, enums};", + "use super::{ConstructFlowSpecificData, Feature};", + "use hyperswitch_interfaces::{\n api::gateway,\n unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n },\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentRedirectSync::function::get_payment_action", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_action(&self) -> services::PaymentAction {\n services::PaymentAction::PSync\n }", + "after_code": "fn get_payment_action(&self) -> services::PaymentAction {\n services::PaymentAction::PSync\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_mandate_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_mandate_id(&self) -> Option<&payments_api::MandateIds> {\n todo!()\n }", + "after_code": "fn get_mandate_id(&self) -> Option<&payments_api::MandateIds> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::PayPalOnboarding", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PayPalOnboarding {\n pub client_id: Secret,\n pub client_secret: Secret,\n pub partner_id: Secret,\n pub enabled: bool,\n}", + "after_code": "pub struct PayPalOnboarding {\n pub client_id: Secret,\n pub client_secret: Secret,\n pub partner_id: Secret,\n pub enabled: bool,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_prerouting_algorithm_in_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(straight_through_algorithm);\n }", + "after_code": "fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(straight_through_algorithm);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_routing_approach_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::get_grpc_headers_ucs", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn get_grpc_headers_ucs(\n &self,\n unified_connector_service_execution_mode: ExecutionMode,\n ) -> GrpcHeadersUcsBuilderInitial {\n let tenant_id = self.tenant.tenant_id.get_string_repr().to_string();\n let request_id = self.request_id.map(|req_id| (*req_id).to_string());\n let shadow_mode = match unified_connector_service_execution_mode {\n ExecutionMode::Primary => false,\n ExecutionMode::Shadow => true,\n };\n GrpcHeadersUcs::builder()\n .tenant_id(tenant_id)\n .request_id(request_id)\n .shadow_mode(Some(shadow_mode))\n }", + "after_code": "pub fn get_grpc_headers_ucs(\n &self,\n unified_connector_service_execution_mode: ExecutionMode,\n ) -> GrpcHeadersUcsBuilderInitial {\n let tenant_id = self.tenant.tenant_id.get_string_repr().to_string();\n let request_id = self.request_id.map(|req_id| (*req_id).to_string());\n let shadow_mode = match unified_connector_service_execution_mode {\n ExecutionMode::Primary => false,\n ExecutionMode::Shadow => true,\n };\n GrpcHeadersUcs::builder()\n .tenant_id(tenant_id)\n .request_id(request_id)\n .shadow_mode(Some(shadow_mode))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::dummy_connector::*;", + "use super::payout_link::*;", + "use super::payouts::*;", + "use super::admin::*;", + "use super::recovery_webhooks::*;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::webhooks::*;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::ephemeral_key::*;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};", + "use common_enums::{ExecutionMode, TransactionType};" + ], + "after_imports": [ + "use super::dummy_connector::*;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use super::payout_link::*;", + "use super::payouts::*;", + "use super::admin::*;", + "use super::recovery_webhooks::*;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::webhooks::*;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::ephemeral_key::*;", + "use common_enums::{ExecutionMode, TransactionType};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::mod::transformers", + "file": "crates/router/src/core/payments.rs", + "kind": "mod_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub mod transformers;", + "after_code": "pub mod transformers;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_payment_intent_profile_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> {\n Some(&self.payment_intent.profile_id)\n }", + "after_code": "fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> {\n Some(&self.payment_intent.profile_id)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_recurring_mandate_payment_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }", + "after_code": "fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_poll_config", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_poll_config(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_poll_config(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_attempts", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_attempts(&self) -> Option> {\n self.attempts.clone()\n }", + "after_code": "fn get_attempts(&self) -> Option> {\n self.attempts.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::WebhookIgnoreErrorSettings", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct WebhookIgnoreErrorSettings {\n pub event_type: Option,\n pub payment_not_found: Option,\n}", + "after_code": "pub struct WebhookIgnoreErrorSettings {\n pub event_type: Option,\n pub payment_not_found: Option,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::Error;", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::Error;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::CardTestingCheck::function::execute_check", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn execute_check(\n &self,\n state: &SessionState,\n _merchant_context: &domain::MerchantContext,\n payment_elgibility_data: &PaymentEligibilityData,\n business_profile: &domain::Profile,\n ) -> CustomResult {\n match &payment_elgibility_data.payment_method_data {\n Some(domain::PaymentMethodData::Card(card)) => {\n match card_testing_guard_utils::validate_card_testing_guard_checks(\n state,\n payment_elgibility_data\n .browser_info\n .as_ref()\n .map(|browser_info| browser_info.peek()),\n card.card_number.clone(),\n &payment_elgibility_data.payment_intent.customer_id,\n business_profile,\n )\n .await\n {\n // If validation succeeds, allow the payment\n Ok(_) => Ok(CheckResult::Allow),\n // If validation fails, check the error type\n Err(e) => match e.current_context() {\n // If it's a PreconditionFailed error, deny with message\n errors::ApiErrorResponse::PreconditionFailed { message } => {\n Ok(CheckResult::Deny {\n message: message.to_string(),\n })\n }\n // For any other error, propagate it\n _ => Err(e),\n },\n }\n }\n // If payment method is not card, allow\n _ => Ok(CheckResult::Allow),\n }\n }", + "after_code": "async fn execute_check(\n &self,\n state: &SessionState,\n _merchant_context: &domain::MerchantContext,\n payment_elgibility_data: &PaymentEligibilityData,\n business_profile: &domain::Profile,\n ) -> CustomResult {\n match &payment_elgibility_data.payment_method_data {\n Some(domain::PaymentMethodData::Card(card)) => {\n match card_testing_guard_utils::validate_card_testing_guard_checks(\n state,\n payment_elgibility_data\n .browser_info\n .as_ref()\n .map(|browser_info| browser_info.peek()),\n card.card_number.clone(),\n &payment_elgibility_data.payment_intent.customer_id,\n business_profile,\n )\n .await\n {\n // If validation succeeds, allow the payment\n Ok(_) => Ok(CheckResult::Allow),\n // If validation fails, check the error type\n Err(e) => match e.current_context() {\n // If it's a PreconditionFailed error, deny with message\n errors::ApiErrorResponse::PreconditionFailed { message } => {\n Ok(CheckResult::Deny {\n message: message.to_string(),\n })\n }\n // For any other error, propagate it\n _ => Err(e),\n },\n }\n }\n // If payment method is not card, allow\n _ => Ok(CheckResult::Allow),\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::is_apple_pay_pre_decrypt_type_connector_tokenization", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn is_apple_pay_pre_decrypt_type_connector_tokenization(\n payment_method_type: Option,\n payment_method_token: Option<&PaymentMethodToken>,\n apple_pay_pre_decrypt_flow_filter: Option,\n) -> bool {\n match (payment_method_type, payment_method_token) {\n (\n Some(storage::enums::PaymentMethodType::ApplePay),\n Some(PaymentMethodToken::ApplePayDecrypt(..)),\n ) => !matches!(\n apple_pay_pre_decrypt_flow_filter,\n Some(ApplePayPreDecryptFlow::NetworkTokenization)\n ),\n _ => true,\n }\n}", + "after_code": "fn is_apple_pay_pre_decrypt_type_connector_tokenization(\n payment_method_type: Option,\n payment_method_token: Option<&PaymentMethodToken>,\n apple_pay_pre_decrypt_flow_filter: Option,\n) -> bool {\n match (payment_method_type, payment_method_token) {\n (\n Some(storage::enums::PaymentMethodType::ApplePay),\n Some(PaymentMethodToken::ApplePayDecrypt(..)),\n ) => !matches!(\n apple_pay_pre_decrypt_flow_filter,\n Some(ApplePayPreDecryptFlow::NetworkTokenization)\n ),\n _ => true,\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_optional_external_vault_session_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_optional_external_vault_session_details(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_optional_external_vault_session_details(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/cancel_flow.rs::types::RouterData::function::decide_flows", + "file": "crates/router/src/core/payments/flows/cancel_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n metrics::PAYMENT_CANCEL_COUNT.add(\n 1,\n router_env::metric_attributes!((\"connector\", connector.connector_name.to_string())),\n );\n\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::Void,\n types::PaymentsCancelData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n Ok(resp)\n }", + "after_code": "async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n metrics::PAYMENT_CANCEL_COUNT.add(\n 1,\n router_env::metric_attributes!((\"connector\", connector.connector_name.to_string())),\n );\n\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::Void,\n types::PaymentsCancelData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n Ok(resp)\n }", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n metrics::PAYMENT_CANCEL_COUNT.add(" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_card_network", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n todo!()\n }", + "after_code": "fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_connector_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn get_connector_data(\n connectors: &mut IntoIter,\n) -> RouterResult {\n connectors\n .next()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Connector not found in connectors iterator\")\n}", + "after_code": "pub fn get_connector_data(\n connectors: &mut IntoIter,\n) -> RouterResult {\n connectors\n .next()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Connector not found in connectors iterator\")\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::Settings::function::is_kv_soft_kill_mode", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn is_kv_soft_kill_mode(&self) -> bool {\n false\n }", + "after_code": "pub fn is_kv_soft_kill_mode(&self) -> bool {\n false\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_capture_method", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_capture_method(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_capture_method(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_email_if_not_present", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_email_if_not_present(&mut self, email: pii::Email) {\n self.email = self.email.clone().or(Some(email));\n }", + "after_code": "fn set_email_if_not_present(&mut self, email: pii::Email) {\n self.email = self.email.clone().or(Some(email));\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::GooglePayWallet::function::decide_wallet_flow", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn decide_wallet_flow(\n &self,\n state: &SessionState,\n _payment_data: &D,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n ) -> CustomResult, errors::ApiErrorResponse> {\n Ok(\n get_google_pay_connector_wallet_details(state, merchant_connector_account)\n .map(DecideWalletFlow::GooglePayDecrypt),\n )\n }", + "after_code": "fn decide_wallet_flow(\n &self,\n state: &SessionState,\n _payment_data: &D,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n ) -> CustomResult, errors::ApiErrorResponse> {\n Ok(\n get_google_pay_connector_wallet_details(state, merchant_connector_account)\n .map(DecideWalletFlow::GooglePayDecrypt),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::ProcessTracker", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl ProcessTracker {\n pub fn server(state: AppState) -> Scope {\n use super::process_tracker::revenue_recovery;\n web::scope(\"/v2/process-trackers/revenue-recovery-workflow\")\n .app_data(web::Data::new(state.clone()))\n .service(\n web::scope(\"/{revenue_recovery_id}\")\n .service(\n web::resource(\"\").route(\n web::get().to(revenue_recovery::revenue_recovery_pt_retrieve_api),\n ),\n )\n .service(\n web::resource(\"/resume\")\n .route(web::post().to(revenue_recovery::revenue_recovery_resume_api)),\n ),\n )\n }\n}", + "after_code": "impl ProcessTracker {\n pub fn server(state: AppState) -> Scope {\n use super::process_tracker::revenue_recovery;\n web::scope(\"/v2/process-trackers/revenue-recovery-workflow\")\n .app_data(web::Data::new(state.clone()))\n .service(\n web::scope(\"/{revenue_recovery_id}\")\n .service(\n web::resource(\"\").route(\n web::get().to(revenue_recovery::revenue_recovery_pt_retrieve_api),\n ),\n )\n .service(\n web::resource(\"/resume\")\n .route(web::post().to(revenue_recovery::revenue_recovery_resume_api)),\n ),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::process_tracker::revenue_recovery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::process_tracker::revenue_recovery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_payment_method_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_token(&self) -> Option<&PaymentMethodToken> {\n todo!()\n }", + "after_code": "fn get_payment_method_token(&self) -> Option<&PaymentMethodToken> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_connector_customer_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_connector_customer_id(&self) -> Option {\n self.connector_customer_id.clone()\n }", + "after_code": "fn get_connector_customer_id(&self) -> Option {\n self.connector_customer_id.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_currency", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_currency(&self) -> storage_enums::Currency {\n self.payment_intent.amount_details.currency\n }", + "after_code": "fn get_currency(&self) -> storage_enums::Currency {\n self.payment_intent.amount_details.currency\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::impl::Multitenancy", + "file": "crates/router/src/configs/settings.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Multitenancy {\n pub fn get_tenants(&self) -> &HashMap {\n &self.tenants.0\n }\n pub fn get_tenant_ids(&self) -> Vec {\n self.tenants\n .0\n .values()\n .map(|tenant| tenant.tenant_id.clone())\n .collect()\n }\n pub fn get_tenant(&self, tenant_id: &id_type::TenantId) -> Option<&Tenant> {\n self.tenants.0.get(tenant_id)\n }\n}", + "after_code": "impl Multitenancy {\n pub fn get_tenants(&self) -> &HashMap {\n &self.tenants.0\n }\n pub fn get_tenant_ids(&self) -> Vec {\n self.tenants\n .0\n .values()\n .map(|tenant| tenant.tenant_id.clone())\n .collect()\n }\n pub fn get_tenant(&self, tenant_id: &id_type::TenantId) -> Option<&Tenant> {\n self.tenants.0.get(tenant_id)\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::collections::{HashMap, HashSet};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_pre_routing_result", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_pre_routing_result(\n &self,\n ) -> Option> {\n None\n }", + "after_code": "fn get_pre_routing_result(\n &self,\n ) -> Option> {\n None\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Payments", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Payments;", + "after_code": "pub struct Payments;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_amount", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_amount(&self) -> api::Amount {\n todo!()\n }", + "after_code": "fn get_amount(&self) -> api::Amount {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_amount", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_amount(&self) -> api::Amount {\n todo!()\n }", + "after_code": "fn get_amount(&self) -> api::Amount {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_token(&self) -> Option<&str> {\n self.token.as_deref()\n }", + "after_code": "fn get_token(&self) -> Option<&str> {\n self.token.as_deref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_currency", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_currency(&self) -> storage_enums::Currency {\n self.payment_intent.amount_details.currency\n }", + "after_code": "fn get_currency(&self) -> storage_enums::Currency {\n self.payment_intent.amount_details.currency\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/complete_authorize_flow.rs::impl::types::RouterData<\n api::CompleteAuthorize,\n types::CompleteAuthorizeData,\n types::PaymentsResponseData,\n >", + "file": "crates/router/src/core/payments/flows/complete_authorize_flow.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "impl Feature\n for types::RouterData<\n api::CompleteAuthorize,\n types::CompleteAuthorizeData,\n types::PaymentsResponseData,\n >\n{\n async fn decide_flows<'a>(\n mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n business_profile: &domain::Profile,\n header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::CompleteAuthorize,\n types::CompleteAuthorizeData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let mut complete_authorize_router_data = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action.clone(),\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n match complete_authorize_router_data.response.clone() {\n Err(_) => Ok(complete_authorize_router_data),\n Ok(complete_authorize_response) => {\n // Check if the Capture API should be called based on the connector and other parameters\n if super::should_initiate_capture_flow(\n &connector.connector_name,\n self.request.customer_acceptance,\n self.request.capture_method,\n self.request.setup_future_usage,\n complete_authorize_router_data.status,\n ) {\n complete_authorize_router_data = Box::pin(process_capture_flow(\n complete_authorize_router_data,\n complete_authorize_response,\n state,\n connector,\n call_connector_action.clone(),\n business_profile,\n header_payload,\n ))\n .await?;\n }\n Ok(complete_authorize_router_data)\n }\n }\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn add_payment_method_token<'a>(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _tokenization_action: &payments::TokenizationAction,\n should_continue_payment: bool,\n ) -> RouterResult {\n // TODO: remove this and handle it in core\n if matches!(connector.connector_name, types::Connector::Payme) {\n let request = self.request.clone();\n payments::tokenization::add_payment_method_token(\n state,\n connector,\n &payments::TokenizationAction::TokenizeInConnector,\n self,\n types::PaymentMethodTokenizationData::try_from(request)?,\n should_continue_payment,\n )\n .await\n } else {\n Ok(types::PaymentMethodTokenResult {\n payment_method_token_result: Ok(None),\n is_payment_method_tokenization_performed: false,\n connector_response: None,\n })\n }\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::CompleteAuthorize,\n types::CompleteAuthorizeData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n\n async fn preprocessing_steps<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n ) -> RouterResult {\n complete_authorize_preprocessing_steps(state, &self, true, connector).await\n }\n\n async fn call_preprocessing_through_unified_connector_service<'a>(\n self,\n state: &SessionState,\n header_payload: &hyperswitch_domain_models::payments::HeaderPayload,\n lineage_ids: &grpc_client::LineageIds,\n #[cfg(feature = \"v1\")] merchant_connector_account: helpers::MerchantConnectorAccountType,\n #[cfg(feature = \"v2\")]\n merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n merchant_context: &domain::MerchantContext,\n connector_data: &api::ConnectorData,\n unified_connector_service_execution_mode: common_enums::ExecutionMode,\n merchant_order_reference_id: Option,\n ) -> RouterResult<(Self, bool)> {\n let current_flow = api_interface::CurrentFlowInfo::CompleteAuthorize {\n request_data: &self.request,\n };\n let optional_preprocessing_flow = connector_data\n .connector\n .get_preprocessing_flow_if_needed(current_flow);\n match optional_preprocessing_flow {\n Some(preprocessing_flow) => {\n let updated_router_data = handle_preprocessing_through_unified_connector_service(\n self,\n state,\n header_payload,\n lineage_ids.clone(),\n merchant_connector_account.clone(),\n merchant_context,\n connector_data,\n unified_connector_service_execution_mode,\n merchant_order_reference_id.clone(),\n preprocessing_flow,\n )\n .await?;\n let pre_processing_flow_response = api_interface::PreProcessingFlowResponse {\n response: &updated_router_data.response,\n attempt_status: updated_router_data.status,\n };\n let current_flow = api_interface::CurrentFlowInfo::CompleteAuthorize {\n request_data: &updated_router_data.request,\n };\n let should_continue = connector_data\n .connector\n .decide_should_continue_after_preprocessing(\n current_flow,\n preprocessing_flow,\n pre_processing_flow_response,\n );\n Ok((updated_router_data, should_continue))\n }\n None => Ok((self, true)),\n }\n }\n\n async fn call_unified_connector_service<'a>(\n &mut self,\n _state: &SessionState,\n _header_payload: &hyperswitch_domain_models::payments::HeaderPayload,\n _lineage_ids: grpc_client::LineageIds,\n #[cfg(feature = \"v1\")] _merchant_connector_account: helpers::MerchantConnectorAccountType,\n #[cfg(feature = \"v2\")]\n _merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n _merchant_context: &domain::MerchantContext,\n _connector_data: &api::ConnectorData,\n _unified_connector_service_execution_mode: common_enums::ExecutionMode,\n _merchant_order_reference_id: Option,\n _call_connector_action: common_enums::CallConnectorAction,\n _creds_identifier: Option,\n ) -> RouterResult<()> {\n // Call UCS for Authorize flow\n Ok(())\n }\n}", + "after_code": "impl Feature\n for types::RouterData<\n api::CompleteAuthorize,\n types::CompleteAuthorizeData,\n types::PaymentsResponseData,\n >\n{\n async fn decide_flows<'a>(\n mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n business_profile: &domain::Profile,\n header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::CompleteAuthorize,\n types::CompleteAuthorizeData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let mut complete_authorize_router_data = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action.clone(),\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n match complete_authorize_router_data.response.clone() {\n Err(_) => Ok(complete_authorize_router_data),\n Ok(complete_authorize_response) => {\n // Check if the Capture API should be called based on the connector and other parameters\n if super::should_initiate_capture_flow(\n &connector.connector_name,\n self.request.customer_acceptance,\n self.request.capture_method,\n self.request.setup_future_usage,\n complete_authorize_router_data.status,\n ) {\n complete_authorize_router_data = Box::pin(process_capture_flow(\n complete_authorize_router_data,\n complete_authorize_response,\n state,\n connector,\n call_connector_action.clone(),\n business_profile,\n header_payload,\n ))\n .await?;\n }\n Ok(complete_authorize_router_data)\n }\n }\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn add_payment_method_token<'a>(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _tokenization_action: &payments::TokenizationAction,\n should_continue_payment: bool,\n ) -> RouterResult {\n // TODO: remove this and handle it in core\n if matches!(connector.connector_name, types::Connector::Payme) {\n let request = self.request.clone();\n payments::tokenization::add_payment_method_token(\n state,\n connector,\n &payments::TokenizationAction::TokenizeInConnector,\n self,\n types::PaymentMethodTokenizationData::try_from(request)?,\n should_continue_payment,\n )\n .await\n } else {\n Ok(types::PaymentMethodTokenResult {\n payment_method_token_result: Ok(None),\n is_payment_method_tokenization_performed: false,\n connector_response: None,\n })\n }\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::CompleteAuthorize,\n types::CompleteAuthorizeData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n\n async fn preprocessing_steps<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n ) -> RouterResult {\n complete_authorize_preprocessing_steps(state, &self, true, connector).await\n }\n\n async fn call_preprocessing_through_unified_connector_service<'a>(\n self,\n state: &SessionState,\n header_payload: &hyperswitch_domain_models::payments::HeaderPayload,\n lineage_ids: &grpc_client::LineageIds,\n #[cfg(feature = \"v1\")] merchant_connector_account: helpers::MerchantConnectorAccountType,\n #[cfg(feature = \"v2\")]\n merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n merchant_context: &domain::MerchantContext,\n connector_data: &api::ConnectorData,\n unified_connector_service_execution_mode: common_enums::ExecutionMode,\n merchant_order_reference_id: Option,\n ) -> RouterResult<(Self, bool)> {\n let current_flow = api_interface::CurrentFlowInfo::CompleteAuthorize {\n request_data: &self.request,\n };\n let optional_preprocessing_flow = connector_data\n .connector\n .get_preprocessing_flow_if_needed(current_flow);\n match optional_preprocessing_flow {\n Some(preprocessing_flow) => {\n let updated_router_data = handle_preprocessing_through_unified_connector_service(\n self,\n state,\n header_payload,\n lineage_ids.clone(),\n merchant_connector_account.clone(),\n merchant_context,\n connector_data,\n unified_connector_service_execution_mode,\n merchant_order_reference_id.clone(),\n preprocessing_flow,\n )\n .await?;\n let pre_processing_flow_response = api_interface::PreProcessingFlowResponse {\n response: &updated_router_data.response,\n attempt_status: updated_router_data.status,\n };\n let current_flow = api_interface::CurrentFlowInfo::CompleteAuthorize {\n request_data: &updated_router_data.request,\n };\n let should_continue = connector_data\n .connector\n .decide_should_continue_after_preprocessing(\n current_flow,\n preprocessing_flow,\n pre_processing_flow_response,\n );\n Ok((updated_router_data, should_continue))\n }\n None => Ok((self, true)),\n }\n }\n\n async fn call_unified_connector_service<'a>(\n &mut self,\n _state: &SessionState,\n _header_payload: &hyperswitch_domain_models::payments::HeaderPayload,\n _lineage_ids: grpc_client::LineageIds,\n #[cfg(feature = \"v1\")] _merchant_connector_account: helpers::MerchantConnectorAccountType,\n #[cfg(feature = \"v2\")]\n _merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n _merchant_context: &domain::MerchantContext,\n _connector_data: &api::ConnectorData,\n _unified_connector_service_execution_mode: common_enums::ExecutionMode,\n _merchant_order_reference_id: Option,\n _call_connector_action: common_enums::CallConnectorAction,\n _creds_identifier: Option,\n ) -> RouterResult<()> {\n // Call UCS for Authorize flow\n Ok(())\n }\n}", + "diff_span": { + "before": "", + "after": " header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments.rs::function::call_surcharge_decision_management_for_session_flow", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn call_surcharge_decision_management_for_session_flow(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n _business_profile: &domain::Profile,\n payment_attempt: &storage::PaymentAttempt,\n payment_intent: &storage::PaymentIntent,\n billing_address: Option,\n session_connector_data: &api::SessionConnectorDatas,\n) -> RouterResult> {\n if let Some(surcharge_amount) = payment_attempt.net_amount.get_surcharge_amount() {\n Ok(Some(api::SessionSurchargeDetails::PreDetermined(\n types::SurchargeDetails {\n original_amount: payment_attempt.net_amount.get_order_amount(),\n surcharge: Surcharge::Fixed(surcharge_amount),\n tax_on_surcharge: None,\n surcharge_amount,\n tax_on_surcharge_amount: payment_attempt\n .net_amount\n .get_tax_on_surcharge()\n .unwrap_or_default(),\n },\n )))\n } else {\n let payment_method_type_list = session_connector_data\n .iter()\n .map(|session_connector_data| session_connector_data.payment_method_sub_type)\n .collect();\n\n #[cfg(feature = \"v1\")]\n let algorithm_ref: api::routing::RoutingAlgorithmRef = merchant_context\n .get_merchant_account()\n .routing_algorithm\n .clone()\n .map(|val| val.parse_value(\"routing algorithm\"))\n .transpose()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Could not decode the routing algorithm\")?\n .unwrap_or_default();\n\n // TODO: Move to business profile surcharge column\n #[cfg(feature = \"v2\")]\n let algorithm_ref: api::routing::RoutingAlgorithmRef = todo!();\n\n let surcharge_results =\n surcharge_decision_configs::perform_surcharge_decision_management_for_session_flow(\n state,\n algorithm_ref,\n payment_attempt,\n payment_intent,\n billing_address,\n &payment_method_type_list,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"error performing surcharge decision operation\")?;\n\n Ok(if surcharge_results.is_empty_result() {\n None\n } else {\n Some(api::SessionSurchargeDetails::Calculated(surcharge_results))\n })\n }\n}", + "after_code": "pub async fn call_surcharge_decision_management_for_session_flow(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n _business_profile: &domain::Profile,\n payment_attempt: &storage::PaymentAttempt,\n payment_intent: &storage::PaymentIntent,\n billing_address: Option,\n session_connector_data: &api::SessionConnectorDatas,\n) -> RouterResult> {\n if let Some(surcharge_amount) = payment_attempt.net_amount.get_surcharge_amount() {\n Ok(Some(api::SessionSurchargeDetails::PreDetermined(\n types::SurchargeDetails {\n original_amount: payment_attempt.net_amount.get_order_amount(),\n surcharge: Surcharge::Fixed(surcharge_amount),\n tax_on_surcharge: None,\n surcharge_amount,\n tax_on_surcharge_amount: payment_attempt\n .net_amount\n .get_tax_on_surcharge()\n .unwrap_or_default(),\n },\n )))\n } else {\n let payment_method_type_list = session_connector_data\n .iter()\n .map(|session_connector_data| session_connector_data.payment_method_sub_type)\n .collect();\n\n #[cfg(feature = \"v1\")]\n let algorithm_ref: api::routing::RoutingAlgorithmRef = merchant_context\n .get_merchant_account()\n .routing_algorithm\n .clone()\n .map(|val| val.parse_value(\"routing algorithm\"))\n .transpose()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Could not decode the routing algorithm\")?\n .unwrap_or_default();\n\n // TODO: Move to business profile surcharge column\n #[cfg(feature = \"v2\")]\n let algorithm_ref: api::routing::RoutingAlgorithmRef = todo!();\n\n let surcharge_results =\n surcharge_decision_configs::perform_surcharge_decision_management_for_session_flow(\n state,\n algorithm_ref,\n payment_attempt,\n payment_intent,\n billing_address,\n &payment_method_type_list,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"error performing surcharge decision operation\")?;\n\n Ok(if surcharge_results.is_empty_result() {\n None\n } else {\n Some(api::SessionSurchargeDetails::Calculated(surcharge_results))\n })\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::ConnectorOnboarding::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/connector_onboarding\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/action_url\")\n .route(web::post().to(connector_onboarding::get_action_url)),\n )\n .service(\n web::resource(\"/sync\")\n .route(web::post().to(connector_onboarding::sync_onboarding_status)),\n )\n .service(\n web::resource(\"/reset_tracking_id\")\n .route(web::post().to(connector_onboarding::reset_tracking_id)),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/connector_onboarding\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/action_url\")\n .route(web::post().to(connector_onboarding::get_action_url)),\n )\n .service(\n web::resource(\"/sync\")\n .route(web::post().to(connector_onboarding::sync_onboarding_status)),\n )\n .service(\n web::resource(\"/reset_tracking_id\")\n .route(web::post().to(connector_onboarding::reset_tracking_id)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::PaymentAuthenticateCompleteAuthorize", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl PaymentRedirectFlow for PaymentAuthenticateCompleteAuthorize {\n type PaymentFlowResponse = router_types::AuthenticatePaymentFlowResponse;\n\n #[allow(clippy::too_many_arguments)]\n async fn call_payment_flow(\n &self,\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n req: PaymentsRedirectResponseData,\n connector_action: CallConnectorAction,\n connector: String,\n payment_id: id_type::PaymentId,\n ) -> RouterResult {\n let merchant_id = merchant_context.get_merchant_account().get_id().clone();\n let key_manager_state = &state.into();\n\n let payment_intent = state\n .store\n .find_payment_intent_by_payment_id_merchant_id(\n key_manager_state,\n &payment_id,\n &merchant_id,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n let payment_attempt = state\n .store\n .find_payment_attempt_by_attempt_id_merchant_id(\n &payment_intent.active_attempt.get_id(),\n &merchant_id,\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n let authentication_id = payment_attempt\n .authentication_id\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing authentication_id in payment_attempt\")?;\n let authentication = state\n .store\n .find_authentication_by_merchant_id_authentication_id(&merchant_id, &authentication_id)\n .await\n .to_not_found_response(errors::ApiErrorResponse::AuthenticationNotFound {\n id: authentication_id.get_string_repr().to_string(),\n })?;\n // Fetching merchant_connector_account to check if pull_mechanism is enabled for 3ds connector\n let authentication_merchant_connector_account = helpers::get_merchant_connector_account(\n state,\n &merchant_id,\n None,\n merchant_context.get_merchant_key_store(),\n &payment_intent\n .profile_id\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing profile_id in payment_intent\")?,\n &payment_attempt\n .authentication_connector\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing authentication connector in payment_intent\")?,\n None,\n )\n .await?;\n let is_pull_mechanism_enabled =\n utils::check_if_pull_mechanism_for_external_3ds_enabled_from_connector_metadata(\n authentication_merchant_connector_account\n .get_metadata()\n .map(|metadata| metadata.expose()),\n );\n let response = if is_pull_mechanism_enabled\n || authentication.authentication_type\n != Some(common_enums::DecoupledAuthenticationType::Challenge)\n {\n let payment_confirm_req = api::PaymentsRequest {\n payment_id: Some(req.resource_id.clone()),\n merchant_id: req.merchant_id.clone(),\n feature_metadata: Some(api_models::payments::FeatureMetadata {\n redirect_response: Some(api_models::payments::RedirectResponse {\n param: req.param.map(Secret::new),\n json_payload: Some(\n req.json_payload.unwrap_or(serde_json::json!({})).into(),\n ),\n }),\n search_tags: None,\n apple_pay_recurring_details: None,\n }),\n ..Default::default()\n };\n Box::pin(payments_core::<\n api::Authorize,\n api::PaymentsResponse,\n _,\n _,\n _,\n _,\n >(\n state.clone(),\n req_state,\n merchant_context.clone(),\n None,\n PaymentConfirm,\n payment_confirm_req,\n services::api::AuthFlow::Merchant,\n connector_action,\n None,\n None,\n HeaderPayload::with_source(enums::PaymentSource::ExternalAuthenticator),\n ))\n .await?\n } else {\n let payment_sync_req = api::PaymentsRetrieveRequest {\n resource_id: req.resource_id,\n merchant_id: req.merchant_id,\n param: req.param,\n force_sync: req.force_sync,\n connector: req.connector,\n merchant_connector_details: req.creds_identifier.map(|creds_id| {\n api::MerchantConnectorDetailsWrap {\n creds_identifier: creds_id,\n encoded_data: None,\n }\n }),\n client_secret: None,\n expand_attempts: None,\n expand_captures: None,\n all_keys_required: None,\n };\n Box::pin(\n payments_core::(\n state.clone(),\n req_state,\n merchant_context.clone(),\n None,\n PaymentStatus,\n payment_sync_req,\n services::api::AuthFlow::Merchant,\n connector_action,\n None,\n None,\n HeaderPayload::default(),\n ),\n )\n .await?\n };\n let payments_response = match response {\n services::ApplicationResponse::Json(response) => Ok(response),\n services::ApplicationResponse::JsonWithHeaders((response, _)) => Ok(response),\n _ => Err(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get the response in json\"),\n }?;\n // When intent status is RequiresCustomerAction, Set poll_id in redis to allow the fetch status of poll through retrieve_poll_status api from client\n if payments_response.status == common_enums::IntentStatus::RequiresCustomerAction {\n let req_poll_id = core_utils::get_external_authentication_request_poll_id(&payment_id);\n let poll_id = core_utils::get_poll_id(&merchant_id, req_poll_id.clone());\n let redis_conn = state\n .store\n .get_redis_conn()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get redis connection\")?;\n redis_conn\n .set_key_with_expiry(\n &poll_id.into(),\n api_models::poll::PollStatus::Pending.to_string(),\n consts::POLL_ID_TTL,\n )\n .await\n .change_context(errors::StorageError::KVError)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to add poll_id in redis\")?;\n };\n let default_poll_config = router_types::PollConfig::default();\n let default_config_str = default_poll_config\n .encode_to_string_of_json()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while stringifying default poll config\")?;\n let poll_config = state\n .store\n .find_config_by_key_unwrap_or(\n &router_types::PollConfig::get_poll_config_key(connector),\n Some(default_config_str),\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"The poll config was not found in the DB\")?;\n let poll_config: router_types::PollConfig = poll_config\n .config\n .parse_struct(\"PollConfig\")\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while parsing PollConfig\")?;\n let profile_id = payments_response\n .profile_id\n .as_ref()\n .get_required_value(\"profile_id\")?;\n let business_profile = state\n .store\n .find_business_profile_by_profile_id(\n key_manager_state,\n merchant_context.get_merchant_key_store(),\n profile_id,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::ProfileNotFound {\n id: profile_id.get_string_repr().to_owned(),\n })?;\n Ok(router_types::AuthenticatePaymentFlowResponse {\n payments_response,\n poll_config,\n business_profile,\n })\n }\n fn generate_response(\n &self,\n payment_flow_response: &Self::PaymentFlowResponse,\n payment_id: id_type::PaymentId,\n connector: String,\n ) -> RouterResult> {\n let payments_response = &payment_flow_response.payments_response;\n let redirect_response = helpers::get_handle_response_url(\n payment_id.clone(),\n &payment_flow_response.business_profile,\n payments_response,\n connector.clone(),\n )?;\n // html script to check if inside iframe, then send post message to parent for redirection else redirect self to return_url\n let html = core_utils::get_html_redirect_response_for_external_authentication(\n redirect_response.return_url_with_query_params,\n payments_response,\n payment_id,\n &payment_flow_response.poll_config,\n )?;\n Ok(services::ApplicationResponse::Form(Box::new(\n services::RedirectionFormData {\n redirect_form: services::RedirectForm::Html { html_data: html },\n payment_method_data: None,\n amount: payments_response.amount.to_string(),\n currency: payments_response.currency.clone(),\n },\n )))\n }\n\n fn get_payment_action(&self) -> services::PaymentAction {\n services::PaymentAction::PaymentAuthenticateCompleteAuthorize\n }\n}", + "after_code": "impl PaymentRedirectFlow for PaymentAuthenticateCompleteAuthorize {\n type PaymentFlowResponse = router_types::AuthenticatePaymentFlowResponse;\n\n #[allow(clippy::too_many_arguments)]\n async fn call_payment_flow(\n &self,\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n req: PaymentsRedirectResponseData,\n connector_action: CallConnectorAction,\n connector: String,\n payment_id: id_type::PaymentId,\n ) -> RouterResult {\n let merchant_id = merchant_context.get_merchant_account().get_id().clone();\n let key_manager_state = &state.into();\n\n let payment_intent = state\n .store\n .find_payment_intent_by_payment_id_merchant_id(\n key_manager_state,\n &payment_id,\n &merchant_id,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n let payment_attempt = state\n .store\n .find_payment_attempt_by_attempt_id_merchant_id(\n &payment_intent.active_attempt.get_id(),\n &merchant_id,\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n let authentication_id = payment_attempt\n .authentication_id\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing authentication_id in payment_attempt\")?;\n let authentication = state\n .store\n .find_authentication_by_merchant_id_authentication_id(&merchant_id, &authentication_id)\n .await\n .to_not_found_response(errors::ApiErrorResponse::AuthenticationNotFound {\n id: authentication_id.get_string_repr().to_string(),\n })?;\n // Fetching merchant_connector_account to check if pull_mechanism is enabled for 3ds connector\n let authentication_merchant_connector_account = helpers::get_merchant_connector_account(\n state,\n &merchant_id,\n None,\n merchant_context.get_merchant_key_store(),\n &payment_intent\n .profile_id\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing profile_id in payment_intent\")?,\n &payment_attempt\n .authentication_connector\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing authentication connector in payment_intent\")?,\n None,\n )\n .await?;\n let is_pull_mechanism_enabled =\n utils::check_if_pull_mechanism_for_external_3ds_enabled_from_connector_metadata(\n authentication_merchant_connector_account\n .get_metadata()\n .map(|metadata| metadata.expose()),\n );\n let response = if is_pull_mechanism_enabled\n || authentication.authentication_type\n != Some(common_enums::DecoupledAuthenticationType::Challenge)\n {\n let payment_confirm_req = api::PaymentsRequest {\n payment_id: Some(req.resource_id.clone()),\n merchant_id: req.merchant_id.clone(),\n feature_metadata: Some(api_models::payments::FeatureMetadata {\n redirect_response: Some(api_models::payments::RedirectResponse {\n param: req.param.map(Secret::new),\n json_payload: Some(\n req.json_payload.unwrap_or(serde_json::json!({})).into(),\n ),\n }),\n search_tags: None,\n apple_pay_recurring_details: None,\n }),\n ..Default::default()\n };\n Box::pin(payments_core::<\n api::Authorize,\n api::PaymentsResponse,\n _,\n _,\n _,\n _,\n >(\n state.clone(),\n req_state,\n merchant_context.clone(),\n None,\n PaymentConfirm,\n payment_confirm_req,\n services::api::AuthFlow::Merchant,\n connector_action,\n None,\n None,\n HeaderPayload::with_source(enums::PaymentSource::ExternalAuthenticator),\n ))\n .await?\n } else {\n let payment_sync_req = api::PaymentsRetrieveRequest {\n resource_id: req.resource_id,\n merchant_id: req.merchant_id,\n param: req.param,\n force_sync: req.force_sync,\n connector: req.connector,\n merchant_connector_details: req.creds_identifier.map(|creds_id| {\n api::MerchantConnectorDetailsWrap {\n creds_identifier: creds_id,\n encoded_data: None,\n }\n }),\n client_secret: None,\n expand_attempts: None,\n expand_captures: None,\n all_keys_required: None,\n };\n Box::pin(\n payments_core::(\n state.clone(),\n req_state,\n merchant_context.clone(),\n None,\n PaymentStatus,\n payment_sync_req,\n services::api::AuthFlow::Merchant,\n connector_action,\n None,\n None,\n HeaderPayload::default(),\n ),\n )\n .await?\n };\n let payments_response = match response {\n services::ApplicationResponse::Json(response) => Ok(response),\n services::ApplicationResponse::JsonWithHeaders((response, _)) => Ok(response),\n _ => Err(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get the response in json\"),\n }?;\n // When intent status is RequiresCustomerAction, Set poll_id in redis to allow the fetch status of poll through retrieve_poll_status api from client\n if payments_response.status == common_enums::IntentStatus::RequiresCustomerAction {\n let req_poll_id = core_utils::get_external_authentication_request_poll_id(&payment_id);\n let poll_id = core_utils::get_poll_id(&merchant_id, req_poll_id.clone());\n let redis_conn = state\n .store\n .get_redis_conn()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get redis connection\")?;\n redis_conn\n .set_key_with_expiry(\n &poll_id.into(),\n api_models::poll::PollStatus::Pending.to_string(),\n consts::POLL_ID_TTL,\n )\n .await\n .change_context(errors::StorageError::KVError)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to add poll_id in redis\")?;\n };\n let default_poll_config = router_types::PollConfig::default();\n let default_config_str = default_poll_config\n .encode_to_string_of_json()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while stringifying default poll config\")?;\n let poll_config = state\n .store\n .find_config_by_key_unwrap_or(\n &router_types::PollConfig::get_poll_config_key(connector),\n Some(default_config_str),\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"The poll config was not found in the DB\")?;\n let poll_config: router_types::PollConfig = poll_config\n .config\n .parse_struct(\"PollConfig\")\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while parsing PollConfig\")?;\n let profile_id = payments_response\n .profile_id\n .as_ref()\n .get_required_value(\"profile_id\")?;\n let business_profile = state\n .store\n .find_business_profile_by_profile_id(\n key_manager_state,\n merchant_context.get_merchant_key_store(),\n profile_id,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::ProfileNotFound {\n id: profile_id.get_string_repr().to_owned(),\n })?;\n Ok(router_types::AuthenticatePaymentFlowResponse {\n payments_response,\n poll_config,\n business_profile,\n })\n }\n fn generate_response(\n &self,\n payment_flow_response: &Self::PaymentFlowResponse,\n payment_id: id_type::PaymentId,\n connector: String,\n ) -> RouterResult> {\n let payments_response = &payment_flow_response.payments_response;\n let redirect_response = helpers::get_handle_response_url(\n payment_id.clone(),\n &payment_flow_response.business_profile,\n payments_response,\n connector.clone(),\n )?;\n // html script to check if inside iframe, then send post message to parent for redirection else redirect self to return_url\n let html = core_utils::get_html_redirect_response_for_external_authentication(\n redirect_response.return_url_with_query_params,\n payments_response,\n payment_id,\n &payment_flow_response.poll_config,\n )?;\n Ok(services::ApplicationResponse::Form(Box::new(\n services::RedirectionFormData {\n redirect_form: services::RedirectForm::Html { html_data: html },\n payment_method_data: None,\n amount: payments_response.amount.to_string(),\n currency: payments_response.currency.clone(),\n },\n )))\n }\n\n fn get_payment_action(&self) -> services::PaymentAction {\n services::PaymentAction::PaymentAuthenticateCompleteAuthorize\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use hyperswitch_domain_models::router_response_types::RedirectForm;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use hyperswitch_domain_models::router_response_types::RedirectForm;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_co_badged_card_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }", + "after_code": "fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::impl::Settings", + "file": "crates/router/src/configs/settings.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Settings {\n #[cfg(feature = \"kv_store\")]\n pub fn is_kv_soft_kill_mode(&self) -> bool {\n self.kv_config.soft_kill.unwrap_or(false)\n }\n\n #[cfg(not(feature = \"kv_store\"))]\n pub fn is_kv_soft_kill_mode(&self) -> bool {\n false\n }\n}", + "after_code": "impl Settings {\n #[cfg(feature = \"kv_store\")]\n pub fn is_kv_soft_kill_mode(&self) -> bool {\n self.kv_config.soft_kill.unwrap_or(false)\n }\n\n #[cfg(not(feature = \"kv_store\"))]\n pub fn is_kv_soft_kill_mode(&self) -> bool {\n false\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::enum::TokenizationAction", + "file": "crates/router/src/core/payments.rs", + "kind": "enum_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub enum TokenizationAction {\n TokenizeInConnector,\n SkipConnectorTokenization,\n}", + "after_code": "pub enum TokenizationAction {\n TokenizeInConnector,\n SkipConnectorTokenization,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::get_api_client", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_api_client(&self) -> &dyn crate::services::ApiClient {\n self.api_client.as_ref()\n }", + "after_code": "fn get_api_client(&self) -> &dyn crate::services::ApiClient {\n self.api_client.as_ref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_payment_intent_profile_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> {\n todo!()\n }", + "after_code": "fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::get_request_id", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_request_id(&self) -> Option {\n self.request_id\n }", + "after_code": "fn get_request_id(&self) -> Option {\n self.request_id\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};", + "use router_env::tracing_actix_web::RequestId;" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use router_env::tracing_actix_web::RequestId;" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::BillingConnectorInvoiceSyncCall", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct BillingConnectorInvoiceSyncCall {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub billing_connectors_which_requires_invoice_sync_call: HashSet,\n}", + "after_code": "pub struct BillingConnectorInvoiceSyncCall {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub billing_connectors_which_requires_invoice_sync_call: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use super::deserialize_hashset;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use api_models::enums;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::ProfileAcquirer", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ProfileAcquirer;", + "after_code": "pub struct ProfileAcquirer;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_recurring_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_recurring_details(&self) -> Option<&RecurringDetails> {\n self.recurring_details.as_ref()\n }", + "after_code": "fn get_recurring_details(&self) -> Option<&RecurringDetails> {\n self.recurring_details.as_ref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_attempts", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_attempts(&self) -> Option> {\n todo!()\n }", + "after_code": "fn get_attempts(&self) -> Option> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_authorizations", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_authorizations(&self) -> Vec {\n self.authorizations.clone()\n }", + "after_code": "fn get_authorizations(&self) -> Vec {\n self.authorizations.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_setup_mandate", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_setup_mandate(&self) -> Option<&MandateData> {\n self.setup_mandate.as_ref()\n }", + "after_code": "fn get_setup_mandate(&self) -> Option<&MandateData> {\n self.setup_mandate.as_ref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_surcharge_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }", + "after_code": "fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Customers", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Customers {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/customers\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n route = route\n .service(\n web::resource(\"/{customer_id}/mandates\")\n .route(web::get().to(customers::get_customer_mandates)),\n )\n .service(web::resource(\"/list\").route(web::get().to(customers::customers_list)))\n .service(\n web::resource(\"/list_with_count\")\n .route(web::get().to(customers::customers_list_with_count)),\n )\n }\n\n #[cfg(feature = \"oltp\")]\n {\n route = route\n .service(web::resource(\"\").route(web::post().to(customers::customers_create)))\n .service(\n web::resource(\"/payment_methods\").route(\n web::get().to(payment_methods::list_customer_payment_method_api_client),\n ),\n )\n .service(\n web::resource(\"/{customer_id}/payment_methods\")\n .route(web::get().to(payment_methods::list_customer_payment_method_api)),\n )\n .service(\n web::resource(\"/{customer_id}/payment_methods/{payment_method_id}/default\")\n .route(web::post().to(payment_methods::default_payment_method_set_api)),\n )\n .service(\n web::resource(\"/{customer_id}\")\n .route(web::get().to(customers::customers_retrieve))\n .route(web::post().to(customers::customers_update))\n .route(web::delete().to(customers::customers_delete)),\n )\n }\n\n route\n }\n}", + "after_code": "impl Customers {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/customers\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n route = route\n .service(\n web::resource(\"/{customer_id}/mandates\")\n .route(web::get().to(customers::get_customer_mandates)),\n )\n .service(web::resource(\"/list\").route(web::get().to(customers::customers_list)))\n .service(\n web::resource(\"/list_with_count\")\n .route(web::get().to(customers::customers_list_with_count)),\n )\n }\n\n #[cfg(feature = \"oltp\")]\n {\n route = route\n .service(web::resource(\"\").route(web::post().to(customers::customers_create)))\n .service(\n web::resource(\"/payment_methods\").route(\n web::get().to(payment_methods::list_customer_payment_method_api_client),\n ),\n )\n .service(\n web::resource(\"/{customer_id}/payment_methods\")\n .route(web::get().to(payment_methods::list_customer_payment_method_api)),\n )\n .service(\n web::resource(\"/{customer_id}/payment_methods/{payment_method_id}/default\")\n .route(web::post().to(payment_methods::default_payment_method_set_api)),\n )\n .service(\n web::resource(\"/{customer_id}\")\n .route(web::get().to(customers::customers_retrieve))\n .route(web::post().to(customers::customers_update))\n .route(web::delete().to(customers::customers_delete)),\n )\n }\n\n route\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::payment_methods;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use super::payment_methods;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::payments_intent_core", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn payments_intent_core(\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n payment_id: id_type::GlobalPaymentId,\n header_payload: HeaderPayload,\n) -> RouterResponse\nwhere\n F: Send + Clone + Sync,\n Op: Operation + Send + Sync + Clone,\n Req: Debug + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n Res: transformers::ToResponse,\n{\n let (payment_data, _req, customer) = payments_intent_operation_core::<_, _, _, _>(\n &state,\n req_state,\n merchant_context.clone(),\n profile,\n operation.clone(),\n req,\n payment_id,\n header_payload.clone(),\n )\n .await?;\n\n Res::generate_response(\n payment_data,\n customer,\n &state.base_url,\n operation,\n &state.conf.connector_request_reference_id_config,\n None,\n None,\n header_payload.x_hs_latency,\n &merchant_context,\n )\n}", + "after_code": "pub async fn payments_intent_core(\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n payment_id: id_type::GlobalPaymentId,\n header_payload: HeaderPayload,\n) -> RouterResponse\nwhere\n F: Send + Clone + Sync,\n Op: Operation + Send + Sync + Clone,\n Req: Debug + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n Res: transformers::ToResponse,\n{\n let (payment_data, _req, customer) = payments_intent_operation_core::<_, _, _, _>(\n &state,\n req_state,\n merchant_context.clone(),\n profile,\n operation.clone(),\n req,\n payment_id,\n header_payload.clone(),\n )\n .await?;\n\n Res::generate_response(\n payment_data,\n customer,\n &state.base_url,\n operation,\n &state.conf.connector_request_reference_id_config,\n None,\n None,\n header_payload.x_hs_latency,\n &merchant_context,\n )\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::ApplePayWallet", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "struct ApplePayWallet;", + "after_code": "struct ApplePayWallet;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_setup_future_usage_in_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n todo!()\n }", + "after_code": "fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use std::future;", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_merchant_connector_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_merchant_connector_details(\n &self,\n ) -> Option {\n todo!()\n }", + "after_code": "fn get_merchant_connector_details(\n &self,\n ) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_currency", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_currency(&self) -> storage_enums::Currency {\n self.payment_intent.amount_details.currency\n }", + "after_code": "fn get_currency(&self) -> storage_enums::Currency {\n self.payment_intent.amount_details.currency\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::should_call_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn should_call_connector(operation: &Op, payment_data: &D) -> bool\nwhere\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n match format!(\"{operation:?}\").as_str() {\n \"PaymentConfirm\" => true,\n \"PaymentStart\" => {\n !matches!(\n payment_data.get_payment_intent().status,\n storage_enums::IntentStatus::Failed | storage_enums::IntentStatus::Succeeded\n ) && payment_data\n .get_payment_attempt()\n .authentication_data\n .is_none()\n }\n \"PaymentStatus\" => {\n payment_data.get_all_keys_required().unwrap_or(false)\n || matches!(\n payment_data.get_payment_intent().status,\n storage_enums::IntentStatus::Processing\n | storage_enums::IntentStatus::RequiresCustomerAction\n | storage_enums::IntentStatus::RequiresMerchantAction\n | storage_enums::IntentStatus::RequiresCapture\n | storage_enums::IntentStatus::PartiallyCapturedAndCapturable\n ) && payment_data.get_force_sync().unwrap_or(false)\n }\n \"PaymentCancel\" => matches!(\n payment_data.get_payment_intent().status,\n storage_enums::IntentStatus::RequiresCapture\n | storage_enums::IntentStatus::PartiallyCapturedAndCapturable\n ),\n \"PaymentCancelPostCapture\" => matches!(\n payment_data.get_payment_intent().status,\n storage_enums::IntentStatus::Succeeded\n | storage_enums::IntentStatus::PartiallyCaptured\n | storage_enums::IntentStatus::PartiallyCapturedAndCapturable\n ),\n \"PaymentCapture\" => {\n matches!(\n payment_data.get_payment_intent().status,\n storage_enums::IntentStatus::RequiresCapture\n | storage_enums::IntentStatus::PartiallyAuthorizedAndRequiresCapture\n | storage_enums::IntentStatus::PartiallyCapturedAndCapturable\n ) || (matches!(\n payment_data.get_payment_intent().status,\n storage_enums::IntentStatus::Processing\n ) && matches!(\n payment_data.get_capture_method(),\n Some(storage_enums::CaptureMethod::ManualMultiple)\n ))\n }\n \"CompleteAuthorize\" => true,\n \"PaymentApprove\" => true,\n \"PaymentReject\" => true,\n \"PaymentSession\" => true,\n \"PaymentSessionUpdate\" => true,\n \"PaymentPostSessionTokens\" => true,\n \"PaymentUpdateMetadata\" => true,\n \"PaymentExtendAuthorization\" => matches!(\n payment_data.get_payment_intent().status,\n storage_enums::IntentStatus::RequiresCapture\n | storage_enums::IntentStatus::PartiallyAuthorizedAndRequiresCapture\n ),\n \"PaymentIncrementalAuthorization\" => matches!(\n payment_data.get_payment_intent().status,\n storage_enums::IntentStatus::RequiresCapture\n ),\n _ => false,\n }\n}", + "after_code": "pub fn should_call_connector(operation: &Op, payment_data: &D) -> bool\nwhere\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n match format!(\"{operation:?}\").as_str() {\n \"PaymentConfirm\" => true,\n \"PaymentStart\" => {\n !matches!(\n payment_data.get_payment_intent().status,\n storage_enums::IntentStatus::Failed | storage_enums::IntentStatus::Succeeded\n ) && payment_data\n .get_payment_attempt()\n .authentication_data\n .is_none()\n }\n \"PaymentStatus\" => {\n payment_data.get_all_keys_required().unwrap_or(false)\n || matches!(\n payment_data.get_payment_intent().status,\n storage_enums::IntentStatus::Processing\n | storage_enums::IntentStatus::RequiresCustomerAction\n | storage_enums::IntentStatus::RequiresMerchantAction\n | storage_enums::IntentStatus::RequiresCapture\n | storage_enums::IntentStatus::PartiallyCapturedAndCapturable\n ) && payment_data.get_force_sync().unwrap_or(false)\n }\n \"PaymentCancel\" => matches!(\n payment_data.get_payment_intent().status,\n storage_enums::IntentStatus::RequiresCapture\n | storage_enums::IntentStatus::PartiallyCapturedAndCapturable\n ),\n \"PaymentCancelPostCapture\" => matches!(\n payment_data.get_payment_intent().status,\n storage_enums::IntentStatus::Succeeded\n | storage_enums::IntentStatus::PartiallyCaptured\n | storage_enums::IntentStatus::PartiallyCapturedAndCapturable\n ),\n \"PaymentCapture\" => {\n matches!(\n payment_data.get_payment_intent().status,\n storage_enums::IntentStatus::RequiresCapture\n | storage_enums::IntentStatus::PartiallyAuthorizedAndRequiresCapture\n | storage_enums::IntentStatus::PartiallyCapturedAndCapturable\n ) || (matches!(\n payment_data.get_payment_intent().status,\n storage_enums::IntentStatus::Processing\n ) && matches!(\n payment_data.get_capture_method(),\n Some(storage_enums::CaptureMethod::ManualMultiple)\n ))\n }\n \"CompleteAuthorize\" => true,\n \"PaymentApprove\" => true,\n \"PaymentReject\" => true,\n \"PaymentSession\" => true,\n \"PaymentSessionUpdate\" => true,\n \"PaymentPostSessionTokens\" => true,\n \"PaymentUpdateMetadata\" => true,\n \"PaymentExtendAuthorization\" => matches!(\n payment_data.get_payment_intent().status,\n storage_enums::IntentStatus::RequiresCapture\n | storage_enums::IntentStatus::PartiallyAuthorizedAndRequiresCapture\n ),\n \"PaymentIncrementalAuthorization\" => matches!(\n payment_data.get_payment_intent().status,\n storage_enums::IntentStatus::RequiresCapture\n ),\n _ => false,\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::PaymentRedirectCompleteAuthorize", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PaymentRedirectCompleteAuthorize;", + "after_code": "pub struct PaymentRedirectCompleteAuthorize;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_client_secret", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_client_secret(&self) -> &Option> {\n todo!()\n }", + "after_code": "fn get_client_secret(&self) -> &Option> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_attempt(&self) -> &storage::PaymentAttempt {\n &self.payment_attempt\n }", + "after_code": "fn get_payment_attempt(&self) -> &storage::PaymentAttempt {\n &self.payment_attempt\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Chat::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/chat\").app_data(web::Data::new(state.clone()));\n if state.conf.chat.get_inner().enabled {\n route = route.service(\n web::scope(\"/ai\")\n .service(\n web::resource(\"/data\")\n .route(web::post().to(chat::get_data_from_hyperswitch_ai_workflow)),\n )\n .service(\n web::resource(\"/list\").route(web::get().to(chat::get_all_conversations)),\n ),\n );\n }\n route\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/chat\").app_data(web::Data::new(state.clone()));\n if state.conf.chat.get_inner().enabled {\n route = route.service(\n web::scope(\"/ai\")\n .service(\n web::resource(\"/data\")\n .route(web::post().to(chat::get_data_from_hyperswitch_ai_workflow)),\n )\n .service(\n web::resource(\"/list\").route(web::get().to(chat::get_all_conversations)),\n ),\n );\n }\n route\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::MerchantAccount", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct MerchantAccount;", + "after_code": "pub struct MerchantAccount;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_pm_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_pm_token(&mut self, _token: String) {\n todo!()\n }", + "after_code": "fn set_pm_token(&mut self, _token: String) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::PaymentIntentData", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl OperationSessionSetters for PaymentIntentData {\n fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(straight_through_algorithm);\n }\n // Setters Implementation\n fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }\n fn set_client_secret(&mut self, client_secret: Option>) {\n self.client_secret = client_secret;\n }\n fn set_payment_attempt(&mut self, _payment_attempt: storage::PaymentAttempt) {\n todo!()\n }\n\n fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }\n\n fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }\n\n fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }\n\n fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n todo!()\n }\n\n fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }\n\n fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }\n\n fn set_pm_token(&mut self, _token: String) {\n todo!()\n }\n\n fn set_connector_customer_id(&mut self, customer_id: Option) {\n self.connector_customer_id = customer_id;\n }\n\n fn push_sessions_token(&mut self, token: api::SessionToken) {\n self.sessions_token.push(token);\n }\n\n fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }\n\n fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n todo!()\n }\n\n fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }\n\n fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }\n\n fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }\n\n fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }\n\n fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }\n\n fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }\n\n fn set_connector_in_payment_attempt(&mut self, _connector: Option) {\n todo!()\n }\n\n fn set_connector_request_reference_id(&mut self, reference_id: Option) {\n todo!()\n }\n\n fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n todo!()\n }\n\n fn set_vault_session_details(\n &mut self,\n vault_session_details: Option,\n ) {\n self.vault_session_details = vault_session_details;\n }\n\n fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n todo!()\n }\n\n fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n todo!()\n }\n\n fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n todo!()\n }\n}", + "after_code": "impl OperationSessionSetters for PaymentIntentData {\n fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(straight_through_algorithm);\n }\n // Setters Implementation\n fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }\n fn set_client_secret(&mut self, client_secret: Option>) {\n self.client_secret = client_secret;\n }\n fn set_payment_attempt(&mut self, _payment_attempt: storage::PaymentAttempt) {\n todo!()\n }\n\n fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }\n\n fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }\n\n fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }\n\n fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n todo!()\n }\n\n fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }\n\n fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }\n\n fn set_pm_token(&mut self, _token: String) {\n todo!()\n }\n\n fn set_connector_customer_id(&mut self, customer_id: Option) {\n self.connector_customer_id = customer_id;\n }\n\n fn push_sessions_token(&mut self, token: api::SessionToken) {\n self.sessions_token.push(token);\n }\n\n fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }\n\n fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n todo!()\n }\n\n fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }\n\n fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }\n\n fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }\n\n fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }\n\n fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }\n\n fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }\n\n fn set_connector_in_payment_attempt(&mut self, _connector: Option) {\n todo!()\n }\n\n fn set_connector_request_reference_id(&mut self, reference_id: Option) {\n todo!()\n }\n\n fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n todo!()\n }\n\n fn set_vault_session_details(\n &mut self,\n vault_session_details: Option,\n ) {\n self.vault_session_details = vault_session_details;\n }\n\n fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n todo!()\n }\n\n fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n todo!()\n }\n\n fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n todo!()\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ], + "after_imports": [ + "use std::future;", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::complete_confirmation_for_click_to_pay_if_required", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn complete_confirmation_for_click_to_pay_if_required(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n payment_data: &D,\n) -> RouterResult<()>\nwhere\n F: Send + Clone + Sync,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let payment_attempt = payment_data.get_payment_attempt();\n let payment_intent = payment_data.get_payment_intent();\n let service_details = payment_data.get_click_to_pay_service_details();\n let authentication = payment_data.get_authentication();\n\n let should_do_uas_confirmation_call = service_details\n .as_ref()\n .map(|details| details.is_network_confirmation_call_required())\n .unwrap_or(false);\n if should_do_uas_confirmation_call\n && (payment_intent.status == storage_enums::IntentStatus::Succeeded\n || payment_intent.status == storage_enums::IntentStatus::Failed)\n {\n let authentication_connector_id = authentication\n .as_ref()\n .and_then(|auth| auth.authentication.merchant_connector_id.clone())\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\n \"Failed to get authentication connector id from authentication table\",\n )?;\n let key_manager_state = &(state).into();\n let key_store = merchant_context.get_merchant_key_store();\n let merchant_id = merchant_context.get_merchant_account().get_id();\n\n let connector_mca = state\n .store\n .find_by_merchant_connector_account_merchant_id_merchant_connector_id(\n key_manager_state,\n merchant_id,\n &authentication_connector_id,\n key_store,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::MerchantConnectorAccountNotFound {\n id: authentication_connector_id.get_string_repr().to_string(),\n })?;\n\n let payment_method = payment_attempt\n .payment_method\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get payment method from payment attempt\")?;\n\n ClickToPay::confirmation(\n state,\n payment_attempt.authentication_id.as_ref(),\n payment_intent.currency,\n payment_attempt.status,\n service_details.cloned(),\n &helpers::MerchantConnectorAccountType::DbVal(Box::new(connector_mca.clone())),\n &connector_mca.connector_name,\n payment_method,\n payment_attempt.net_amount.get_order_amount(),\n Some(&payment_intent.payment_id),\n merchant_id,\n )\n .await?;\n Ok(())\n } else {\n Ok(())\n }\n}", + "after_code": "async fn complete_confirmation_for_click_to_pay_if_required(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n payment_data: &D,\n) -> RouterResult<()>\nwhere\n F: Send + Clone + Sync,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let payment_attempt = payment_data.get_payment_attempt();\n let payment_intent = payment_data.get_payment_intent();\n let service_details = payment_data.get_click_to_pay_service_details();\n let authentication = payment_data.get_authentication();\n\n let should_do_uas_confirmation_call = service_details\n .as_ref()\n .map(|details| details.is_network_confirmation_call_required())\n .unwrap_or(false);\n if should_do_uas_confirmation_call\n && (payment_intent.status == storage_enums::IntentStatus::Succeeded\n || payment_intent.status == storage_enums::IntentStatus::Failed)\n {\n let authentication_connector_id = authentication\n .as_ref()\n .and_then(|auth| auth.authentication.merchant_connector_id.clone())\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\n \"Failed to get authentication connector id from authentication table\",\n )?;\n let key_manager_state = &(state).into();\n let key_store = merchant_context.get_merchant_key_store();\n let merchant_id = merchant_context.get_merchant_account().get_id();\n\n let connector_mca = state\n .store\n .find_by_merchant_connector_account_merchant_id_merchant_connector_id(\n key_manager_state,\n merchant_id,\n &authentication_connector_id,\n key_store,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::MerchantConnectorAccountNotFound {\n id: authentication_connector_id.get_string_repr().to_string(),\n })?;\n\n let payment_method = payment_attempt\n .payment_method\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get payment method from payment attempt\")?;\n\n ClickToPay::confirmation(\n state,\n payment_attempt.authentication_id.as_ref(),\n payment_intent.currency,\n payment_attempt.status,\n service_details.cloned(),\n &helpers::MerchantConnectorAccountType::DbVal(Box::new(connector_mca.clone())),\n &connector_mca.connector_name,\n payment_method,\n payment_attempt.net_amount.get_order_amount(),\n Some(&payment_intent.payment_id),\n merchant_id,\n )\n .await?;\n Ok(())\n } else {\n Ok(())\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Webhooks", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Webhooks;", + "after_code": "pub struct Webhooks;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Profile", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Profile {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/account/{account_id}/business_profile\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\")\n .route(web::post().to(profiles::profile_create))\n .route(web::get().to(profiles::profiles_list)),\n );\n\n #[cfg(feature = \"dynamic_routing\")]\n {\n route = route.service(\n web::scope(\"/{profile_id}/dynamic_routing\")\n .service(\n web::scope(\"/success_based\")\n .service(\n web::resource(\"/toggle\")\n .route(web::post().to(routing::toggle_success_based_routing)),\n )\n .service(\n web::resource(\"/create\")\n .route(web::post().to(routing::create_success_based_routing)),\n )\n .service(web::resource(\"/config/{algorithm_id}\").route(\n web::patch().to(|state, req, path, payload| {\n routing::success_based_routing_update_configs(\n state, req, path, payload,\n )\n }),\n )),\n )\n .service(\n web::resource(\"/set_volume_split\")\n .route(web::post().to(routing::set_dynamic_routing_volume_split)),\n )\n .service(\n web::resource(\"/get_volume_split\")\n .route(web::get().to(routing::get_dynamic_routing_volume_split)),\n )\n .service(\n web::scope(\"/elimination\")\n .service(\n web::resource(\"/toggle\")\n .route(web::post().to(routing::toggle_elimination_routing)),\n )\n .service(\n web::resource(\"/create\")\n .route(web::post().to(routing::create_elimination_routing)),\n )\n .service(web::resource(\"config/{algorithm_id}\").route(\n web::patch().to(|state, req, path, payload| {\n routing::elimination_routing_update_configs(\n state, req, path, payload,\n )\n }),\n )),\n )\n .service(\n web::scope(\"/contracts\")\n .service(web::resource(\"/toggle\").route(\n web::post().to(routing::contract_based_routing_setup_config),\n ))\n .service(web::resource(\"/config/{algorithm_id}\").route(\n web::patch().to(|state, req, path, payload| {\n routing::contract_based_routing_update_configs(\n state, req, path, payload,\n )\n }),\n )),\n ),\n );\n }\n\n route = route.service(\n web::scope(\"/{profile_id}\")\n .service(\n web::resource(\"\")\n .route(web::get().to(profiles::profile_retrieve))\n .route(web::post().to(profiles::profile_update))\n .route(web::delete().to(profiles::profile_delete)),\n )\n .service(\n web::resource(\"/toggle_extended_card_info\")\n .route(web::post().to(profiles::toggle_extended_card_info)),\n )\n .service(\n web::resource(\"/toggle_connector_agnostic_mit\")\n .route(web::post().to(profiles::toggle_connector_agnostic_mit)),\n ),\n );\n\n route\n }\n}", + "after_code": "impl Profile {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/account/{account_id}/business_profile\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\")\n .route(web::post().to(profiles::profile_create))\n .route(web::get().to(profiles::profiles_list)),\n );\n\n #[cfg(feature = \"dynamic_routing\")]\n {\n route = route.service(\n web::scope(\"/{profile_id}/dynamic_routing\")\n .service(\n web::scope(\"/success_based\")\n .service(\n web::resource(\"/toggle\")\n .route(web::post().to(routing::toggle_success_based_routing)),\n )\n .service(\n web::resource(\"/create\")\n .route(web::post().to(routing::create_success_based_routing)),\n )\n .service(web::resource(\"/config/{algorithm_id}\").route(\n web::patch().to(|state, req, path, payload| {\n routing::success_based_routing_update_configs(\n state, req, path, payload,\n )\n }),\n )),\n )\n .service(\n web::resource(\"/set_volume_split\")\n .route(web::post().to(routing::set_dynamic_routing_volume_split)),\n )\n .service(\n web::resource(\"/get_volume_split\")\n .route(web::get().to(routing::get_dynamic_routing_volume_split)),\n )\n .service(\n web::scope(\"/elimination\")\n .service(\n web::resource(\"/toggle\")\n .route(web::post().to(routing::toggle_elimination_routing)),\n )\n .service(\n web::resource(\"/create\")\n .route(web::post().to(routing::create_elimination_routing)),\n )\n .service(web::resource(\"config/{algorithm_id}\").route(\n web::patch().to(|state, req, path, payload| {\n routing::elimination_routing_update_configs(\n state, req, path, payload,\n )\n }),\n )),\n )\n .service(\n web::scope(\"/contracts\")\n .service(web::resource(\"/toggle\").route(\n web::post().to(routing::contract_based_routing_setup_config),\n ))\n .service(web::resource(\"/config/{algorithm_id}\").route(\n web::patch().to(|state, req, path, payload| {\n routing::contract_based_routing_update_configs(\n state, req, path, payload,\n )\n }),\n )),\n ),\n );\n }\n\n route = route.service(\n web::scope(\"/{profile_id}\")\n .service(\n web::resource(\"\")\n .route(web::get().to(profiles::profile_retrieve))\n .route(web::post().to(profiles::profile_update))\n .route(web::delete().to(profiles::profile_delete)),\n )\n .service(\n web::resource(\"/toggle_extended_card_info\")\n .route(web::post().to(profiles::toggle_extended_card_info)),\n )\n .service(\n web::resource(\"/toggle_connector_agnostic_mit\")\n .route(web::post().to(profiles::toggle_connector_agnostic_mit)),\n ),\n );\n\n route\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::routing;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use super::routing;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Tokenization", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Tokenization {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/tokenize\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\")\n .route(web::post().to(tokenization_routes::create_token_vault_api)),\n )\n .service(\n web::resource(\"/{id}\")\n .route(web::delete().to(tokenization_routes::delete_tokenized_data_api)),\n )\n }\n}", + "after_code": "impl Tokenization {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/tokenize\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\")\n .route(web::post().to(tokenization_routes::create_token_vault_api)),\n )\n .service(\n web::resource(\"/{id}\")\n .route(web::delete().to(tokenization_routes::delete_tokenized_data_api)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::Multitenancy::function::get_tenant_ids", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn get_tenant_ids(&self) -> Vec {\n self.tenants\n .0\n .values()\n .map(|tenant| tenant.tenant_id.clone())\n .collect()\n }", + "after_code": "pub fn get_tenant_ids(&self) -> Vec {\n self.tenants\n .0\n .values()\n .map(|tenant| tenant.tenant_id.clone())\n .collect()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::ApiKeys", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl ApiKeys {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/api_keys/{merchant_id}\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(api_keys::api_key_create)))\n .service(web::resource(\"/list\").route(web::get().to(api_keys::api_key_list)))\n .service(\n web::resource(\"/{key_id}\")\n .route(web::get().to(api_keys::api_key_retrieve))\n .route(web::post().to(api_keys::api_key_update))\n .route(web::delete().to(api_keys::api_key_revoke)),\n )\n }\n}", + "after_code": "impl ApiKeys {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/api_keys/{merchant_id}\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(api_keys::api_key_create)))\n .service(web::resource(\"/list\").route(web::get().to(api_keys::api_key_list)))\n .service(\n web::resource(\"/{key_id}\")\n .route(web::get().to(api_keys::api_key_retrieve))\n .route(web::post().to(api_keys::api_key_update))\n .route(web::delete().to(api_keys::api_key_revoke)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::hashset_deserialization_test::function::test_payment_method_hashset_deserializer", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn test_payment_method_hashset_deserializer() {\n use diesel_models::enums::PaymentMethod;\n\n let deserializer: StrDeserializer<'_, ValueError> = \"wallet,card\".into_deserializer();\n let payment_methods = deserialize_hashset::<'_, _, PaymentMethod>(deserializer);\n let expected_payment_methods = HashSet::from([PaymentMethod::Wallet, PaymentMethod::Card]);\n\n assert!(payment_methods.is_ok());\n assert_eq!(payment_methods.unwrap(), expected_payment_methods);\n }", + "after_code": "fn test_payment_method_hashset_deserializer() {\n use diesel_models::enums::PaymentMethod;\n\n let deserializer: StrDeserializer<'_, ValueError> = \"wallet,card\".into_deserializer();\n let payment_methods = deserialize_hashset::<'_, _, PaymentMethod>(deserializer);\n let expected_payment_methods = HashSet::from([PaymentMethod::Wallet, PaymentMethod::Card]);\n\n assert!(payment_methods.is_ok());\n assert_eq!(payment_methods.unwrap(), expected_payment_methods);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::PaymentMethod;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use super::deserialize_hashset;", + "use serde::de::Error;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "use serde::Deserialize;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use super::deserialize_hashset;", + "use serde::de::Error;", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::PazeWallet", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl WalletFlow for PazeWallet\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n fn decide_wallet_flow(\n &self,\n state: &SessionState,\n _payment_data: &D,\n _merchant_connector_account: &helpers::MerchantConnectorAccountType,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let paze_keys = state\n .conf\n .paze_decrypt_keys\n .as_ref()\n .get_required_value(\"Paze decrypt keys\")\n .attach_printable(\"Paze decrypt keys not found in the configuration\")?;\n\n let wallet_flow = DecideWalletFlow::PazeDecrypt(PazePaymentProcessingDetails {\n paze_private_key: paze_keys.get_inner().paze_private_key.clone(),\n paze_private_key_passphrase: paze_keys.get_inner().paze_private_key_passphrase.clone(),\n });\n Ok(Some(wallet_flow))\n }\n\n async fn decrypt_wallet_token(\n &self,\n wallet_flow: &DecideWalletFlow,\n payment_data: &D,\n ) -> CustomResult {\n let paze_payment_processing_details = wallet_flow\n .get_paze_payment_processing_details()\n .get_required_value(\"Paze payment processing details\")\n .attach_printable(\n \"Paze payment processing details not found in Paze decryption flow\",\n )?;\n\n let paze_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_paze_wallet_data())\n .get_required_value(\"Paze wallet token\").attach_printable(\n \"Paze wallet data not found in the payment method data during the Paze decryption flow\",\n )?;\n\n let paze_data = decrypt_paze_token(\n paze_wallet_data.clone(),\n paze_payment_processing_details.paze_private_key.clone(),\n paze_payment_processing_details\n .paze_private_key_passphrase\n .clone(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to decrypt paze token\")?;\n\n let paze_decrypted_data = paze_data\n .parse_value::(\n \"PazeDecryptedData\",\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to parse PazeDecryptedData\")?;\n Ok(PaymentMethodToken::PazeDecrypt(Box::new(\n paze_decrypted_data,\n )))\n }\n}", + "after_code": "impl WalletFlow for PazeWallet\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n fn decide_wallet_flow(\n &self,\n state: &SessionState,\n _payment_data: &D,\n _merchant_connector_account: &helpers::MerchantConnectorAccountType,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let paze_keys = state\n .conf\n .paze_decrypt_keys\n .as_ref()\n .get_required_value(\"Paze decrypt keys\")\n .attach_printable(\"Paze decrypt keys not found in the configuration\")?;\n\n let wallet_flow = DecideWalletFlow::PazeDecrypt(PazePaymentProcessingDetails {\n paze_private_key: paze_keys.get_inner().paze_private_key.clone(),\n paze_private_key_passphrase: paze_keys.get_inner().paze_private_key_passphrase.clone(),\n });\n Ok(Some(wallet_flow))\n }\n\n async fn decrypt_wallet_token(\n &self,\n wallet_flow: &DecideWalletFlow,\n payment_data: &D,\n ) -> CustomResult {\n let paze_payment_processing_details = wallet_flow\n .get_paze_payment_processing_details()\n .get_required_value(\"Paze payment processing details\")\n .attach_printable(\n \"Paze payment processing details not found in Paze decryption flow\",\n )?;\n\n let paze_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_paze_wallet_data())\n .get_required_value(\"Paze wallet token\").attach_printable(\n \"Paze wallet data not found in the payment method data during the Paze decryption flow\",\n )?;\n\n let paze_data = decrypt_paze_token(\n paze_wallet_data.clone(),\n paze_payment_processing_details.paze_private_key.clone(),\n paze_payment_processing_details\n .paze_private_key_passphrase\n .clone(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to decrypt paze token\")?;\n\n let paze_decrypted_data = paze_data\n .parse_value::(\n \"PazeDecryptedData\",\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to parse PazeDecryptedData\")?;\n Ok(PaymentMethodToken::PazeDecrypt(Box::new(\n paze_decrypted_data,\n )))\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use helpers::{decrypt_paze_token, ApplePayData};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use helpers::{decrypt_paze_token, ApplePayData};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_intent(&self) -> &storage::PaymentIntent {\n &self.payment_intent\n }", + "after_code": "fn get_payment_intent(&self) -> &storage::PaymentIntent {\n &self.payment_intent\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::should_update_in_post_update_tracker", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn should_update_in_post_update_tracker(&self) -> bool {\n let payment_method_type = self\n .payment_intent\n .tax_details\n .as_ref()\n .and_then(|tax_details| tax_details.payment_method_type.as_ref().map(|pmt| pmt.pmt));\n\n matches!(\n payment_method_type,\n Some(storage_enums::PaymentMethodType::Paypal)\n )\n }", + "after_code": "fn should_update_in_post_update_tracker(&self) -> bool {\n let payment_method_type = self\n .payment_intent\n .tax_details\n .as_ref()\n .and_then(|tax_details| tax_details.payment_method_type.as_ref().map(|pmt| pmt.pmt));\n\n matches!(\n payment_method_type,\n Some(storage_enums::PaymentMethodType::Paypal)\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_merchant_connector_account_for_wallet_decryption_flow", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn get_merchant_connector_account_for_wallet_decryption_flow(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n payment_data: &mut D,\n connector_call_type_optional: Option<&ConnectorCallType>,\n) -> RouterResult\nwhere\n F: Send + Clone + Sync,\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n let connector_call_type = connector_call_type_optional\n .get_required_value(\"connector_call_type\")\n .change_context(errors::ApiErrorResponse::InternalServerError)?;\n let connector_routing_data = match connector_call_type {\n ConnectorCallType::PreDetermined(connector_routing_data) => connector_routing_data,\n ConnectorCallType::Retryable(connector_routing_data) => connector_routing_data\n .first()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Found no connector routing data in retryable call\")?,\n ConnectorCallType::SessionMultiple(_session_connector_data) => {\n return Err(errors::ApiErrorResponse::InternalServerError).attach_printable(\n \"SessionMultiple connector call type is invalid in confirm calls\",\n );\n }\n };\n\n construct_profile_id_and_get_mca(\n state,\n merchant_context,\n payment_data,\n &connector_routing_data\n .connector_data\n .connector_name\n .to_string(),\n connector_routing_data\n .connector_data\n .merchant_connector_id\n .as_ref(),\n false,\n )\n .await\n}", + "after_code": "pub async fn get_merchant_connector_account_for_wallet_decryption_flow(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n payment_data: &mut D,\n connector_call_type_optional: Option<&ConnectorCallType>,\n) -> RouterResult\nwhere\n F: Send + Clone + Sync,\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n let connector_call_type = connector_call_type_optional\n .get_required_value(\"connector_call_type\")\n .change_context(errors::ApiErrorResponse::InternalServerError)?;\n let connector_routing_data = match connector_call_type {\n ConnectorCallType::PreDetermined(connector_routing_data) => connector_routing_data,\n ConnectorCallType::Retryable(connector_routing_data) => connector_routing_data\n .first()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Found no connector routing data in retryable call\")?,\n ConnectorCallType::SessionMultiple(_session_connector_data) => {\n return Err(errors::ApiErrorResponse::InternalServerError).attach_printable(\n \"SessionMultiple connector call type is invalid in confirm calls\",\n );\n }\n };\n\n construct_profile_id_and_get_mca(\n state,\n merchant_context,\n payment_data,\n &connector_routing_data\n .connector_data\n .connector_name\n .to_string(),\n connector_routing_data\n .connector_data\n .merchant_connector_id\n .as_ref(),\n false,\n )\n .await\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_multiple_capture_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData> {\n todo!()\n }", + "after_code": "fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Blocklist", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Blocklist;", + "after_code": "pub struct Blocklist;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Recon", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Recon;", + "after_code": "pub struct Recon;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/psync_flow.rs::types::RouterData::function::call_unified_connector_service", + "file": "crates/router/src/core/payments/flows/psync_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn call_unified_connector_service<'a>(\n &mut self,\n state: &SessionState,\n header_payload: &domain_payments::HeaderPayload,\n lineage_ids: grpc_client::LineageIds,\n #[cfg(feature = \"v1\")] merchant_connector_account: helpers::MerchantConnectorAccountType,\n #[cfg(feature = \"v2\")]\n merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n merchant_context: &domain::MerchantContext,\n _connector_data: &api::ConnectorData,\n unified_connector_service_execution_mode: enums::ExecutionMode,\n merchant_order_reference_id: Option,\n call_connector_action: common_enums::CallConnectorAction,\n creds_identifier: Option,\n ) -> RouterResult<()> {\n match call_connector_action {\n common_enums::CallConnectorAction::UCSConsumeResponse(transform_data_bytes) => {\n let webhook_content: payments_grpc::WebhookResponseContent =\n serde_json::from_slice(&transform_data_bytes)\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to deserialize UCS webhook transform data\")?;\n\n let payment_get_response =\n get_payments_response_from_ucs_webhook_content(webhook_content)\n .change_context(ApiErrorResponse::WebhookProcessingFailure)\n .attach_printable(\n \"Failed to construct payments response from UCS webhook content\",\n )?;\n\n let (router_data_response, status_code) =\n handle_unified_connector_service_response_for_payment_get(\n payment_get_response.clone(),\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to deserialize UCS response\")?;\n\n let router_data_response = router_data_response.map(|(response, status)| {\n self.status = status;\n response\n });\n self.response = router_data_response;\n self.amount_captured = payment_get_response.captured_amount;\n self.minor_amount_captured = payment_get_response\n .minor_captured_amount\n .map(MinorUnit::new);\n self.raw_connector_response = payment_get_response\n .raw_connector_response\n .clone()\n .map(|raw_connector_response| raw_connector_response.expose().into());\n self.connector_http_status_code = Some(status_code);\n }\n common_enums::CallConnectorAction::UCSHandleResponse(_)\n | common_enums::CallConnectorAction::Trigger => {\n let connector_name = self.connector.clone();\n let connector_enum =\n common_enums::connector_enums::Connector::from_str(&connector_name)\n .change_context(ApiErrorResponse::IncorrectConnectorNameGiven)?;\n\n let is_ucs_psync_disabled = state\n .conf\n .grpc_client\n .unified_connector_service\n .as_ref()\n .is_some_and(|config| {\n config\n .ucs_psync_disabled_connectors\n .contains(&connector_enum)\n });\n\n if is_ucs_psync_disabled {\n logger::info!(\n \"UCS PSync call disabled for connector: {}, skipping UCS call\",\n connector_name\n );\n return Ok(());\n }\n let client = state\n .grpc_client\n .unified_connector_service_client\n .clone()\n .ok_or(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to fetch Unified Connector Service client\")?;\n\n let payment_get_request =\n payments_grpc::PaymentServiceGetRequest::foreign_try_from((\n &*self,\n call_connector_action,\n ))\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct Payment Get Request\")?;\n\n let merchant_connector_id = merchant_connector_account.get_mca_id();\n\n let connector_auth_metadata = build_unified_connector_service_auth_metadata(\n merchant_connector_account,\n merchant_context,\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct request metadata\")?;\n let merchant_reference_id = header_payload\n .x_reference_id\n .clone()\n .or(merchant_order_reference_id)\n .map(|id| id_type::PaymentReferenceId::from_str(id.as_str()))\n .transpose()\n .inspect_err(\n |err| logger::warn!(error=?err, \"Invalid Merchant ReferenceId found\"),\n )\n .ok()\n .flatten()\n .map(ucs_types::UcsReferenceId::Payment);\n let header_payload = state\n .get_grpc_headers_ucs(unified_connector_service_execution_mode)\n .external_vault_proxy_metadata(None)\n .merchant_reference_id(merchant_reference_id)\n .lineage_ids(lineage_ids);\n let connector_name = self.connector.clone();\n let updated_router_data = Box::pin(ucs_logging_wrapper(\n self.clone(),\n state,\n payment_get_request,\n header_payload,\n |mut router_data, payment_get_request, grpc_headers| async move {\n let response = client\n .payment_get(payment_get_request, connector_auth_metadata, grpc_headers)\n .await\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get payment\")?;\n\n let payment_get_response = response.into_inner();\n\n let (router_data_response, status_code) =\n handle_unified_connector_service_response_for_payment_get(\n payment_get_response.clone(),\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to deserialize UCS response\")?;\n\n // Extract and store access token if present\n if let Some(access_token) = get_access_token_from_ucs_response(\n state,\n merchant_context,\n &connector_name,\n merchant_connector_id.as_ref(),\n creds_identifier.clone(),\n payment_get_response.state.as_ref(),\n )\n .await\n {\n if let Err(error) = set_access_token_for_ucs(\n state,\n merchant_context,\n &connector_name,\n access_token,\n merchant_connector_id.as_ref(),\n creds_identifier,\n )\n .await\n {\n logger::error!(\n ?error,\n \"Failed to store UCS access token from psync response\"\n );\n } else {\n logger::debug!(\n \"Successfully stored access token from UCS psync response\"\n );\n }\n }\n\n let router_data_response =\n router_data_response.map(|(response, status)| {\n router_data.status = status;\n response\n });\n router_data.response = router_data_response;\n router_data.amount_captured = payment_get_response.captured_amount;\n router_data.minor_amount_captured = payment_get_response\n .minor_captured_amount\n .map(MinorUnit::new);\n router_data.raw_connector_response = payment_get_response\n .raw_connector_response\n .clone()\n .map(|raw_connector_response| raw_connector_response.expose().into());\n router_data.connector_http_status_code = Some(status_code);\n\n Ok((router_data, payment_get_response))\n },\n ))\n .await?;\n\n // Copy back the updated data\n *self = updated_router_data;\n }\n common_enums::CallConnectorAction::HandleResponse(_)\n | common_enums::CallConnectorAction::Avoid\n | common_enums::CallConnectorAction::StatusUpdate { .. } => {\n Err(ApiErrorResponse::InternalServerError).attach_printable(\n \"Invalid CallConnectorAction for payment sync via UCS Gateway system\",\n )?\n }\n }\n Ok(())\n }", + "after_code": "async fn call_unified_connector_service<'a>(\n &mut self,\n state: &SessionState,\n header_payload: &domain_payments::HeaderPayload,\n lineage_ids: grpc_client::LineageIds,\n #[cfg(feature = \"v1\")] merchant_connector_account: helpers::MerchantConnectorAccountType,\n #[cfg(feature = \"v2\")]\n merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n merchant_context: &domain::MerchantContext,\n _connector_data: &api::ConnectorData,\n unified_connector_service_execution_mode: enums::ExecutionMode,\n merchant_order_reference_id: Option,\n call_connector_action: common_enums::CallConnectorAction,\n creds_identifier: Option,\n ) -> RouterResult<()> {\n match call_connector_action {\n common_enums::CallConnectorAction::UCSConsumeResponse(transform_data_bytes) => {\n let webhook_content: payments_grpc::WebhookResponseContent =\n serde_json::from_slice(&transform_data_bytes)\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to deserialize UCS webhook transform data\")?;\n\n let payment_get_response =\n get_payments_response_from_ucs_webhook_content(webhook_content)\n .change_context(ApiErrorResponse::WebhookProcessingFailure)\n .attach_printable(\n \"Failed to construct payments response from UCS webhook content\",\n )?;\n\n let (router_data_response, status_code) =\n handle_unified_connector_service_response_for_payment_get(\n payment_get_response.clone(),\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to deserialize UCS response\")?;\n\n let router_data_response = router_data_response.map(|(response, status)| {\n self.status = status;\n response\n });\n self.response = router_data_response;\n self.amount_captured = payment_get_response.captured_amount;\n self.minor_amount_captured = payment_get_response\n .minor_captured_amount\n .map(MinorUnit::new);\n self.raw_connector_response = payment_get_response\n .raw_connector_response\n .clone()\n .map(|raw_connector_response| raw_connector_response.expose().into());\n self.connector_http_status_code = Some(status_code);\n }\n common_enums::CallConnectorAction::UCSHandleResponse(_)\n | common_enums::CallConnectorAction::Trigger => {\n let connector_name = self.connector.clone();\n let connector_enum =\n common_enums::connector_enums::Connector::from_str(&connector_name)\n .change_context(ApiErrorResponse::IncorrectConnectorNameGiven)?;\n\n let is_ucs_psync_disabled = state\n .conf\n .grpc_client\n .unified_connector_service\n .as_ref()\n .is_some_and(|config| {\n config\n .ucs_psync_disabled_connectors\n .contains(&connector_enum)\n });\n\n if is_ucs_psync_disabled {\n logger::info!(\n \"UCS PSync call disabled for connector: {}, skipping UCS call\",\n connector_name\n );\n return Ok(());\n }\n let client = state\n .grpc_client\n .unified_connector_service_client\n .clone()\n .ok_or(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to fetch Unified Connector Service client\")?;\n\n let payment_get_request =\n payments_grpc::PaymentServiceGetRequest::foreign_try_from((\n &*self,\n call_connector_action,\n ))\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct Payment Get Request\")?;\n\n let merchant_connector_id = merchant_connector_account.get_mca_id();\n\n let connector_auth_metadata = build_unified_connector_service_auth_metadata(\n merchant_connector_account,\n merchant_context,\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct request metadata\")?;\n let merchant_reference_id = header_payload\n .x_reference_id\n .clone()\n .or(merchant_order_reference_id)\n .map(|id| id_type::PaymentReferenceId::from_str(id.as_str()))\n .transpose()\n .inspect_err(\n |err| logger::warn!(error=?err, \"Invalid Merchant ReferenceId found\"),\n )\n .ok()\n .flatten()\n .map(ucs_types::UcsReferenceId::Payment);\n let header_payload = state\n .get_grpc_headers_ucs(unified_connector_service_execution_mode)\n .external_vault_proxy_metadata(None)\n .merchant_reference_id(merchant_reference_id)\n .lineage_ids(lineage_ids);\n let connector_name = self.connector.clone();\n let updated_router_data = Box::pin(ucs_logging_wrapper(\n self.clone(),\n state,\n payment_get_request,\n header_payload,\n |mut router_data, payment_get_request, grpc_headers| async move {\n let response = client\n .payment_get(payment_get_request, connector_auth_metadata, grpc_headers)\n .await\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get payment\")?;\n\n let payment_get_response = response.into_inner();\n\n let (router_data_response, status_code) =\n handle_unified_connector_service_response_for_payment_get(\n payment_get_response.clone(),\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to deserialize UCS response\")?;\n\n // Extract and store access token if present\n if let Some(access_token) = get_access_token_from_ucs_response(\n state,\n merchant_context,\n &connector_name,\n merchant_connector_id.as_ref(),\n creds_identifier.clone(),\n payment_get_response.state.as_ref(),\n )\n .await\n {\n if let Err(error) = set_access_token_for_ucs(\n state,\n merchant_context,\n &connector_name,\n access_token,\n merchant_connector_id.as_ref(),\n creds_identifier,\n )\n .await\n {\n logger::error!(\n ?error,\n \"Failed to store UCS access token from psync response\"\n );\n } else {\n logger::debug!(\n \"Successfully stored access token from UCS psync response\"\n );\n }\n }\n\n let router_data_response =\n router_data_response.map(|(response, status)| {\n router_data.status = status;\n response\n });\n router_data.response = router_data_response;\n router_data.amount_captured = payment_get_response.captured_amount;\n router_data.minor_amount_captured = payment_get_response\n .minor_captured_amount\n .map(MinorUnit::new);\n router_data.raw_connector_response = payment_get_response\n .raw_connector_response\n .clone()\n .map(|raw_connector_response| raw_connector_response.expose().into());\n router_data.connector_http_status_code = Some(status_code);\n\n Ok((router_data, payment_get_response))\n },\n ))\n .await?;\n\n // Copy back the updated data\n *self = updated_router_data;\n }\n common_enums::CallConnectorAction::HandleResponse(_)\n | common_enums::CallConnectorAction::Avoid\n | common_enums::CallConnectorAction::StatusUpdate { .. } => {\n Err(ApiErrorResponse::InternalServerError).attach_printable(\n \"Invalid CallConnectorAction for payment sync via UCS Gateway system\",\n )?\n }\n }\n Ok(())\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n};", + "use external_services::grpc_client;" + ], + "after_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::{\n api::gateway,\n unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n },\n};", + "use external_services::grpc_client;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::PaymentCaptureData", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl OperationSessionSetters for PaymentCaptureData {\n #[cfg(feature = \"v2\")]\n fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(straight_through_algorithm);\n }\n fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }\n fn set_client_secret(&mut self, client_secret: Option>) {\n todo!()\n }\n fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }\n\n fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }\n\n fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }\n\n fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }\n\n fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n todo!()\n }\n\n fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }\n\n fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }\n\n fn set_pm_token(&mut self, _token: String) {\n todo!()\n }\n\n fn set_connector_customer_id(&mut self, _customer_id: Option) {\n // TODO: handle this case. Should we add connector_customer_id in paymentConfirmData?\n }\n\n fn push_sessions_token(&mut self, _token: api::SessionToken) {\n todo!()\n }\n\n fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }\n\n #[track_caller]\n fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n todo!()\n }\n\n fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }\n\n fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }\n\n fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }\n\n fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }\n\n fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }\n\n fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }\n\n fn set_connector_in_payment_attempt(&mut self, connector: Option) {\n todo!()\n }\n\n fn set_connector_request_reference_id(&mut self, reference_id: Option) {\n todo!()\n }\n\n fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n todo!()\n }\n\n fn set_vault_session_details(\n &mut self,\n external_vault_session_details: Option,\n ) {\n todo!()\n }\n\n fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n todo!()\n }\n\n fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n todo!()\n }\n\n fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n todo!()\n }\n}", + "after_code": "impl OperationSessionSetters for PaymentCaptureData {\n #[cfg(feature = \"v2\")]\n fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(straight_through_algorithm);\n }\n fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }\n fn set_client_secret(&mut self, client_secret: Option>) {\n todo!()\n }\n fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }\n\n fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }\n\n fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }\n\n fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }\n\n fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n todo!()\n }\n\n fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }\n\n fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }\n\n fn set_pm_token(&mut self, _token: String) {\n todo!()\n }\n\n fn set_connector_customer_id(&mut self, _customer_id: Option) {\n // TODO: handle this case. Should we add connector_customer_id in paymentConfirmData?\n }\n\n fn push_sessions_token(&mut self, _token: api::SessionToken) {\n todo!()\n }\n\n fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }\n\n #[track_caller]\n fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n todo!()\n }\n\n fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }\n\n fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }\n\n fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }\n\n fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }\n\n fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }\n\n fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }\n\n fn set_connector_in_payment_attempt(&mut self, connector: Option) {\n todo!()\n }\n\n fn set_connector_request_reference_id(&mut self, reference_id: Option) {\n todo!()\n }\n\n fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n todo!()\n }\n\n fn set_vault_session_details(\n &mut self,\n external_vault_session_details: Option,\n ) {\n todo!()\n }\n\n fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n todo!()\n }\n\n fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n todo!()\n }\n\n fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n todo!()\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ], + "after_imports": [ + "use std::future;", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::mod::access_token", + "file": "crates/router/src/core/payments.rs", + "kind": "mod_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub mod access_token;", + "after_code": "pub mod access_token;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAuthenticateCompleteAuthorize::type::PaymentFlowResponse", + "file": "crates/router/src/core/payments.rs", + "kind": "type_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "type PaymentFlowResponse = router_types::AuthenticatePaymentFlowResponse;", + "after_code": "type PaymentFlowResponse = router_types::AuthenticatePaymentFlowResponse;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_payment_method_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }", + "after_code": "fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_capture_method", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_capture_method(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_capture_method(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::&PaymentRedirectSync", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl ValidateStatusForOperation for &PaymentRedirectSync {\n fn validate_status_for_operation(\n &self,\n intent_status: common_enums::IntentStatus,\n ) -> Result<(), errors::ApiErrorResponse> {\n match intent_status {\n common_enums::IntentStatus::RequiresCustomerAction => Ok(()),\n common_enums::IntentStatus::Succeeded\n | common_enums::IntentStatus::Conflicted\n | common_enums::IntentStatus::Failed\n | common_enums::IntentStatus::Cancelled\n | common_enums::IntentStatus::CancelledPostCapture\n | common_enums::IntentStatus::Processing\n | common_enums::IntentStatus::RequiresPaymentMethod\n | common_enums::IntentStatus::RequiresMerchantAction\n | common_enums::IntentStatus::RequiresCapture\n | common_enums::IntentStatus::PartiallyAuthorizedAndRequiresCapture\n | common_enums::IntentStatus::PartiallyCaptured\n | common_enums::IntentStatus::RequiresConfirmation\n | common_enums::IntentStatus::PartiallyCapturedAndCapturable\n | common_enums::IntentStatus::Expired => {\n Err(errors::ApiErrorResponse::PaymentUnexpectedState {\n current_flow: format!(\"{self:?}\"),\n field_name: \"status\".to_string(),\n current_value: intent_status.to_string(),\n states: [\"requires_customer_action\".to_string()].join(\", \"),\n })\n }\n }\n }\n}", + "after_code": "impl ValidateStatusForOperation for &PaymentRedirectSync {\n fn validate_status_for_operation(\n &self,\n intent_status: common_enums::IntentStatus,\n ) -> Result<(), errors::ApiErrorResponse> {\n match intent_status {\n common_enums::IntentStatus::RequiresCustomerAction => Ok(()),\n common_enums::IntentStatus::Succeeded\n | common_enums::IntentStatus::Conflicted\n | common_enums::IntentStatus::Failed\n | common_enums::IntentStatus::Cancelled\n | common_enums::IntentStatus::CancelledPostCapture\n | common_enums::IntentStatus::Processing\n | common_enums::IntentStatus::RequiresPaymentMethod\n | common_enums::IntentStatus::RequiresMerchantAction\n | common_enums::IntentStatus::RequiresCapture\n | common_enums::IntentStatus::PartiallyAuthorizedAndRequiresCapture\n | common_enums::IntentStatus::PartiallyCaptured\n | common_enums::IntentStatus::RequiresConfirmation\n | common_enums::IntentStatus::PartiallyCapturedAndCapturable\n | common_enums::IntentStatus::Expired => {\n Err(errors::ApiErrorResponse::PaymentUnexpectedState {\n current_flow: format!(\"{self:?}\"),\n field_name: \"status\".to_string(),\n current_value: intent_status.to_string(),\n states: [\"requires_customer_action\".to_string()].join(\", \"),\n })\n }\n }\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use operations::ValidateStatusForOperation;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use operations::ValidateStatusForOperation;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/extend_authorization_flow.rs::types::RouterData<\n api::ExtendAuthorization,\n types::PaymentsExtendAuthorizationData,\n types::PaymentsResponseData,\n >::function::decide_flows", + "file": "crates/router/src/core/payments/flows/extend_authorization_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n metrics::PAYMENT_EXTEND_AUTHORIZATION_COUNT.add(\n 1,\n router_env::metric_attributes!((\"connector\", connector.connector_name.to_string())),\n );\n\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::ExtendAuthorization,\n types::PaymentsExtendAuthorizationData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n Ok(resp)\n }", + "after_code": "async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n metrics::PAYMENT_EXTEND_AUTHORIZATION_COUNT.add(\n 1,\n router_env::metric_attributes!((\"connector\", connector.connector_name.to_string())),\n );\n\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::ExtendAuthorization,\n types::PaymentsExtendAuthorizationData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n Ok(resp)\n }", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n metrics::PAYMENT_EXTEND_AUTHORIZATION_COUNT.add(" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::get_detached_auth", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_detached_auth(&self) -> RouterResult<(Blake3, &[u8])> {\n use error_stack::ResultExt;\n use hyperswitch_domain_models::errors::api_error_response as errors;\n use masking::prelude::PeekInterface as _;\n use router_env::logger;\n\n let output = CHECKSUM_KEY.get_or_try_init(|| {\n let conf = self.conf();\n let context = conf\n .api_keys\n .get_inner()\n .checksum_auth_context\n .peek()\n .clone();\n let key = conf.api_keys.get_inner().checksum_auth_key.peek();\n hex::decode(key).map(|key| {\n (\n masking::StrongSecret::new(context),\n masking::StrongSecret::new(key),\n )\n })\n });\n\n match output {\n Ok((context, key)) => Ok((Blake3::new(context.peek().clone()), key.peek())),\n Err(err) => {\n logger::error!(\"Failed to get checksum key\");\n Err(err).change_context(errors::ApiErrorResponse::InternalServerError)\n }\n }\n }", + "after_code": "fn get_detached_auth(&self) -> RouterResult<(Blake3, &[u8])> {\n use error_stack::ResultExt;\n use hyperswitch_domain_models::errors::api_error_response as errors;\n use masking::prelude::PeekInterface as _;\n use router_env::logger;\n\n let output = CHECKSUM_KEY.get_or_try_init(|| {\n let conf = self.conf();\n let context = conf\n .api_keys\n .get_inner()\n .checksum_auth_context\n .peek()\n .clone();\n let key = conf.api_keys.get_inner().checksum_auth_key.peek();\n hex::decode(key).map(|key| {\n (\n masking::StrongSecret::new(context),\n masking::StrongSecret::new(key),\n )\n })\n });\n\n match output {\n Ok((context, key)) => Ok((Blake3::new(context.peek().clone()), key.peek())),\n Err(err) => {\n logger::error!(\"Failed to get checksum key\");\n Err(err).change_context(errors::ApiErrorResponse::InternalServerError)\n }\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use common_utils::crypto::Blake3;", + "use error_stack::ResultExt;", + "use router_env::logger;", + "use crate::errors::RouterResult;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};", + "use masking::prelude::PeekInterface as _;", + "use hyperswitch_domain_models::errors::api_error_response as errors;" + ], + "after_imports": [ + "use common_utils::crypto::Blake3;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use error_stack::ResultExt;", + "use router_env::logger;", + "use crate::errors::RouterResult;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use masking::prelude::PeekInterface as _;", + "use hyperswitch_domain_models::errors::api_error_response as errors;" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::WebhooksSettings", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct WebhooksSettings {\n pub outgoing_enabled: bool,\n pub ignore_error: WebhookIgnoreErrorSettings,\n pub redis_lock_expiry_seconds: u32,\n}", + "after_code": "pub struct WebhooksSettings {\n pub outgoing_enabled: bool,\n pub ignore_error: WebhookIgnoreErrorSettings,\n pub redis_lock_expiry_seconds: u32,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::Error;", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::Error;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::Multitenancy", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Multitenancy {\n pub tenants: TenantConfig,\n pub enabled: bool,\n pub global_tenant: GlobalTenant,\n}", + "after_code": "pub struct Multitenancy {\n pub tenants: TenantConfig,\n pub enabled: bool,\n pub global_tenant: GlobalTenant,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::NetworkTokenExpiry", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct NetworkTokenExpiry {\n pub token_exp_month: Option>,\n pub token_exp_year: Option>,\n}", + "after_code": "pub struct NetworkTokenExpiry {\n pub token_exp_month: Option>,\n pub token_exp_year: Option>,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_merchant_connector_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_merchant_connector_id_in_attempt(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_merchant_connector_id_in_attempt(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::AppState::function::process_env_mappings", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn process_env_mappings(\n mappings: Option>,\n ) -> Option {\n let result: HashMap = mappings?\n .into_iter()\n .filter_map(|(key, env_var)| std::env::var(&env_var).ok().map(|value| (key, value)))\n .collect();\n\n if result.is_empty() {\n None\n } else {\n Some(serde_json::Value::Object(\n result\n .into_iter()\n .map(|(k, v)| (k, serde_json::Value::String(v)))\n .collect(),\n ))\n }\n }", + "after_code": "pub fn process_env_mappings(\n mappings: Option>,\n ) -> Option {\n let result: HashMap = mappings?\n .into_iter()\n .filter_map(|(key, env_var)| std::env::var(&env_var).ok().map(|value| (key, value)))\n .collect();\n\n if result.is_empty() {\n None\n } else {\n Some(serde_json::Value::Object(\n result\n .into_iter()\n .map(|(k, v)| (k, serde_json::Value::String(v)))\n .collect(),\n ))\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_authorizations", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_authorizations(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_authorizations(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_payment_method_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData> {\n todo!()\n }", + "after_code": "fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_payment_method_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }", + "after_code": "fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::is_payment_method_tokenization_enabled_for_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn is_payment_method_tokenization_enabled_for_connector(\n state: &SessionState,\n connector_name: &str,\n payment_method: storage::enums::PaymentMethod,\n payment_method_type: Option,\n payment_method_token: Option<&PaymentMethodToken>,\n mandate_flow_enabled: Option,\n) -> RouterResult {\n let connector_tokenization_filter = state.conf.tokenization.0.get(connector_name);\n\n Ok(connector_tokenization_filter\n .map(|connector_filter| {\n connector_filter\n .payment_method\n .clone()\n .contains(&payment_method)\n && is_payment_method_type_allowed_for_connector(\n payment_method_type,\n connector_filter.payment_method_type.clone(),\n )\n && is_apple_pay_pre_decrypt_type_connector_tokenization(\n payment_method_type,\n payment_method_token,\n connector_filter.apple_pay_pre_decrypt_flow.clone(),\n )\n && is_google_pay_pre_decrypt_type_connector_tokenization(\n payment_method_type,\n payment_method_token,\n connector_filter.google_pay_pre_decrypt_flow.clone(),\n )\n && is_payment_flow_allowed_for_connector(\n mandate_flow_enabled,\n connector_filter.flow.clone(),\n )\n })\n .unwrap_or(false))\n}", + "after_code": "fn is_payment_method_tokenization_enabled_for_connector(\n state: &SessionState,\n connector_name: &str,\n payment_method: storage::enums::PaymentMethod,\n payment_method_type: Option,\n payment_method_token: Option<&PaymentMethodToken>,\n mandate_flow_enabled: Option,\n) -> RouterResult {\n let connector_tokenization_filter = state.conf.tokenization.0.get(connector_name);\n\n Ok(connector_tokenization_filter\n .map(|connector_filter| {\n connector_filter\n .payment_method\n .clone()\n .contains(&payment_method)\n && is_payment_method_type_allowed_for_connector(\n payment_method_type,\n connector_filter.payment_method_type.clone(),\n )\n && is_apple_pay_pre_decrypt_type_connector_tokenization(\n payment_method_type,\n payment_method_token,\n connector_filter.apple_pay_pre_decrypt_flow.clone(),\n )\n && is_google_pay_pre_decrypt_type_connector_tokenization(\n payment_method_type,\n payment_method_token,\n connector_filter.google_pay_pre_decrypt_flow.clone(),\n )\n && is_payment_flow_allowed_for_connector(\n mandate_flow_enabled,\n connector_filter.flow.clone(),\n )\n })\n .unwrap_or(false))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Webhooks", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Webhooks {\n pub fn server(config: AppState) -> Scope {\n use api_models::webhooks as webhook_type;\n\n #[allow(unused_mut)]\n let mut route = web::scope(\"/v2/webhooks\")\n .app_data(web::Data::new(config))\n .service(\n web::resource(\"/{merchant_id}/{profile_id}/{connector_id}\")\n .route(\n web::post().to(receive_incoming_webhook::),\n )\n .route(web::get().to(receive_incoming_webhook::))\n .route(\n web::put().to(receive_incoming_webhook::),\n ),\n );\n\n #[cfg(all(feature = \"revenue_recovery\", feature = \"v2\"))]\n {\n route = route.service(\n web::resource(\"/recovery/{merchant_id}/{profile_id}/{connector_id}\").route(\n web::post()\n .to(recovery_receive_incoming_webhook::),\n ),\n );\n }\n\n route\n }\n}", + "after_code": "impl Webhooks {\n pub fn server(config: AppState) -> Scope {\n use api_models::webhooks as webhook_type;\n\n #[allow(unused_mut)]\n let mut route = web::scope(\"/v2/webhooks\")\n .app_data(web::Data::new(config))\n .service(\n web::resource(\"/{merchant_id}/{profile_id}/{connector_id}\")\n .route(\n web::post().to(receive_incoming_webhook::),\n )\n .route(web::get().to(receive_incoming_webhook::))\n .route(\n web::put().to(receive_incoming_webhook::),\n ),\n );\n\n #[cfg(all(feature = \"revenue_recovery\", feature = \"v2\"))]\n {\n route = route.service(\n web::resource(\"/recovery/{merchant_id}/{profile_id}/{connector_id}\").route(\n web::post()\n .to(recovery_receive_incoming_webhook::),\n ),\n );\n }\n\n route\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use api_models::webhooks as webhook_type;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::process_tracker::revenue_recovery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use api_models::webhooks as webhook_type;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::process_tracker::revenue_recovery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_merchant_connector_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_merchant_connector_details(\n &self,\n ) -> Option {\n todo!()\n }", + "after_code": "fn get_merchant_connector_details(\n &self,\n ) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::perform_session_token_routing", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn perform_session_token_routing(\n state: SessionState,\n business_profile: &domain::Profile,\n merchant_context: domain::MerchantContext,\n payment_data: &D,\n connectors: api::SessionConnectorDatas,\n) -> RouterResult\nwhere\n F: Clone,\n D: OperationSessionGetters,\n{\n let chosen = connectors.apply_filter_for_session_routing();\n let sfr = SessionFlowRoutingInput {\n country: payment_data\n .get_payment_intent()\n .billing_address\n .as_ref()\n .and_then(|address| address.get_inner().address.as_ref())\n .and_then(|details| details.country),\n payment_intent: payment_data.get_payment_intent(),\n\n chosen,\n };\n let result = self_routing::perform_session_flow_routing(\n &state,\n merchant_context.get_merchant_key_store(),\n sfr,\n business_profile,\n &enums::TransactionType::Payment,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"error performing session flow routing\")?;\n\n let final_list = connectors.filter_and_validate_for_session_flow(&result)?;\n Ok(SessionTokenRoutingResult {\n final_result: final_list,\n routing_result: result,\n })\n}", + "after_code": "pub async fn perform_session_token_routing(\n state: SessionState,\n business_profile: &domain::Profile,\n merchant_context: domain::MerchantContext,\n payment_data: &D,\n connectors: api::SessionConnectorDatas,\n) -> RouterResult\nwhere\n F: Clone,\n D: OperationSessionGetters,\n{\n let chosen = connectors.apply_filter_for_session_routing();\n let sfr = SessionFlowRoutingInput {\n country: payment_data\n .get_payment_intent()\n .billing_address\n .as_ref()\n .and_then(|address| address.get_inner().address.as_ref())\n .and_then(|details| details.country),\n payment_intent: payment_data.get_payment_intent(),\n\n chosen,\n };\n let result = self_routing::perform_session_flow_routing(\n &state,\n merchant_context.get_merchant_key_store(),\n sfr,\n business_profile,\n &enums::TransactionType::Payment,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"error performing session flow routing\")?;\n\n let final_list = connectors.filter_and_validate_for_session_flow(&result)?;\n Ok(SessionTokenRoutingResult {\n final_result: final_list,\n routing_result: result,\n })\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_co_badged_card_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }", + "after_code": "fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_authorizations", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_authorizations(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_authorizations(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::call_connector_service_prerequisites", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn call_connector_service_prerequisites(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n customer: &Option,\n call_connector_action: CallConnectorAction,\n schedule_time: Option,\n header_payload: HeaderPayload,\n frm_suggestion: Option,\n business_profile: &domain::Profile,\n is_retry_payment: bool,\n should_retry_with_pan: bool,\n all_keys_required: Option,\n) -> RouterResult<(\n domain::MerchantConnectorAccountTypeDetails,\n Option,\n RouterData,\n TokenizationAction,\n)>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n let merchant_connector_account_type_details =\n domain::MerchantConnectorAccountTypeDetails::MerchantConnectorAccount(Box::new(\n helpers::get_merchant_connector_account_v2(\n state,\n merchant_context.get_merchant_key_store(),\n connector.merchant_connector_id.as_ref(),\n )\n .await?,\n ));\n\n operation\n .to_domain()?\n .populate_payment_data(\n state,\n payment_data,\n merchant_context,\n business_profile,\n &connector,\n )\n .await?;\n\n let updated_customer = call_create_connector_customer_if_required(\n state,\n customer,\n merchant_context,\n &merchant_connector_account_type_details,\n payment_data,\n )\n .await?;\n\n let router_data = payment_data\n .construct_router_data(\n state,\n connector.connector.id(),\n merchant_context,\n customer,\n &merchant_connector_account_type_details,\n None,\n Some(header_payload),\n )\n .await?;\n\n let tokenization_action = operation\n .to_domain()?\n .get_connector_tokenization_action(state, payment_data)\n .await?;\n\n Ok((\n merchant_connector_account_type_details,\n updated_customer,\n router_data,\n tokenization_action,\n ))\n}", + "after_code": "pub async fn call_connector_service_prerequisites(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n customer: &Option,\n call_connector_action: CallConnectorAction,\n schedule_time: Option,\n header_payload: HeaderPayload,\n frm_suggestion: Option,\n business_profile: &domain::Profile,\n is_retry_payment: bool,\n should_retry_with_pan: bool,\n all_keys_required: Option,\n) -> RouterResult<(\n domain::MerchantConnectorAccountTypeDetails,\n Option,\n RouterData,\n TokenizationAction,\n)>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n let merchant_connector_account_type_details =\n domain::MerchantConnectorAccountTypeDetails::MerchantConnectorAccount(Box::new(\n helpers::get_merchant_connector_account_v2(\n state,\n merchant_context.get_merchant_key_store(),\n connector.merchant_connector_id.as_ref(),\n )\n .await?,\n ));\n\n operation\n .to_domain()?\n .populate_payment_data(\n state,\n payment_data,\n merchant_context,\n business_profile,\n &connector,\n )\n .await?;\n\n let updated_customer = call_create_connector_customer_if_required(\n state,\n customer,\n merchant_context,\n &merchant_connector_account_type_details,\n payment_data,\n )\n .await?;\n\n let router_data = payment_data\n .construct_router_data(\n state,\n connector.connector.id(),\n merchant_context,\n customer,\n &merchant_connector_account_type_details,\n None,\n Some(header_payload),\n )\n .await?;\n\n let tokenization_action = operation\n .to_domain()?\n .get_connector_tokenization_action(state, payment_data)\n .await?;\n\n Ok((\n merchant_connector_account_type_details,\n updated_customer,\n router_data,\n tokenization_action,\n ))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_card_discovery_for_card_payment_method", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_card_discovery_for_card_payment_method(&self) -> Option {\n match self.payment_attempt.payment_method {\n Some(storage_enums::PaymentMethod::Card) => {\n if self\n .token_data\n .as_ref()\n .map(storage::PaymentTokenData::is_permanent_card)\n .unwrap_or(false)\n {\n Some(common_enums::CardDiscovery::SavedCard)\n } else if self.service_details.is_some() {\n Some(common_enums::CardDiscovery::ClickToPay)\n } else {\n Some(common_enums::CardDiscovery::Manual)\n }\n }\n _ => None,\n }\n }", + "after_code": "fn get_card_discovery_for_card_payment_method(&self) -> Option {\n match self.payment_attempt.payment_method {\n Some(storage_enums::PaymentMethod::Card) => {\n if self\n .token_data\n .as_ref()\n .map(storage::PaymentTokenData::is_permanent_card)\n .unwrap_or(false)\n {\n Some(common_enums::CardDiscovery::SavedCard)\n } else if self.service_details.is_some() {\n Some(common_enums::CardDiscovery::ClickToPay)\n } else {\n Some(common_enums::CardDiscovery::Manual)\n }\n }\n _ => None,\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::AppState::function::as_ref", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn as_ref(&self) -> &Self {\n self\n }", + "after_code": "fn as_ref(&self) -> &Self {\n self\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_optional_external_vault_session_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_optional_external_vault_session_details(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_optional_external_vault_session_details(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/capture_flow.rs::types::RouterData::function::decide_flows", + "file": "crates/router/src/core/payments/flows/capture_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::Capture,\n types::PaymentsCaptureData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let mut new_router_data = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n // Initiating Integrity check\n let integrity_result = helpers::check_integrity_based_on_flow(\n &new_router_data.request,\n &new_router_data.response,\n );\n new_router_data.integrity_check = integrity_result;\n\n Ok(new_router_data)\n }", + "after_code": "async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::Capture,\n types::PaymentsCaptureData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let mut new_router_data = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n // Initiating Integrity check\n let integrity_result = helpers::check_integrity_based_on_flow(\n &new_router_data.request,\n &new_router_data.response,\n );\n new_router_data.integrity_check = integrity_result;\n\n Ok(new_router_data)\n }", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_cancellation_reason", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n todo!()\n }", + "after_code": "fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::RelayWebhooks::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n use api_models::webhooks as webhook_type;\n web::scope(\"/webhooks/relay\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/{merchant_id}/{connector_id}\").route(\n web::post().to(receive_incoming_relay_webhook::),\n ))\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n use api_models::webhooks as webhook_type;\n web::scope(\"/webhooks/relay\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/{merchant_id}/{connector_id}\").route(\n web::post().to(receive_incoming_relay_webhook::),\n ))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use api_models::webhooks as webhook_type;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use api_models::webhooks as webhook_type;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::KeyManagerConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct KeyManagerConfig {\n pub enabled: bool,\n pub url: String,\n #[cfg(feature = \"keymanager_mtls\")]\n pub cert: Secret,\n #[cfg(feature = \"keymanager_mtls\")]\n pub ca: Secret,\n}", + "after_code": "pub struct KeyManagerConfig {\n pub enabled: bool,\n pub url: String,\n #[cfg(feature = \"keymanager_mtls\")]\n pub cert: Secret,\n #[cfg(feature = \"keymanager_mtls\")]\n pub ca: Secret,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::impl::GenericLinkEnvUiConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Default for GenericLinkEnvUiConfig {\n fn default() -> Self {\n Self {\n #[allow(clippy::expect_used)]\n logo: url::Url::parse(\"https://hyperswitch.io/favicon.ico\")\n .expect(\"Failed to parse default logo URL\"),\n merchant_name: Secret::new(\"HyperSwitch\".to_string()),\n theme: \"#4285F4\".to_string(),\n }\n }\n}", + "after_code": "impl Default for GenericLinkEnvUiConfig {\n fn default() -> Self {\n Self {\n #[allow(clippy::expect_used)]\n logo: url::Url::parse(\"https://hyperswitch.io/favicon.ico\")\n .expect(\"Failed to parse default logo URL\"),\n merchant_name: Secret::new(\"HyperSwitch\".to_string()),\n theme: \"#4285F4\".to_string(),\n }\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::ActionTypesBuilder::function::new", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn new() -> Self {\n Self {\n action_types: Vec::new(),\n }\n }", + "after_code": "pub fn new() -> Self {\n Self {\n action_types: Vec::new(),\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_authentication", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>\n {\n self.authentication.as_ref()\n }", + "after_code": "fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>\n {\n self.authentication.as_ref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_mandate_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails> {\n todo!()\n }", + "after_code": "fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/psync_flow.rs::types::RouterData::function::execute_connector_processing_step_for_each_capture", + "file": "crates/router/src/core/payments/flows/psync_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": true, + "before_code": "async fn execute_connector_processing_step_for_each_capture(\n &self,\n state: &SessionState,\n pending_connector_capture_id_list: Vec,\n call_connector_action: payments::CallConnectorAction,\n connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PSync,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n >,\n return_raw_connector_response: Option,\n ) -> RouterResult {\n let mut capture_sync_response_map = HashMap::new();\n if let payments::CallConnectorAction::HandleResponse(_) = call_connector_action {\n // webhook consume flow, only call connector once. Since there will only be a single event in every webhook\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n self,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n } else {\n // in trigger, call connector for every capture_id\n for connector_capture_id in pending_connector_capture_id_list {\n // TEMPORARY FIX: remove the clone on router data after removing this function as an impl on trait RouterDataPSync\n // TRACKING ISSUE: https://github.com/juspay/hyperswitch/issues/4644\n let mut cloned_router_data = self.clone();\n cloned_router_data.request.connector_transaction_id =\n types::ResponseId::ConnectorTransactionId(connector_capture_id.clone());\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration.clone_box(),\n &cloned_router_data,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n match resp.response {\n Err(err) => {\n capture_sync_response_map.insert(connector_capture_id, types::CaptureSyncResponse::Error {\n code: err.code,\n message: err.message,\n reason: err.reason,\n status_code: err.status_code,\n amount: None,\n });\n },\n Ok(types::PaymentsResponseData::MultipleCaptureResponse { capture_sync_response_list })=> {\n capture_sync_response_map.extend(capture_sync_response_list.into_iter());\n }\n _ => Err(ApiErrorResponse::PreconditionFailed { message: \"Response type must be PaymentsResponseData::MultipleCaptureResponse for payment sync\".into() })?,\n };\n }\n let mut cloned_router_data = self.clone();\n cloned_router_data.response =\n Ok(types::PaymentsResponseData::MultipleCaptureResponse {\n capture_sync_response_list: capture_sync_response_map,\n });\n Ok(cloned_router_data)\n }\n }", + "after_code": "async fn execute_connector_processing_step_for_each_capture(\n &self,\n state: &SessionState,\n pending_connector_capture_id_list: Vec,\n call_connector_action: payments::CallConnectorAction,\n connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PSync,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n >,\n return_raw_connector_response: Option,\n gateway_context: Option,\n ) -> RouterResult {\n let mut capture_sync_response_map = HashMap::new();\n if let payments::CallConnectorAction::HandleResponse(_) = call_connector_action {\n // webhook consume flow, only call connector once. Since there will only be a single event in every webhook\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n self,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n } else {\n // in trigger, call connector for every capture_id\n for connector_capture_id in pending_connector_capture_id_list {\n // TEMPORARY FIX: remove the clone on router data after removing this function as an impl on trait RouterDataPSync\n // TRACKING ISSUE: https://github.com/juspay/hyperswitch/issues/4644\n let mut cloned_router_data = self.clone();\n cloned_router_data.request.connector_transaction_id =\n types::ResponseId::ConnectorTransactionId(connector_capture_id.clone());\n let resp = if let Some(ref gateway_context) = gateway_context {\n gateway::execute_payment_gateway(\n state,\n connector_integration.clone_box(),\n &cloned_router_data,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n gateway_context.clone(),\n )\n .await\n } else {\n services::execute_connector_processing_step(\n state,\n connector_integration.clone_box(),\n &cloned_router_data,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n )\n .await\n }\n .to_payment_failed_response()?;\n match resp.response {\n Err(err) => {\n capture_sync_response_map.insert(connector_capture_id, types::CaptureSyncResponse::Error {\n code: err.code,\n message: err.message,\n reason: err.reason,\n status_code: err.status_code,\n amount: None,\n });\n },\n Ok(types::PaymentsResponseData::MultipleCaptureResponse { capture_sync_response_list })=> {\n capture_sync_response_map.extend(capture_sync_response_list.into_iter());\n }\n _ => Err(ApiErrorResponse::PreconditionFailed { message: \"Response type must be PaymentsResponseData::MultipleCaptureResponse for payment sync\".into() })?,\n };\n }\n let mut cloned_router_data = self.clone();\n cloned_router_data.response =\n Ok(types::PaymentsResponseData::MultipleCaptureResponse {\n capture_sync_response_list: capture_sync_response_map,\n });\n Ok(cloned_router_data)\n }\n }", + "diff_span": { + "before": " cloned_router_data.request.connector_transaction_id =\n types::ResponseId::ConnectorTransactionId(connector_capture_id.clone());\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration.clone_box(),\n &cloned_router_data,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n match resp.response {", + "after": " >,\n return_raw_connector_response: Option,\n gateway_context: Option,\n ) -> RouterResult {\n let mut capture_sync_response_map = HashMap::new();\n if let payments::CallConnectorAction::HandleResponse(_) = call_connector_action {\n // webhook consume flow, only call connector once. Since there will only be a single event in every webhook\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n self,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n } else {\n // in trigger, call connector for every capture_id\n for connector_capture_id in pending_connector_capture_id_list {\n // TEMPORARY FIX: remove the clone on router data after removing this function as an impl on trait RouterDataPSync\n // TRACKING ISSUE: https://github.com/juspay/hyperswitch/issues/4644\n let mut cloned_router_data = self.clone();\n cloned_router_data.request.connector_transaction_id =\n types::ResponseId::ConnectorTransactionId(connector_capture_id.clone());\n let resp = if let Some(ref gateway_context) = gateway_context {\n gateway::execute_payment_gateway(\n state,\n connector_integration.clone_box(),\n &cloned_router_data,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n gateway_context.clone(),\n )\n .await\n } else {\n services::execute_connector_processing_step(\n state,\n connector_integration.clone_box(),\n &cloned_router_data,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n )\n .await\n }\n .to_payment_failed_response()?;\n match resp.response {" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n};" + ], + "after_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::{\n api::gateway,\n unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n },\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::add_process_sync_task", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn add_process_sync_task(\n db: &dyn StorageInterface,\n payment_attempt: &storage::PaymentAttempt,\n schedule_time: time::PrimitiveDateTime,\n) -> CustomResult<(), errors::StorageError> {\n let tracking_data = api::PaymentsRetrieveRequest {\n force_sync: true,\n merchant_id: Some(payment_attempt.merchant_id.clone()),\n resource_id: api::PaymentIdType::PaymentAttemptId(payment_attempt.get_id().to_owned()),\n ..Default::default()\n };\n let runner = storage::ProcessTrackerRunner::PaymentsSyncWorkflow;\n let task = \"PAYMENTS_SYNC\";\n let tag = [\"SYNC\", \"PAYMENT\"];\n let process_tracker_id = pt_utils::get_process_tracker_id(\n runner,\n task,\n payment_attempt.get_id(),\n &payment_attempt.merchant_id,\n );\n let process_tracker_entry = storage::ProcessTrackerNew::new(\n process_tracker_id,\n task,\n runner,\n tag,\n tracking_data,\n None,\n schedule_time,\n common_types::consts::API_VERSION,\n )\n .map_err(errors::StorageError::from)?;\n\n db.insert_process(process_tracker_entry).await?;\n Ok(())\n}", + "after_code": "pub async fn add_process_sync_task(\n db: &dyn StorageInterface,\n payment_attempt: &storage::PaymentAttempt,\n schedule_time: time::PrimitiveDateTime,\n) -> CustomResult<(), errors::StorageError> {\n let tracking_data = api::PaymentsRetrieveRequest {\n force_sync: true,\n merchant_id: Some(payment_attempt.merchant_id.clone()),\n resource_id: api::PaymentIdType::PaymentAttemptId(payment_attempt.get_id().to_owned()),\n ..Default::default()\n };\n let runner = storage::ProcessTrackerRunner::PaymentsSyncWorkflow;\n let task = \"PAYMENTS_SYNC\";\n let tag = [\"SYNC\", \"PAYMENT\"];\n let process_tracker_id = pt_utils::get_process_tracker_id(\n runner,\n task,\n payment_attempt.get_id(),\n &payment_attempt.merchant_id,\n );\n let process_tracker_entry = storage::ProcessTrackerNew::new(\n process_tracker_id,\n task,\n runner,\n tag,\n tracking_data,\n None,\n schedule_time,\n common_types::consts::API_VERSION,\n )\n .map_err(errors::StorageError::from)?;\n\n db.insert_process(process_tracker_entry).await?;\n Ok(())\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_connector_request_reference_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_request_reference_id(&mut self, _reference_id: Option) {\n todo!()\n }", + "after_code": "fn set_connector_request_reference_id(&mut self, _reference_id: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_intent(&self) -> &storage::PaymentIntent {\n &self.payment_intent\n }", + "after_code": "fn get_payment_intent(&self) -> &storage::PaymentIntent {\n &self.payment_intent\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_poll_config", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_poll_config(&self) -> Option {\n self.poll_config.clone()\n }", + "after_code": "fn get_poll_config(&self) -> Option {\n self.poll_config.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_frm_message", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_frm_message(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_frm_message(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_attempt(&self) -> &storage::PaymentAttempt {\n todo!()\n }", + "after_code": "fn get_payment_attempt(&self) -> &storage::PaymentAttempt {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_frm_message", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_frm_message(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_frm_message(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::check_apple_pay_metadata", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn check_apple_pay_metadata(\n state: &SessionState,\n merchant_connector_account: Option<&helpers::MerchantConnectorAccountType>,\n) -> Option {\n merchant_connector_account.and_then(|mca| {\n let metadata = mca.get_metadata();\n metadata.and_then(|apple_pay_metadata| {\n let parsed_metadata = apple_pay_metadata\n .clone()\n .parse_value::(\n \"ApplepayCombinedSessionTokenData\",\n )\n .map(|combined_metadata| {\n api_models::payments::ApplepaySessionTokenMetadata::ApplePayCombined(\n combined_metadata.apple_pay_combined,\n )\n })\n .or_else(|_| {\n apple_pay_metadata\n .parse_value::(\n \"ApplepaySessionTokenData\",\n )\n .map(|old_metadata| {\n api_models::payments::ApplepaySessionTokenMetadata::ApplePay(\n old_metadata.apple_pay,\n )\n })\n })\n .map_err(|error| {\n logger::warn!(?error, \"Failed to Parse Value to ApplepaySessionTokenData\")\n });\n\n parsed_metadata.ok().map(|metadata| match metadata {\n api_models::payments::ApplepaySessionTokenMetadata::ApplePayCombined(\n apple_pay_combined,\n ) => match apple_pay_combined {\n api_models::payments::ApplePayCombinedMetadata::Simplified { .. } => {\n domain::ApplePayFlow::Simplified(payments_api::PaymentProcessingDetails {\n payment_processing_certificate: state\n .conf\n .applepay_decrypt_keys\n .get_inner()\n .apple_pay_ppc\n .clone(),\n payment_processing_certificate_key: state\n .conf\n .applepay_decrypt_keys\n .get_inner()\n .apple_pay_ppc_key\n .clone(),\n })\n }\n api_models::payments::ApplePayCombinedMetadata::Manual {\n payment_request_data: _,\n session_token_data,\n } => {\n if let Some(manual_payment_processing_details_at) =\n session_token_data.payment_processing_details_at\n {\n match manual_payment_processing_details_at {\n payments_api::PaymentProcessingDetailsAt::Hyperswitch(\n payment_processing_details,\n ) => domain::ApplePayFlow::Simplified(payment_processing_details),\n payments_api::PaymentProcessingDetailsAt::Connector => {\n domain::ApplePayFlow::Manual\n }\n }\n } else {\n domain::ApplePayFlow::Manual\n }\n }\n },\n api_models::payments::ApplepaySessionTokenMetadata::ApplePay(_) => {\n domain::ApplePayFlow::Manual\n }\n })\n })\n })\n}", + "after_code": "fn check_apple_pay_metadata(\n state: &SessionState,\n merchant_connector_account: Option<&helpers::MerchantConnectorAccountType>,\n) -> Option {\n merchant_connector_account.and_then(|mca| {\n let metadata = mca.get_metadata();\n metadata.and_then(|apple_pay_metadata| {\n let parsed_metadata = apple_pay_metadata\n .clone()\n .parse_value::(\n \"ApplepayCombinedSessionTokenData\",\n )\n .map(|combined_metadata| {\n api_models::payments::ApplepaySessionTokenMetadata::ApplePayCombined(\n combined_metadata.apple_pay_combined,\n )\n })\n .or_else(|_| {\n apple_pay_metadata\n .parse_value::(\n \"ApplepaySessionTokenData\",\n )\n .map(|old_metadata| {\n api_models::payments::ApplepaySessionTokenMetadata::ApplePay(\n old_metadata.apple_pay,\n )\n })\n })\n .map_err(|error| {\n logger::warn!(?error, \"Failed to Parse Value to ApplepaySessionTokenData\")\n });\n\n parsed_metadata.ok().map(|metadata| match metadata {\n api_models::payments::ApplepaySessionTokenMetadata::ApplePayCombined(\n apple_pay_combined,\n ) => match apple_pay_combined {\n api_models::payments::ApplePayCombinedMetadata::Simplified { .. } => {\n domain::ApplePayFlow::Simplified(payments_api::PaymentProcessingDetails {\n payment_processing_certificate: state\n .conf\n .applepay_decrypt_keys\n .get_inner()\n .apple_pay_ppc\n .clone(),\n payment_processing_certificate_key: state\n .conf\n .applepay_decrypt_keys\n .get_inner()\n .apple_pay_ppc_key\n .clone(),\n })\n }\n api_models::payments::ApplePayCombinedMetadata::Manual {\n payment_request_data: _,\n session_token_data,\n } => {\n if let Some(manual_payment_processing_details_at) =\n session_token_data.payment_processing_details_at\n {\n match manual_payment_processing_details_at {\n payments_api::PaymentProcessingDetailsAt::Hyperswitch(\n payment_processing_details,\n ) => domain::ApplePayFlow::Simplified(payment_processing_details),\n payments_api::PaymentProcessingDetailsAt::Connector => {\n domain::ApplePayFlow::Manual\n }\n }\n } else {\n domain::ApplePayFlow::Manual\n }\n }\n },\n api_models::payments::ApplepaySessionTokenMetadata::ApplePay(_) => {\n domain::ApplePayFlow::Manual\n }\n })\n })\n })\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_billing_address", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_billing_address(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_billing_address(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::PaymentRedirectSync", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl PaymentRedirectFlow for PaymentRedirectSync {\n type PaymentFlowResponse =\n router_types::RedirectPaymentFlowResponse>;\n\n async fn call_payment_flow(\n &self,\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n req: PaymentsRedirectResponseData,\n ) -> RouterResult {\n let payment_id = req.payment_id.clone();\n\n let payment_sync_request = api::PaymentsRetrieveRequest {\n param: Some(req.query_params.clone()),\n force_sync: true,\n expand_attempts: false,\n return_raw_connector_response: None,\n merchant_connector_details: None, // TODO: Implement for connectors requiring 3DS or redirection-based authentication flows.\n };\n\n let operation = operations::PaymentGet;\n let boxed_operation: BoxedOperation<\n '_,\n api::PSync,\n api::PaymentsRetrieveRequest,\n PaymentStatusData,\n > = Box::new(operation);\n\n let get_tracker_response = boxed_operation\n .to_get_tracker()?\n .get_trackers(\n state,\n &payment_id,\n &payment_sync_request,\n &merchant_context,\n &profile,\n &HeaderPayload::default(),\n )\n .await?;\n\n let payment_data = &get_tracker_response.payment_data;\n self.validate_status_for_operation(payment_data.payment_intent.status)?;\n\n let payment_attempt = payment_data.payment_attempt.clone();\n\n let connector = payment_attempt\n .connector\n .as_ref()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\n \"connector is not set in payment attempt in finish redirection flow\",\n )?;\n\n // This connector data is ephemeral, the call payment flow will get new connector data\n // with merchant account details, so the connector_id can be safely set to None here\n let connector_data = api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n connector,\n api::GetToken::Connector,\n None,\n )?;\n\n let call_connector_action = connector_data\n .connector\n .get_flow_type(\n &req.query_params,\n req.json_payload.clone(),\n self.get_payment_action(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to decide the response flow\")?;\n\n let (payment_data, _, _, _, _, _) =\n Box::pin(payments_operation_core::(\n state,\n req_state,\n merchant_context,\n &profile,\n operation,\n payment_sync_request,\n get_tracker_response,\n call_connector_action,\n HeaderPayload::default(),\n ))\n .await?;\n\n Ok(router_types::RedirectPaymentFlowResponse {\n payment_data,\n profile,\n })\n }\n fn generate_response(\n &self,\n payment_flow_response: &Self::PaymentFlowResponse,\n ) -> RouterResult> {\n let payment_intent = &payment_flow_response.payment_data.payment_intent;\n let profile = &payment_flow_response.profile;\n\n let return_url = payment_intent\n .return_url\n .as_ref()\n .or(profile.return_url.as_ref())\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"return url not found in payment intent and profile\")?\n .to_owned();\n\n let return_url = return_url\n .add_query_params((\"id\", payment_intent.id.get_string_repr()))\n .add_query_params((\"status\", &payment_intent.status.to_string()));\n\n let return_url_str = return_url.into_inner().to_string();\n\n Ok(services::ApplicationResponse::JsonForRedirection(\n api::RedirectionResponse {\n return_url_with_query_params: return_url_str,\n },\n ))\n }\n\n fn get_payment_action(&self) -> services::PaymentAction {\n services::PaymentAction::PSync\n }\n}", + "after_code": "impl PaymentRedirectFlow for PaymentRedirectSync {\n type PaymentFlowResponse =\n router_types::RedirectPaymentFlowResponse>;\n\n async fn call_payment_flow(\n &self,\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n req: PaymentsRedirectResponseData,\n ) -> RouterResult {\n let payment_id = req.payment_id.clone();\n\n let payment_sync_request = api::PaymentsRetrieveRequest {\n param: Some(req.query_params.clone()),\n force_sync: true,\n expand_attempts: false,\n return_raw_connector_response: None,\n merchant_connector_details: None, // TODO: Implement for connectors requiring 3DS or redirection-based authentication flows.\n };\n\n let operation = operations::PaymentGet;\n let boxed_operation: BoxedOperation<\n '_,\n api::PSync,\n api::PaymentsRetrieveRequest,\n PaymentStatusData,\n > = Box::new(operation);\n\n let get_tracker_response = boxed_operation\n .to_get_tracker()?\n .get_trackers(\n state,\n &payment_id,\n &payment_sync_request,\n &merchant_context,\n &profile,\n &HeaderPayload::default(),\n )\n .await?;\n\n let payment_data = &get_tracker_response.payment_data;\n self.validate_status_for_operation(payment_data.payment_intent.status)?;\n\n let payment_attempt = payment_data.payment_attempt.clone();\n\n let connector = payment_attempt\n .connector\n .as_ref()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\n \"connector is not set in payment attempt in finish redirection flow\",\n )?;\n\n // This connector data is ephemeral, the call payment flow will get new connector data\n // with merchant account details, so the connector_id can be safely set to None here\n let connector_data = api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n connector,\n api::GetToken::Connector,\n None,\n )?;\n\n let call_connector_action = connector_data\n .connector\n .get_flow_type(\n &req.query_params,\n req.json_payload.clone(),\n self.get_payment_action(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to decide the response flow\")?;\n\n let (payment_data, _, _, _, _, _) =\n Box::pin(payments_operation_core::(\n state,\n req_state,\n merchant_context,\n &profile,\n operation,\n payment_sync_request,\n get_tracker_response,\n call_connector_action,\n HeaderPayload::default(),\n ))\n .await?;\n\n Ok(router_types::RedirectPaymentFlowResponse {\n payment_data,\n profile,\n })\n }\n fn generate_response(\n &self,\n payment_flow_response: &Self::PaymentFlowResponse,\n ) -> RouterResult> {\n let payment_intent = &payment_flow_response.payment_data.payment_intent;\n let profile = &payment_flow_response.profile;\n\n let return_url = payment_intent\n .return_url\n .as_ref()\n .or(profile.return_url.as_ref())\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"return url not found in payment intent and profile\")?\n .to_owned();\n\n let return_url = return_url\n .add_query_params((\"id\", payment_intent.id.get_string_repr()))\n .add_query_params((\"status\", &payment_intent.status.to_string()));\n\n let return_url_str = return_url.into_inner().to_string();\n\n Ok(services::ApplicationResponse::JsonForRedirection(\n api::RedirectionResponse {\n return_url_with_query_params: return_url_str,\n },\n ))\n }\n\n fn get_payment_action(&self) -> services::PaymentAction {\n services::PaymentAction::PSync\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentRedirectSync::type::PaymentFlowResponse", + "file": "crates/router/src/core/payments.rs", + "kind": "type_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "type PaymentFlowResponse =\n router_types::RedirectPaymentFlowResponse>;", + "after_code": "type PaymentFlowResponse =\n router_types::RedirectPaymentFlowResponse>;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_capture_method", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_capture_method(&self) -> Option {\n self.payment_attempt.capture_method\n }", + "after_code": "fn get_capture_method(&self) -> Option {\n self.payment_attempt.capture_method\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::FeatureMatrix::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/feature_matrix\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::get().to(feature_matrix::fetch_feature_matrix)))\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/feature_matrix\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::get().to(feature_matrix::fetch_feature_matrix)))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use crate::routes::feature_matrix;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use crate::routes::feature_matrix;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::connector_selection", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn connector_selection(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n business_profile: &domain::Profile,\n payment_data: &mut D,\n mandate_type: Option,\n) -> RouterResult\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let mut routing_data = storage::RoutingData {\n routed_through: payment_data.get_payment_attempt().connector.clone(),\n\n merchant_connector_id: payment_data\n .get_payment_attempt()\n .merchant_connector_id\n .clone(),\n pre_routing_connector_choice: payment_data.get_pre_routing_result().and_then(\n |pre_routing_results| {\n pre_routing_results\n .get(&payment_data.get_payment_attempt().payment_method_subtype)\n .cloned()\n },\n ),\n\n algorithm_requested: payment_data\n .get_payment_intent()\n .routing_algorithm_id\n .clone(),\n };\n\n let payment_dsl_input = core_routing::PaymentsDslInput::new(\n None,\n payment_data.get_payment_attempt(),\n payment_data.get_payment_intent(),\n payment_data.get_payment_method_data(),\n payment_data.get_address(),\n None,\n payment_data.get_currency(),\n );\n\n let decided_connector = decide_connector(\n state.clone(),\n merchant_context,\n business_profile,\n &mut routing_data,\n payment_dsl_input,\n mandate_type,\n )\n .await?;\n\n payment_data.set_connector_in_payment_attempt(routing_data.routed_through);\n\n payment_data.set_merchant_connector_id_in_attempt(routing_data.merchant_connector_id);\n\n Ok(decided_connector)\n}", + "after_code": "pub async fn connector_selection(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n business_profile: &domain::Profile,\n payment_data: &mut D,\n mandate_type: Option,\n) -> RouterResult\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let mut routing_data = storage::RoutingData {\n routed_through: payment_data.get_payment_attempt().connector.clone(),\n\n merchant_connector_id: payment_data\n .get_payment_attempt()\n .merchant_connector_id\n .clone(),\n pre_routing_connector_choice: payment_data.get_pre_routing_result().and_then(\n |pre_routing_results| {\n pre_routing_results\n .get(&payment_data.get_payment_attempt().payment_method_subtype)\n .cloned()\n },\n ),\n\n algorithm_requested: payment_data\n .get_payment_intent()\n .routing_algorithm_id\n .clone(),\n };\n\n let payment_dsl_input = core_routing::PaymentsDslInput::new(\n None,\n payment_data.get_payment_attempt(),\n payment_data.get_payment_intent(),\n payment_data.get_payment_method_data(),\n payment_data.get_address(),\n None,\n payment_data.get_currency(),\n );\n\n let decided_connector = decide_connector(\n state.clone(),\n merchant_context,\n business_profile,\n &mut routing_data,\n payment_dsl_input,\n mandate_type,\n )\n .await?;\n\n payment_data.set_connector_in_payment_attempt(routing_data.routed_through);\n\n payment_data.set_merchant_connector_id_in_attempt(routing_data.merchant_connector_id);\n\n Ok(decided_connector)\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_payment_intent_profile_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> {\n Some(&self.payment_intent.profile_id)\n }", + "after_code": "fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> {\n Some(&self.payment_intent.profile_id)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::connector_service_decider", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn connector_service_decider(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n business_profile: &domain::Profile,\n return_raw_connector_response: Option,\n merchant_connector_account_type_details: domain::MerchantConnectorAccountTypeDetails,\n) -> RouterResult>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n let mut router_data = payment_data\n .construct_router_data(\n state,\n connector.connector.id(),\n merchant_context,\n &None,\n &merchant_connector_account_type_details,\n None,\n Some(header_payload.clone()),\n )\n .await?;\n\n // do order creation\n let (execution_path, updated_state) = should_call_unified_connector_service(\n state,\n merchant_context,\n &router_data,\n Some(payment_data),\n call_connector_action.clone(),\n None,\n )\n .await?;\n\n let (connector_request, should_continue_further) =\n if matches!(execution_path, ExecutionPath::Direct) {\n let mut should_continue_further = true;\n\n let should_continue = match router_data\n .create_order_at_connector(state, &connector, should_continue_further)\n .await?\n {\n Some(create_order_response) => {\n if let Ok(order_id) = create_order_response.clone().create_order_result {\n payment_data.set_connector_response_reference_id(Some(order_id))\n }\n\n // Set the response in routerdata response to carry forward\n router_data.update_router_data_with_create_order_response(\n create_order_response.clone(),\n );\n create_order_response.create_order_result.ok().map(|_| ())\n }\n // If create order is not required, then we can proceed with further processing\n None => Some(()),\n };\n\n let should_continue: (Option, bool) =\n match should_continue {\n Some(_) => {\n router_data\n .build_flow_specific_connector_request(\n state,\n &connector,\n call_connector_action.clone(),\n )\n .await?\n }\n None => (None, false),\n };\n should_continue\n } else {\n // If unified connector service is called, these values are not used\n // as the request is built in the unified connector service call\n (None, false)\n };\n\n (_, *payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data.clone(),\n None, // customer is not used in internal flows\n merchant_context.get_merchant_account().storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n None, // frm_suggestion is not used in internal flows\n header_payload.clone(),\n )\n .await?;\n\n record_time_taken_with(|| async {\n if matches!(execution_path, ExecutionPath::UnifiedConnectorService) {\n router_env::logger::info!(\n \"Processing payment through UCS gateway system- payment_id={}, attempt_id={}\",\n payment_data.get_payment_intent().id.get_string_repr(),\n payment_data.get_payment_attempt().id.get_string_repr()\n );\n let lineage_ids = grpc_client::LineageIds::new(business_profile.merchant_id.clone(), business_profile.get_id().clone());\n\n // Extract merchant_order_reference_id from payment data for UCS audit trail\n let merchant_order_reference_id = payment_data.get_payment_intent().merchant_reference_id\n .clone()\n .map(|id| id.get_string_repr().to_string());\n let creds_identifier = payment_data.get_creds_identifier().map(str::to_owned);\n\n router_data\n .call_unified_connector_service(\n state,\n &header_payload,\n lineage_ids,\n merchant_connector_account_type_details.clone(),\n merchant_context,\n &connector,\n ExecutionMode::Primary, // UCS is called in primary mode\n merchant_order_reference_id,\n call_connector_action,\n creds_identifier,\n )\n .await?;\n\n Ok(router_data)\n } else {\n Err(\n errors::ApiErrorResponse::InternalServerError\n )\n .attach_printable(\"Unified connector service is down and traditional connector service fallback is not implemented\")\n }\n })\n .await\n}", + "after_code": "pub async fn connector_service_decider(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n business_profile: &domain::Profile,\n return_raw_connector_response: Option,\n merchant_connector_account_type_details: domain::MerchantConnectorAccountTypeDetails,\n) -> RouterResult>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n let mut router_data = payment_data\n .construct_router_data(\n state,\n connector.connector.id(),\n merchant_context,\n &None,\n &merchant_connector_account_type_details,\n None,\n Some(header_payload.clone()),\n )\n .await?;\n\n // do order creation\n let (execution_path, updated_state) = should_call_unified_connector_service(\n state,\n merchant_context,\n &router_data,\n Some(payment_data),\n call_connector_action.clone(),\n None,\n )\n .await?;\n\n let (connector_request, should_continue_further) =\n if matches!(execution_path, ExecutionPath::Direct) {\n let mut should_continue_further = true;\n\n let should_continue = match router_data\n .create_order_at_connector(state, &connector, should_continue_further)\n .await?\n {\n Some(create_order_response) => {\n if let Ok(order_id) = create_order_response.clone().create_order_result {\n payment_data.set_connector_response_reference_id(Some(order_id))\n }\n\n // Set the response in routerdata response to carry forward\n router_data.update_router_data_with_create_order_response(\n create_order_response.clone(),\n );\n create_order_response.create_order_result.ok().map(|_| ())\n }\n // If create order is not required, then we can proceed with further processing\n None => Some(()),\n };\n\n let should_continue: (Option, bool) =\n match should_continue {\n Some(_) => {\n router_data\n .build_flow_specific_connector_request(\n state,\n &connector,\n call_connector_action.clone(),\n )\n .await?\n }\n None => (None, false),\n };\n should_continue\n } else {\n // If unified connector service is called, these values are not used\n // as the request is built in the unified connector service call\n (None, false)\n };\n\n (_, *payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data.clone(),\n None, // customer is not used in internal flows\n merchant_context.get_merchant_account().storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n None, // frm_suggestion is not used in internal flows\n header_payload.clone(),\n )\n .await?;\n\n record_time_taken_with(|| async {\n if matches!(execution_path, ExecutionPath::UnifiedConnectorService) {\n router_env::logger::info!(\n \"Processing payment through UCS gateway system- payment_id={}, attempt_id={}\",\n payment_data.get_payment_intent().id.get_string_repr(),\n payment_data.get_payment_attempt().id.get_string_repr()\n );\n let lineage_ids = grpc_client::LineageIds::new(business_profile.merchant_id.clone(), business_profile.get_id().clone());\n\n // Extract merchant_order_reference_id from payment data for UCS audit trail\n let merchant_order_reference_id = payment_data.get_payment_intent().merchant_reference_id\n .clone()\n .map(|id| id.get_string_repr().to_string());\n let creds_identifier = payment_data.get_creds_identifier().map(str::to_owned);\n\n router_data\n .call_unified_connector_service(\n state,\n &header_payload,\n lineage_ids,\n merchant_connector_account_type_details.clone(),\n merchant_context,\n &connector,\n ExecutionMode::Primary, // UCS is called in primary mode\n merchant_order_reference_id,\n call_connector_action,\n creds_identifier,\n )\n .await?;\n\n Ok(router_data)\n } else {\n Err(\n errors::ApiErrorResponse::InternalServerError\n )\n .attach_printable(\"Unified connector service is down and traditional connector service fallback is not implemented\")\n }\n })\n .await\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use external_services::grpc_client;" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use external_services::grpc_client;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_mandate_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_mandate_id(&self) -> Option<&payments_api::MandateIds> {\n todo!()\n }", + "after_code": "fn get_mandate_id(&self) -> Option<&payments_api::MandateIds> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::Multitenancy::function::get_tenants", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn get_tenants(&self) -> &HashMap {\n &self.tenants.0\n }", + "after_code": "pub fn get_tenants(&self) -> &HashMap {\n &self.tenants.0\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::collections::{HashMap, HashSet};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::hashset_deserialization_test::function::test_payment_method_hashset_deserializer_error", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn test_payment_method_hashset_deserializer_error() {\n use diesel_models::enums::PaymentMethod;\n\n let deserializer: StrDeserializer<'_, ValueError> =\n \"wallet, card, unknown\".into_deserializer();\n let payment_methods = deserialize_hashset::<'_, _, PaymentMethod>(deserializer);\n\n assert!(payment_methods.is_err());\n }", + "after_code": "fn test_payment_method_hashset_deserializer_error() {\n use diesel_models::enums::PaymentMethod;\n\n let deserializer: StrDeserializer<'_, ValueError> =\n \"wallet, card, unknown\".into_deserializer();\n let payment_methods = deserialize_hashset::<'_, _, PaymentMethod>(deserializer);\n\n assert!(payment_methods.is_err());\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use super::deserialize_hashset;", + "use serde::de::Error;", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use super::deserialize_hashset;", + "use serde::de::Error;", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_payment_filters", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn get_payment_filters(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n profile_id_list: Option>,\n) -> RouterResponse {\n let merchant_connector_accounts = if let services::ApplicationResponse::Json(data) =\n super::admin::list_payment_connectors(\n state,\n merchant_context.get_merchant_account().get_id().to_owned(),\n profile_id_list,\n )\n .await?\n {\n data\n } else {\n return Err(errors::ApiErrorResponse::InternalServerError.into());\n };\n\n let mut connector_map: HashMap> = HashMap::new();\n let mut payment_method_types_map: HashMap<\n enums::PaymentMethod,\n HashSet,\n > = HashMap::new();\n\n // populate connector map\n merchant_connector_accounts\n .iter()\n .filter_map(|merchant_connector_account| {\n merchant_connector_account\n .connector_label\n .as_ref()\n .map(|label| {\n let info = merchant_connector_account.to_merchant_connector_info(label);\n (merchant_connector_account.get_connector_name(), info)\n })\n })\n .for_each(|(connector_name, info)| {\n connector_map\n .entry(connector_name.to_string())\n .or_default()\n .push(info);\n });\n\n // populate payment method type map\n merchant_connector_accounts\n .iter()\n .flat_map(|merchant_connector_account| {\n merchant_connector_account.payment_methods_enabled.as_ref()\n })\n .map(|payment_methods_enabled| {\n payment_methods_enabled\n .iter()\n .filter_map(|payment_method_enabled| {\n payment_method_enabled\n .get_payment_method_type()\n .map(|types_vec| {\n (\n payment_method_enabled.get_payment_method(),\n types_vec.clone(),\n )\n })\n })\n })\n .for_each(|payment_methods_enabled| {\n payment_methods_enabled.for_each(\n |(payment_method_option, payment_method_types_vec)| {\n if let Some(payment_method) = payment_method_option {\n payment_method_types_map\n .entry(payment_method)\n .or_default()\n .extend(payment_method_types_vec.iter().filter_map(\n |req_payment_method_types| {\n req_payment_method_types.get_payment_method_type()\n },\n ));\n }\n },\n );\n });\n\n Ok(services::ApplicationResponse::Json(\n api::PaymentListFiltersV2 {\n connector: connector_map,\n currency: enums::Currency::iter().collect(),\n status: enums::IntentStatus::iter().collect(),\n payment_method: payment_method_types_map,\n authentication_type: enums::AuthenticationType::iter().collect(),\n card_network: enums::CardNetwork::iter().collect(),\n card_discovery: enums::CardDiscovery::iter().collect(),\n },\n ))\n}", + "after_code": "pub async fn get_payment_filters(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n profile_id_list: Option>,\n) -> RouterResponse {\n let merchant_connector_accounts = if let services::ApplicationResponse::Json(data) =\n super::admin::list_payment_connectors(\n state,\n merchant_context.get_merchant_account().get_id().to_owned(),\n profile_id_list,\n )\n .await?\n {\n data\n } else {\n return Err(errors::ApiErrorResponse::InternalServerError.into());\n };\n\n let mut connector_map: HashMap> = HashMap::new();\n let mut payment_method_types_map: HashMap<\n enums::PaymentMethod,\n HashSet,\n > = HashMap::new();\n\n // populate connector map\n merchant_connector_accounts\n .iter()\n .filter_map(|merchant_connector_account| {\n merchant_connector_account\n .connector_label\n .as_ref()\n .map(|label| {\n let info = merchant_connector_account.to_merchant_connector_info(label);\n (merchant_connector_account.get_connector_name(), info)\n })\n })\n .for_each(|(connector_name, info)| {\n connector_map\n .entry(connector_name.to_string())\n .or_default()\n .push(info);\n });\n\n // populate payment method type map\n merchant_connector_accounts\n .iter()\n .flat_map(|merchant_connector_account| {\n merchant_connector_account.payment_methods_enabled.as_ref()\n })\n .map(|payment_methods_enabled| {\n payment_methods_enabled\n .iter()\n .filter_map(|payment_method_enabled| {\n payment_method_enabled\n .get_payment_method_type()\n .map(|types_vec| {\n (\n payment_method_enabled.get_payment_method(),\n types_vec.clone(),\n )\n })\n })\n })\n .for_each(|payment_methods_enabled| {\n payment_methods_enabled.for_each(\n |(payment_method_option, payment_method_types_vec)| {\n if let Some(payment_method) = payment_method_option {\n payment_method_types_map\n .entry(payment_method)\n .or_default()\n .extend(payment_method_types_vec.iter().filter_map(\n |req_payment_method_types| {\n req_payment_method_types.get_payment_method_type()\n },\n ));\n }\n },\n );\n });\n\n Ok(services::ApplicationResponse::Json(\n api::PaymentListFiltersV2 {\n connector: connector_map,\n currency: enums::Currency::iter().collect(),\n status: enums::IntentStatus::iter().collect(),\n payment_method: payment_method_types_map,\n authentication_type: enums::AuthenticationType::iter().collect(),\n card_network: enums::CardNetwork::iter().collect(),\n card_discovery: enums::CardDiscovery::iter().collect(),\n },\n ))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use api_models::admin::MerchantConnectorInfo;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ], + "after_imports": [ + "use api_models::admin::MerchantConnectorInfo;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::DefaultExchangeRates", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct DefaultExchangeRates {\n pub base_currency: String,\n pub conversion: HashMap,\n pub timestamp: i64,\n}", + "after_code": "pub struct DefaultExchangeRates {\n pub base_currency: String,\n pub conversion: HashMap,\n pub timestamp: i64,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::collections::{HashMap, HashSet};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_card_brands_based_on_active_merchant_connector_account", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn get_card_brands_based_on_active_merchant_connector_account(\n state: &SessionState,\n profile_id: &id_type::ProfileId,\n key_store: &domain::MerchantKeyStore,\n) -> RouterResult> {\n let key_manager_state = &(state).into();\n let merchant_configured_payment_connectors = state\n .store\n .list_enabled_connector_accounts_by_profile_id(\n key_manager_state,\n profile_id,\n key_store,\n common_enums::ConnectorType::PaymentProcessor,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"error when fetching merchant connector accounts\")?;\n\n let payment_connectors_eligible_for_click_to_pay =\n state.conf.authentication_providers.click_to_pay.clone();\n\n let filtered_payment_connector_accounts: Vec<\n hyperswitch_domain_models::merchant_connector_account::MerchantConnectorAccount,\n > = merchant_configured_payment_connectors\n .into_iter()\n .filter(|account| {\n enums::Connector::from_str(&account.connector_name)\n .ok()\n .map(|connector| payment_connectors_eligible_for_click_to_pay.contains(&connector))\n .unwrap_or(false)\n })\n .collect();\n\n let mut card_brands = HashSet::new();\n\n for account in filtered_payment_connector_accounts {\n if let Some(values) = &account.payment_methods_enabled {\n for val in values {\n let payment_methods_enabled: api_models::admin::PaymentMethodsEnabled =\n serde_json::from_value(val.peek().to_owned()).inspect_err(|err| {\n logger::error!(\"Failed to parse Payment methods enabled data set from dashboard because {}\", err)\n })\n .change_context(errors::ApiErrorResponse::InternalServerError)?;\n if let Some(payment_method_types) = payment_methods_enabled.payment_method_types {\n for payment_method_type in payment_method_types {\n if let Some(networks) = payment_method_type.card_networks {\n card_brands.extend(networks);\n }\n }\n }\n }\n }\n }\n Ok(card_brands)\n}", + "after_code": "async fn get_card_brands_based_on_active_merchant_connector_account(\n state: &SessionState,\n profile_id: &id_type::ProfileId,\n key_store: &domain::MerchantKeyStore,\n) -> RouterResult> {\n let key_manager_state = &(state).into();\n let merchant_configured_payment_connectors = state\n .store\n .list_enabled_connector_accounts_by_profile_id(\n key_manager_state,\n profile_id,\n key_store,\n common_enums::ConnectorType::PaymentProcessor,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"error when fetching merchant connector accounts\")?;\n\n let payment_connectors_eligible_for_click_to_pay =\n state.conf.authentication_providers.click_to_pay.clone();\n\n let filtered_payment_connector_accounts: Vec<\n hyperswitch_domain_models::merchant_connector_account::MerchantConnectorAccount,\n > = merchant_configured_payment_connectors\n .into_iter()\n .filter(|account| {\n enums::Connector::from_str(&account.connector_name)\n .ok()\n .map(|connector| payment_connectors_eligible_for_click_to_pay.contains(&connector))\n .unwrap_or(false)\n })\n .collect();\n\n let mut card_brands = HashSet::new();\n\n for account in filtered_payment_connector_accounts {\n if let Some(values) = &account.payment_methods_enabled {\n for val in values {\n let payment_methods_enabled: api_models::admin::PaymentMethodsEnabled =\n serde_json::from_value(val.peek().to_owned()).inspect_err(|err| {\n logger::error!(\"Failed to parse Payment methods enabled data set from dashboard because {}\", err)\n })\n .change_context(errors::ApiErrorResponse::InternalServerError)?;\n if let Some(payment_method_types) = payment_methods_enabled.payment_method_types {\n for payment_method_type in payment_method_types {\n if let Some(networks) = payment_method_type.card_networks {\n card_brands.extend(networks);\n }\n }\n }\n }\n }\n }\n Ok(card_brands)\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::ApiKeys::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/api_keys/{merchant_id}\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(api_keys::api_key_create)))\n .service(web::resource(\"/list\").route(web::get().to(api_keys::api_key_list)))\n .service(\n web::resource(\"/{key_id}\")\n .route(web::get().to(api_keys::api_key_retrieve))\n .route(web::post().to(api_keys::api_key_update))\n .route(web::delete().to(api_keys::api_key_revoke)),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/api_keys/{merchant_id}\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(api_keys::api_key_create)))\n .service(web::resource(\"/list\").route(web::get().to(api_keys::api_key_list)))\n .service(\n web::resource(\"/{key_id}\")\n .route(web::get().to(api_keys::api_key_retrieve))\n .route(web::post().to(api_keys::api_key_update))\n .route(web::delete().to(api_keys::api_key_revoke)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::EligibilityHandler::function::new", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn new(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n payment_eligibility_data: PaymentEligibilityData,\n business_profile: domain::Profile,\n ) -> Self {\n Self {\n state,\n merchant_context,\n payment_eligibility_data,\n business_profile,\n }\n }", + "after_code": "fn new(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n payment_eligibility_data: PaymentEligibilityData,\n business_profile: domain::Profile,\n ) -> Self {\n Self {\n state,\n merchant_context,\n payment_eligibility_data,\n business_profile,\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_token(&self) -> Option<&str> {\n todo!()\n }", + "after_code": "fn get_token(&self) -> Option<&str> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::EligibilityHandler::function::run_check", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn run_check(\n &self,\n check: C,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let should_run = check\n .should_run(&self.state, &self.merchant_context)\n .await?;\n Ok(match should_run {\n true => check\n .execute_check(\n &self.state,\n &self.merchant_context,\n &self.payment_eligibility_data,\n &self.business_profile,\n )\n .await\n .map(C::transform)?,\n false => None,\n })\n }", + "after_code": "async fn run_check(\n &self,\n check: C,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let should_run = check\n .should_run(&self.state, &self.merchant_context)\n .await?;\n Ok(match should_run {\n true => check\n .execute_check(\n &self.state,\n &self.merchant_context,\n &self.payment_eligibility_data,\n &self.business_profile,\n )\n .await\n .map(C::transform)?,\n false => None,\n })\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_connector_in_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_in_payment_attempt(&mut self, _connector: Option) {\n todo!()\n }", + "after_code": "fn set_connector_in_payment_attempt(&mut self, _connector: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Chat", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Chat;", + "after_code": "pub struct Chat;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::function::create_email_client", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn create_email_client(\n settings: &settings::Settings,\n) -> Box {\n match &settings.email.client_config {\n EmailClientConfigs::Ses { aws_ses } => Box::new(\n AwsSes::create(\n &settings.email,\n aws_ses,\n settings.proxy.https_url.to_owned(),\n )\n .await,\n ),\n EmailClientConfigs::Smtp { smtp } => {\n Box::new(SmtpServer::create(&settings.email, smtp.clone()).await)\n }\n EmailClientConfigs::NoEmailClient => Box::new(NoEmailClient::create().await),\n }\n}", + "after_code": "pub async fn create_email_client(\n settings: &settings::Settings,\n) -> Box {\n match &settings.email.client_config {\n EmailClientConfigs::Ses { aws_ses } => Box::new(\n AwsSes::create(\n &settings.email,\n aws_ses,\n settings.proxy.https_url.to_owned(),\n )\n .await,\n ),\n EmailClientConfigs::Smtp { smtp } => {\n Box::new(SmtpServer::create(&settings.email, smtp.clone()).await)\n }\n EmailClientConfigs::NoEmailClient => Box::new(NoEmailClient::create().await),\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::proxy;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::proxy;" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::Secrets", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Secrets {\n pub jwt_secret: Secret,\n pub admin_api_key: Secret,\n pub master_enc_key: Secret,\n}", + "after_code": "pub struct Secrets {\n pub jwt_secret: Secret,\n pub admin_api_key: Secret,\n pub master_enc_key: Secret,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::Settings", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Settings {\n pub server: Server,\n pub proxy: Proxy,\n pub env: Env,\n pub chat: SecretStateContainer,\n pub master_database: SecretStateContainer,\n #[cfg(feature = \"olap\")]\n pub replica_database: SecretStateContainer,\n pub redis: RedisSettings,\n pub log: Log,\n pub secrets: SecretStateContainer,\n pub fallback_merchant_ids_api_key_auth: Option,\n pub locker: Locker,\n pub key_manager: SecretStateContainer,\n pub connectors: Connectors,\n pub forex_api: SecretStateContainer,\n pub refund: Refund,\n pub eph_key: EphemeralConfig,\n pub scheduler: Option,\n #[cfg(feature = \"kv_store\")]\n pub drainer: DrainerSettings,\n pub jwekey: SecretStateContainer,\n pub webhooks: WebhooksSettings,\n pub pm_filters: ConnectorFilters,\n pub bank_config: BankRedirectConfig,\n pub api_keys: SecretStateContainer,\n pub file_storage: FileStorageConfig,\n pub encryption_management: EncryptionManagementConfig,\n pub secrets_management: SecretsManagementConfig,\n pub tokenization: TokenizationConfig,\n pub connector_customer: ConnectorCustomer,\n #[cfg(feature = \"dummy_connector\")]\n pub dummy_connector: DummyConnector,\n #[cfg(feature = \"email\")]\n pub email: EmailSettings,\n pub user: UserSettings,\n pub crm: CrmManagerConfig,\n pub cors: CorsSettings,\n pub mandates: Mandates,\n pub zero_mandates: ZeroMandates,\n pub network_transaction_id_supported_connectors: NetworkTransactionIdSupportedConnectors,\n pub list_dispute_supported_connectors: ListDiputeSupportedConnectors,\n pub required_fields: RequiredFields,\n pub delayed_session_response: DelayedSessionConfig,\n pub webhook_source_verification_call: WebhookSourceVerificationCall,\n pub billing_connectors_payment_sync: BillingConnectorPaymentsSyncCall,\n pub billing_connectors_invoice_sync: BillingConnectorInvoiceSyncCall,\n pub payment_method_auth: SecretStateContainer,\n pub connector_request_reference_id_config: ConnectorRequestReferenceIdConfig,\n #[cfg(feature = \"payouts\")]\n pub payouts: Payouts,\n pub payout_method_filters: ConnectorFilters,\n pub l2_l3_data_config: L2L3DataConfig,\n pub debit_routing_config: DebitRoutingConfig,\n pub applepay_decrypt_keys: SecretStateContainer,\n pub paze_decrypt_keys: Option>,\n pub google_pay_decrypt_keys: Option,\n pub multiple_api_version_supported_connectors: MultipleApiVersionSupportedConnectors,\n pub applepay_merchant_configs: SecretStateContainer,\n pub lock_settings: LockSettings,\n pub temp_locker_enable_config: TempLockerEnableConfig,\n pub generic_link: GenericLink,\n pub payment_link: PaymentLink,\n #[cfg(feature = \"olap\")]\n pub analytics: SecretStateContainer,\n #[cfg(feature = \"kv_store\")]\n pub kv_config: KvConfig,\n #[cfg(feature = \"frm\")]\n pub frm: Frm,\n #[cfg(feature = \"olap\")]\n pub report_download_config: ReportConfig,\n #[cfg(feature = \"olap\")]\n pub opensearch: OpenSearchConfig,\n pub events: EventsConfig,\n #[cfg(feature = \"olap\")]\n pub connector_onboarding: SecretStateContainer,\n pub unmasked_headers: UnmaskedHeaders,\n pub multitenancy: Multitenancy,\n pub saved_payment_methods: EligiblePaymentMethods,\n pub user_auth_methods: SecretStateContainer,\n pub decision: Option,\n pub locker_based_open_banking_connectors: LockerBasedRecipientConnectorList,\n pub grpc_client: GrpcClientSettings,\n #[cfg(feature = \"v2\")]\n pub cell_information: CellInformation,\n pub network_tokenization_supported_card_networks: NetworkTokenizationSupportedCardNetworks,\n pub network_tokenization_service: Option>,\n pub network_tokenization_supported_connectors: NetworkTokenizationSupportedConnectors,\n pub theme: ThemeSettings,\n pub platform: Platform,\n pub authentication_providers: AuthenticationProviders,\n pub open_router: OpenRouter,\n #[cfg(feature = \"v2\")]\n pub revenue_recovery: revenue_recovery::RevenueRecoverySettings,\n pub clone_connector_allowlist: Option,\n pub merchant_id_auth: MerchantIdAuthSettings,\n pub internal_merchant_id_profile_id_auth: InternalMerchantIdProfileIdAuthSettings,\n #[serde(default)]\n pub infra_values: Option>,\n #[serde(default)]\n pub enhancement: Option>,\n pub superposition: SecretStateContainer,\n pub proxy_status_mapping: ProxyStatusMapping,\n pub internal_services: InternalServicesConfig,\n pub comparison_service: Option,\n}", + "after_code": "pub struct Settings {\n pub server: Server,\n pub proxy: Proxy,\n pub env: Env,\n pub chat: SecretStateContainer,\n pub master_database: SecretStateContainer,\n #[cfg(feature = \"olap\")]\n pub replica_database: SecretStateContainer,\n pub redis: RedisSettings,\n pub log: Log,\n pub secrets: SecretStateContainer,\n pub fallback_merchant_ids_api_key_auth: Option,\n pub locker: Locker,\n pub key_manager: SecretStateContainer,\n pub connectors: Connectors,\n pub forex_api: SecretStateContainer,\n pub refund: Refund,\n pub eph_key: EphemeralConfig,\n pub scheduler: Option,\n #[cfg(feature = \"kv_store\")]\n pub drainer: DrainerSettings,\n pub jwekey: SecretStateContainer,\n pub webhooks: WebhooksSettings,\n pub pm_filters: ConnectorFilters,\n pub bank_config: BankRedirectConfig,\n pub api_keys: SecretStateContainer,\n pub file_storage: FileStorageConfig,\n pub encryption_management: EncryptionManagementConfig,\n pub secrets_management: SecretsManagementConfig,\n pub tokenization: TokenizationConfig,\n pub connector_customer: ConnectorCustomer,\n #[cfg(feature = \"dummy_connector\")]\n pub dummy_connector: DummyConnector,\n #[cfg(feature = \"email\")]\n pub email: EmailSettings,\n pub user: UserSettings,\n pub crm: CrmManagerConfig,\n pub cors: CorsSettings,\n pub mandates: Mandates,\n pub zero_mandates: ZeroMandates,\n pub network_transaction_id_supported_connectors: NetworkTransactionIdSupportedConnectors,\n pub list_dispute_supported_connectors: ListDiputeSupportedConnectors,\n pub required_fields: RequiredFields,\n pub delayed_session_response: DelayedSessionConfig,\n pub webhook_source_verification_call: WebhookSourceVerificationCall,\n pub billing_connectors_payment_sync: BillingConnectorPaymentsSyncCall,\n pub billing_connectors_invoice_sync: BillingConnectorInvoiceSyncCall,\n pub payment_method_auth: SecretStateContainer,\n pub connector_request_reference_id_config: ConnectorRequestReferenceIdConfig,\n #[cfg(feature = \"payouts\")]\n pub payouts: Payouts,\n pub payout_method_filters: ConnectorFilters,\n pub l2_l3_data_config: L2L3DataConfig,\n pub debit_routing_config: DebitRoutingConfig,\n pub applepay_decrypt_keys: SecretStateContainer,\n pub paze_decrypt_keys: Option>,\n pub google_pay_decrypt_keys: Option,\n pub multiple_api_version_supported_connectors: MultipleApiVersionSupportedConnectors,\n pub applepay_merchant_configs: SecretStateContainer,\n pub lock_settings: LockSettings,\n pub temp_locker_enable_config: TempLockerEnableConfig,\n pub generic_link: GenericLink,\n pub payment_link: PaymentLink,\n #[cfg(feature = \"olap\")]\n pub analytics: SecretStateContainer,\n #[cfg(feature = \"kv_store\")]\n pub kv_config: KvConfig,\n #[cfg(feature = \"frm\")]\n pub frm: Frm,\n #[cfg(feature = \"olap\")]\n pub report_download_config: ReportConfig,\n #[cfg(feature = \"olap\")]\n pub opensearch: OpenSearchConfig,\n pub events: EventsConfig,\n #[cfg(feature = \"olap\")]\n pub connector_onboarding: SecretStateContainer,\n pub unmasked_headers: UnmaskedHeaders,\n pub multitenancy: Multitenancy,\n pub saved_payment_methods: EligiblePaymentMethods,\n pub user_auth_methods: SecretStateContainer,\n pub decision: Option,\n pub locker_based_open_banking_connectors: LockerBasedRecipientConnectorList,\n pub grpc_client: GrpcClientSettings,\n #[cfg(feature = \"v2\")]\n pub cell_information: CellInformation,\n pub network_tokenization_supported_card_networks: NetworkTokenizationSupportedCardNetworks,\n pub network_tokenization_service: Option>,\n pub network_tokenization_supported_connectors: NetworkTokenizationSupportedConnectors,\n pub theme: ThemeSettings,\n pub platform: Platform,\n pub authentication_providers: AuthenticationProviders,\n pub open_router: OpenRouter,\n #[cfg(feature = \"v2\")]\n pub revenue_recovery: revenue_recovery::RevenueRecoverySettings,\n pub clone_connector_allowlist: Option,\n pub merchant_id_auth: MerchantIdAuthSettings,\n pub internal_merchant_id_profile_id_auth: InternalMerchantIdProfileIdAuthSettings,\n #[serde(default)]\n pub infra_values: Option>,\n #[serde(default)]\n pub enhancement: Option>,\n pub superposition: SecretStateContainer,\n pub proxy_status_mapping: ProxyStatusMapping,\n pub internal_services: InternalServicesConfig,\n pub comparison_service: Option,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use router_env::config::{Log, LogConsole, LogFile, LogTelemetry};", + "use redis_interface::RedisSettings;", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "use crate::analytics::{AnalyticsConfig, AnalyticsProvider};", + "use scheduler::SchedulerSettings;", + "use config::{Environment, File};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use external_services::email::EmailSettings;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use crate::types::storage::revenue_recovery;" + ], + "after_imports": [ + "pub use router_env::config::{Log, LogConsole, LogFile, LogTelemetry};", + "use redis_interface::RedisSettings;", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "use crate::analytics::{AnalyticsConfig, AnalyticsProvider};", + "use scheduler::SchedulerSettings;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use config::{Environment, File};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use external_services::email::EmailSettings;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use crate::types::storage::revenue_recovery;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_payment_method_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_token(&self) -> Option<&PaymentMethodToken> {\n todo!()\n }", + "after_code": "fn get_payment_method_token(&self) -> Option<&PaymentMethodToken> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::internal_call_connector_service_prerequisites", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn internal_call_connector_service_prerequisites(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n business_profile: &domain::Profile,\n) -> RouterResult<(\n domain::MerchantConnectorAccountTypeDetails,\n RouterData,\n)>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n let merchant_connector_details =\n payment_data\n .get_merchant_connector_details()\n .ok_or_else(|| {\n error_stack::report!(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Merchant connector details not found in payment data\")\n })?;\n let merchant_connector_account =\n domain::MerchantConnectorAccountTypeDetails::MerchantConnectorDetails(\n merchant_connector_details,\n );\n\n operation\n .to_domain()?\n .populate_payment_data(\n state,\n payment_data,\n merchant_context,\n business_profile,\n &connector,\n )\n .await?;\n\n let router_data = payment_data\n .construct_router_data(\n state,\n connector.connector.id(),\n merchant_context,\n &None,\n &merchant_connector_account,\n None,\n None,\n )\n .await?;\n\n Ok((merchant_connector_account, router_data))\n}", + "after_code": "pub async fn internal_call_connector_service_prerequisites(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n business_profile: &domain::Profile,\n) -> RouterResult<(\n domain::MerchantConnectorAccountTypeDetails,\n RouterData,\n)>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n let merchant_connector_details =\n payment_data\n .get_merchant_connector_details()\n .ok_or_else(|| {\n error_stack::report!(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Merchant connector details not found in payment data\")\n })?;\n let merchant_connector_account =\n domain::MerchantConnectorAccountTypeDetails::MerchantConnectorDetails(\n merchant_connector_details,\n );\n\n operation\n .to_domain()?\n .populate_payment_data(\n state,\n payment_data,\n merchant_context,\n business_profile,\n &connector,\n )\n .await?;\n\n let router_data = payment_data\n .construct_router_data(\n state,\n connector.connector.id(),\n merchant_context,\n &None,\n &merchant_connector_account,\n None,\n None,\n )\n .await?;\n\n Ok((merchant_connector_account, router_data))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use error_stack::{report, ResultExt};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use error_stack::{report, ResultExt};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_billing_address", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_billing_address(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_billing_address(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/authorize_flow.rs::types::PaymentsAuthorizeRouterData::function::decide_flows", + "file": "crates/router/src/core/payments/flows/authorize_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "async fn decide_flows<'a>(\n mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n business_profile: &domain::Profile,\n header_payload: domain_payments::HeaderPayload,\n return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::Authorize,\n types::PaymentsAuthorizeData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n if self.should_proceed_with_authorize() {\n self.decide_authentication_type();\n logger::debug!(auth_type=?self.auth_type);\n let mut auth_router_data = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action.clone(),\n connector_request,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n\n // Initiating Integrity check\n let integrity_result = helpers::check_integrity_based_on_flow(\n &auth_router_data.request,\n &auth_router_data.response,\n );\n auth_router_data.integrity_check = integrity_result;\n metrics::PAYMENT_COUNT.add(1, &[]); // Move outside of the if block\n match auth_router_data.response.clone() {\n Err(_) => Ok(auth_router_data),\n Ok(authorize_response) => {\n // Check if the Capture API should be called based on the connector and other parameters\n if super::should_initiate_capture_flow(\n &connector.connector_name,\n self.request.customer_acceptance,\n self.request.capture_method,\n self.request.setup_future_usage,\n auth_router_data.status,\n ) {\n auth_router_data = Box::pin(process_capture_flow(\n auth_router_data,\n authorize_response,\n state,\n connector,\n call_connector_action.clone(),\n business_profile,\n header_payload,\n ))\n .await?;\n }\n Ok(auth_router_data)\n }\n }\n } else {\n Ok(self.clone())\n }\n }", + "after_code": "async fn decide_flows<'a>(\n mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n business_profile: &domain::Profile,\n header_payload: domain_payments::HeaderPayload,\n return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::Authorize,\n types::PaymentsAuthorizeData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n if self.should_proceed_with_authorize() {\n self.decide_authentication_type();\n logger::debug!(auth_type=?self.auth_type);\n let mut auth_router_data = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action.clone(),\n connector_request,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n\n // Initiating Integrity check\n let integrity_result = helpers::check_integrity_based_on_flow(\n &auth_router_data.request,\n &auth_router_data.response,\n );\n auth_router_data.integrity_check = integrity_result;\n metrics::PAYMENT_COUNT.add(1, &[]); // Move outside of the if block\n match auth_router_data.response.clone() {\n Err(_) => Ok(auth_router_data),\n Ok(authorize_response) => {\n // Check if the Capture API should be called based on the connector and other parameters\n if super::should_initiate_capture_flow(\n &connector.connector_name,\n self.request.customer_acceptance,\n self.request.capture_method,\n self.request.setup_future_usage,\n auth_router_data.status,\n ) {\n auth_router_data = Box::pin(process_capture_flow(\n auth_router_data,\n authorize_response,\n state,\n connector,\n call_connector_action.clone(),\n business_profile,\n header_payload,\n ))\n .await?;\n }\n Ok(auth_router_data)\n }\n }\n } else {\n Ok(self.clone())\n }\n }", + "diff_span": { + "before": "", + "after": " header_payload: domain_payments::HeaderPayload,\n return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_multiple_capture_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData> {\n self.multiple_capture_data.as_ref()\n }", + "after_code": "fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData> {\n self.multiple_capture_data.as_ref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_payment_method_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }", + "after_code": "fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_mandate_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails> {\n self.mandate_connector.as_ref()\n }", + "after_code": "fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails> {\n self.mandate_connector.as_ref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::mod::tokenization", + "file": "crates/router/src/core/payments.rs", + "kind": "mod_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub mod tokenization;", + "after_code": "pub mod tokenization;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::GenericLink", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct GenericLink {\n pub payment_method_collect: GenericLinkEnvConfig,\n pub payout_link: GenericLinkEnvConfig,\n}", + "after_code": "pub struct GenericLink {\n pub payment_method_collect: GenericLinkEnvConfig,\n pub payout_link: GenericLinkEnvConfig,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/routes/app.rs::PaymentLink::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/payment_link\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/list\").route(web::post().to(payment_link::payments_link_list)))\n .service(\n web::resource(\"/{payment_link_id}\")\n .route(web::get().to(payment_link::payment_link_retrieve)),\n )\n .service(\n web::resource(\"{merchant_id}/{payment_id}\")\n .route(web::get().to(payment_link::initiate_payment_link)),\n )\n .service(\n web::resource(\"s/{merchant_id}/{payment_id}\")\n .route(web::get().to(payment_link::initiate_secure_payment_link)),\n )\n .service(\n web::resource(\"status/{merchant_id}/{payment_id}\")\n .route(web::get().to(payment_link::payment_link_status)),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/payment_link\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/list\").route(web::post().to(payment_link::payments_link_list)))\n .service(\n web::resource(\"/{payment_link_id}\")\n .route(web::get().to(payment_link::payment_link_retrieve)),\n )\n .service(\n web::resource(\"{merchant_id}/{payment_id}\")\n .route(web::get().to(payment_link::initiate_payment_link)),\n )\n .service(\n web::resource(\"s/{merchant_id}/{payment_id}\")\n .route(web::get().to(payment_link::initiate_secure_payment_link)),\n )\n .service(\n web::resource(\"status/{merchant_id}/{payment_id}\")\n .route(web::get().to(payment_link::payment_link_status)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::ConnectorOnboarding", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl ConnectorOnboarding {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/connector_onboarding\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/action_url\")\n .route(web::post().to(connector_onboarding::get_action_url)),\n )\n .service(\n web::resource(\"/sync\")\n .route(web::post().to(connector_onboarding::sync_onboarding_status)),\n )\n .service(\n web::resource(\"/reset_tracking_id\")\n .route(web::post().to(connector_onboarding::reset_tracking_id)),\n )\n }\n}", + "after_code": "impl ConnectorOnboarding {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/connector_onboarding\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/action_url\")\n .route(web::post().to(connector_onboarding::get_action_url)),\n )\n .service(\n web::resource(\"/sync\")\n .route(web::post().to(connector_onboarding::sync_onboarding_status)),\n )\n .service(\n web::resource(\"/reset_tracking_id\")\n .route(web::post().to(connector_onboarding::reset_tracking_id)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_prerouting_algorithm_in_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(straight_through_algorithm);\n }", + "after_code": "fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(straight_through_algorithm);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_payment_intent_status", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }", + "after_code": "fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::Settings::function::validate", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn validate(&self) -> ApplicationResult<()> {\n self.server.validate()?;\n self.master_database.get_inner().validate()?;\n #[cfg(feature = \"olap\")]\n self.replica_database.get_inner().validate()?;\n\n // The logger may not yet be initialized when validating the application configuration\n #[allow(clippy::print_stderr)]\n self.redis.validate().map_err(|error| {\n eprintln!(\"{error}\");\n ApplicationError::InvalidConfigurationValueError(\"Redis configuration\".into())\n })?;\n\n if self.log.file.enabled {\n if self.log.file.file_name.is_default_or_empty() {\n return Err(error_stack::Report::from(\n ApplicationError::InvalidConfigurationValueError(\n \"log file name must not be empty\".into(),\n ),\n ));\n }\n\n if self.log.file.path.is_default_or_empty() {\n return Err(error_stack::Report::from(\n ApplicationError::InvalidConfigurationValueError(\n \"log directory path must not be empty\".into(),\n ),\n ));\n }\n }\n self.secrets.get_inner().validate()?;\n self.locker.validate()?;\n self.connectors.validate(\"connectors\")?;\n self.chat.get_inner().validate()?;\n self.cors.validate()?;\n\n self.scheduler\n .as_ref()\n .map(|scheduler_settings| scheduler_settings.validate())\n .transpose()?;\n #[cfg(feature = \"kv_store\")]\n self.drainer.validate()?;\n self.api_keys.get_inner().validate()?;\n\n self.file_storage\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n self.crm\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n self.lock_settings.validate()?;\n self.events.validate()?;\n\n #[cfg(feature = \"olap\")]\n self.opensearch.validate()?;\n\n self.encryption_management\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.into()))?;\n\n self.secrets_management\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.into()))?;\n self.generic_link.payment_method_collect.validate()?;\n self.generic_link.payout_link.validate()?;\n\n #[cfg(feature = \"v2\")]\n self.cell_information.validate()?;\n self.network_tokenization_service\n .as_ref()\n .map(|x| x.get_inner().validate())\n .transpose()?;\n\n self.paze_decrypt_keys\n .as_ref()\n .map(|x| x.get_inner().validate())\n .transpose()?;\n\n self.google_pay_decrypt_keys\n .as_ref()\n .map(|x| x.validate())\n .transpose()?;\n\n self.key_manager.get_inner().validate()?;\n #[cfg(feature = \"email\")]\n self.email\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.into()))?;\n\n self.theme\n .storage\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n self.platform.validate()?;\n\n self.open_router.validate()?;\n\n // Validate gRPC client settings\n #[cfg(feature = \"revenue_recovery\")]\n self.grpc_client\n .recovery_decider_client\n .as_ref()\n .map(|config| config.validate())\n .transpose()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n self.superposition\n .get_inner()\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n Ok(())\n }", + "after_code": "pub fn validate(&self) -> ApplicationResult<()> {\n self.server.validate()?;\n self.master_database.get_inner().validate()?;\n #[cfg(feature = \"olap\")]\n self.replica_database.get_inner().validate()?;\n\n // The logger may not yet be initialized when validating the application configuration\n #[allow(clippy::print_stderr)]\n self.redis.validate().map_err(|error| {\n eprintln!(\"{error}\");\n ApplicationError::InvalidConfigurationValueError(\"Redis configuration\".into())\n })?;\n\n if self.log.file.enabled {\n if self.log.file.file_name.is_default_or_empty() {\n return Err(error_stack::Report::from(\n ApplicationError::InvalidConfigurationValueError(\n \"log file name must not be empty\".into(),\n ),\n ));\n }\n\n if self.log.file.path.is_default_or_empty() {\n return Err(error_stack::Report::from(\n ApplicationError::InvalidConfigurationValueError(\n \"log directory path must not be empty\".into(),\n ),\n ));\n }\n }\n self.secrets.get_inner().validate()?;\n self.locker.validate()?;\n self.connectors.validate(\"connectors\")?;\n self.chat.get_inner().validate()?;\n self.cors.validate()?;\n\n self.scheduler\n .as_ref()\n .map(|scheduler_settings| scheduler_settings.validate())\n .transpose()?;\n #[cfg(feature = \"kv_store\")]\n self.drainer.validate()?;\n self.api_keys.get_inner().validate()?;\n\n self.file_storage\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n self.crm\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n self.lock_settings.validate()?;\n self.events.validate()?;\n\n #[cfg(feature = \"olap\")]\n self.opensearch.validate()?;\n\n self.encryption_management\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.into()))?;\n\n self.secrets_management\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.into()))?;\n self.generic_link.payment_method_collect.validate()?;\n self.generic_link.payout_link.validate()?;\n\n #[cfg(feature = \"v2\")]\n self.cell_information.validate()?;\n self.network_tokenization_service\n .as_ref()\n .map(|x| x.get_inner().validate())\n .transpose()?;\n\n self.paze_decrypt_keys\n .as_ref()\n .map(|x| x.get_inner().validate())\n .transpose()?;\n\n self.google_pay_decrypt_keys\n .as_ref()\n .map(|x| x.validate())\n .transpose()?;\n\n self.key_manager.get_inner().validate()?;\n #[cfg(feature = \"email\")]\n self.email\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.into()))?;\n\n self.theme\n .storage\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n self.platform.validate()?;\n\n self.open_router.validate()?;\n\n // Validate gRPC client settings\n #[cfg(feature = \"revenue_recovery\")]\n self.grpc_client\n .recovery_decider_client\n .as_ref()\n .map(|config| config.validate())\n .transpose()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n self.superposition\n .get_inner()\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n Ok(())\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::de::Error;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use crate::types::storage::revenue_recovery;" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::Error;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use crate::types::storage::revenue_recovery;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_payment_intent_profile_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> {\n Some(&self.payment_intent.profile_id)\n }", + "after_code": "fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> {\n Some(&self.payment_intent.profile_id)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::ApplePayCertificatesMigration", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl ApplePayCertificatesMigration {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/apple_pay_certificates_migration\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(\n web::post().to(apple_pay_certificates_migration::apple_pay_certificates_migration),\n ))\n }\n}", + "after_code": "impl ApplePayCertificatesMigration {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/apple_pay_certificates_migration\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(\n web::post().to(apple_pay_certificates_migration::apple_pay_certificates_migration),\n ))\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_multiple_capture_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData> {\n todo!()\n }", + "after_code": "fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_payment_method_info", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod> {\n todo!()\n }", + "after_code": "fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_creds_identifier", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_creds_identifier(&self) -> Option<&str> {\n None\n }", + "after_code": "fn get_creds_identifier(&self) -> Option<&str> {\n None\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_routing_approach_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_authorizations", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_authorizations(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_authorizations(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_payment_link_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_link_data(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_payment_link_data(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Authentication", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Authentication {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/authentication\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(authentication::authentication_create)))\n .service(\n web::resource(\"/{authentication_id}/eligibility\")\n .route(web::post().to(authentication::authentication_eligibility)),\n )\n .service(\n web::resource(\"/{authentication_id}/authenticate\")\n .route(web::post().to(authentication::authentication_authenticate)),\n )\n .service(\n web::resource(\"{merchant_id}/{authentication_id}/redirect\")\n .route(web::post().to(authentication::authentication_sync_post_update)),\n )\n .service(\n web::resource(\"{merchant_id}/{authentication_id}/sync\")\n .route(web::post().to(authentication::authentication_sync)),\n )\n }\n}", + "after_code": "impl Authentication {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/authentication\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(authentication::authentication_create)))\n .service(\n web::resource(\"/{authentication_id}/eligibility\")\n .route(web::post().to(authentication::authentication_eligibility)),\n )\n .service(\n web::resource(\"/{authentication_id}/authenticate\")\n .route(web::post().to(authentication::authentication_authenticate)),\n )\n .service(\n web::resource(\"{merchant_id}/{authentication_id}/redirect\")\n .route(web::post().to(authentication::authentication_sync_post_update)),\n )\n .service(\n web::resource(\"{merchant_id}/{authentication_id}/sync\")\n .route(web::post().to(authentication::authentication_sync)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use crate::routes::authentication;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use crate::routes::authentication;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }", + "after_code": "fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_email_if_not_present", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }", + "after_code": "fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_recurring_mandate_payment_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }", + "after_code": "fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::L2L3DataConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct L2L3DataConfig {\n pub enabled: bool,\n}", + "after_code": "pub struct L2L3DataConfig {\n pub enabled: bool,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_mandate_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails> {\n todo!()\n }", + "after_code": "fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_sessions_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_sessions_token(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_sessions_token(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Health::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/health\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::get().to(health)))\n .service(web::resource(\"/ready\").route(web::get().to(deep_health_check)))\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/health\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::get().to(health)))\n .service(web::resource(\"/ready\").route(web::get().to(deep_health_check)))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::PaymentRedirectCompleteAuthorize", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl PaymentRedirectFlow for PaymentRedirectCompleteAuthorize {\n type PaymentFlowResponse = router_types::RedirectPaymentFlowResponse;\n\n #[allow(clippy::too_many_arguments)]\n async fn call_payment_flow(\n &self,\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n req: PaymentsRedirectResponseData,\n connector_action: CallConnectorAction,\n _connector: String,\n _payment_id: id_type::PaymentId,\n ) -> RouterResult {\n let key_manager_state = &state.into();\n let payment_confirm_req = api::PaymentsRequest {\n payment_id: Some(req.resource_id.clone()),\n merchant_id: req.merchant_id.clone(),\n merchant_connector_details: req.creds_identifier.map(|creds_id| {\n api::MerchantConnectorDetailsWrap {\n creds_identifier: creds_id,\n encoded_data: None,\n }\n }),\n feature_metadata: Some(api_models::payments::FeatureMetadata {\n redirect_response: Some(api_models::payments::RedirectResponse {\n param: req.param.map(Secret::new),\n json_payload: Some(req.json_payload.unwrap_or(serde_json::json!({})).into()),\n }),\n search_tags: None,\n apple_pay_recurring_details: None,\n }),\n ..Default::default()\n };\n let response = Box::pin(payments_core::<\n api::CompleteAuthorize,\n api::PaymentsResponse,\n _,\n _,\n _,\n _,\n >(\n state.clone(),\n req_state,\n merchant_context.clone(),\n None,\n operations::payment_complete_authorize::CompleteAuthorize,\n payment_confirm_req,\n services::api::AuthFlow::Merchant,\n connector_action,\n None,\n None,\n HeaderPayload::default(),\n ))\n .await?;\n let payments_response = match response {\n services::ApplicationResponse::Json(response) => Ok(response),\n services::ApplicationResponse::JsonWithHeaders((response, _)) => Ok(response),\n _ => Err(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get the response in json\"),\n }?;\n let profile_id = payments_response\n .profile_id\n .as_ref()\n .get_required_value(\"profile_id\")?;\n let business_profile = state\n .store\n .find_business_profile_by_profile_id(\n key_manager_state,\n merchant_context.get_merchant_key_store(),\n profile_id,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::ProfileNotFound {\n id: profile_id.get_string_repr().to_owned(),\n })?;\n Ok(router_types::RedirectPaymentFlowResponse {\n payments_response,\n business_profile,\n })\n }\n\n fn get_payment_action(&self) -> services::PaymentAction {\n services::PaymentAction::CompleteAuthorize\n }\n\n fn generate_response(\n &self,\n payment_flow_response: &Self::PaymentFlowResponse,\n payment_id: id_type::PaymentId,\n connector: String,\n ) -> RouterResult> {\n let payments_response = &payment_flow_response.payments_response;\n // There might be multiple redirections needed for some flows\n // If the status is requires customer action, then send the startpay url again\n // The redirection data must have been provided and updated by the connector\n let redirection_response = match payments_response.status {\n enums::IntentStatus::RequiresCustomerAction => {\n let startpay_url = payments_response\n .next_action\n .clone()\n .and_then(|next_action_data| match next_action_data {\n api_models::payments::NextActionData::RedirectToUrl { redirect_to_url } => Some(redirect_to_url),\n api_models::payments::NextActionData::RedirectInsidePopup{popup_url, ..} => Some(popup_url),\n api_models::payments::NextActionData::DisplayBankTransferInformation { .. } => None,\n api_models::payments::NextActionData::ThirdPartySdkSessionToken { .. } => None,\n api_models::payments::NextActionData::QrCodeInformation{..} => None,\n api_models::payments::NextActionData::FetchQrCodeInformation{..} => None,\n api_models::payments::NextActionData::DisplayVoucherInformation{ .. } => None,\n api_models::payments::NextActionData::WaitScreenInformation{..} => None,\n api_models::payments::NextActionData::ThreeDsInvoke{..} => None,\n api_models::payments::NextActionData::InvokeSdkClient{..} => None,\n api_models::payments::NextActionData::CollectOtp{ .. } => None,\n api_models::payments::NextActionData::InvokeHiddenIframe{ .. } => None,\n api_models::payments::NextActionData::SdkUpiIntentInformation{ .. } => None,\n })\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n\n .attach_printable(\n \"did not receive redirect to url when status is requires customer action\",\n )?;\n Ok(api::RedirectionResponse {\n return_url: String::new(),\n params: vec![],\n return_url_with_query_params: startpay_url,\n http_method: \"GET\".to_string(),\n headers: vec![],\n })\n }\n // If the status is terminal status, then redirect to merchant return url to provide status\n enums::IntentStatus::Succeeded\n | enums::IntentStatus::Failed\n | enums::IntentStatus::Cancelled | enums::IntentStatus::RequiresCapture| enums::IntentStatus::Processing=> helpers::get_handle_response_url(\n payment_id,\n &payment_flow_response.business_profile,\n payments_response,\n connector,\n ),\n _ => Err(errors::ApiErrorResponse::InternalServerError).attach_printable_lazy(|| format!(\"Could not proceed with payment as payment status {} cannot be handled during redirection\",payments_response.status))?\n }?;\n if payments_response\n .is_iframe_redirection_enabled\n .unwrap_or(false)\n {\n // html script to check if inside iframe, then send post message to parent for redirection else redirect self to return_url\n let html = core_utils::get_html_redirect_response_popup(\n redirection_response.return_url_with_query_params,\n )?;\n Ok(services::ApplicationResponse::Form(Box::new(\n services::RedirectionFormData {\n redirect_form: services::RedirectForm::Html { html_data: html },\n payment_method_data: None,\n amount: payments_response.amount.to_string(),\n currency: payments_response.currency.clone(),\n },\n )))\n } else {\n Ok(services::ApplicationResponse::JsonForRedirection(\n redirection_response,\n ))\n }\n }\n}", + "after_code": "impl PaymentRedirectFlow for PaymentRedirectCompleteAuthorize {\n type PaymentFlowResponse = router_types::RedirectPaymentFlowResponse;\n\n #[allow(clippy::too_many_arguments)]\n async fn call_payment_flow(\n &self,\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n req: PaymentsRedirectResponseData,\n connector_action: CallConnectorAction,\n _connector: String,\n _payment_id: id_type::PaymentId,\n ) -> RouterResult {\n let key_manager_state = &state.into();\n let payment_confirm_req = api::PaymentsRequest {\n payment_id: Some(req.resource_id.clone()),\n merchant_id: req.merchant_id.clone(),\n merchant_connector_details: req.creds_identifier.map(|creds_id| {\n api::MerchantConnectorDetailsWrap {\n creds_identifier: creds_id,\n encoded_data: None,\n }\n }),\n feature_metadata: Some(api_models::payments::FeatureMetadata {\n redirect_response: Some(api_models::payments::RedirectResponse {\n param: req.param.map(Secret::new),\n json_payload: Some(req.json_payload.unwrap_or(serde_json::json!({})).into()),\n }),\n search_tags: None,\n apple_pay_recurring_details: None,\n }),\n ..Default::default()\n };\n let response = Box::pin(payments_core::<\n api::CompleteAuthorize,\n api::PaymentsResponse,\n _,\n _,\n _,\n _,\n >(\n state.clone(),\n req_state,\n merchant_context.clone(),\n None,\n operations::payment_complete_authorize::CompleteAuthorize,\n payment_confirm_req,\n services::api::AuthFlow::Merchant,\n connector_action,\n None,\n None,\n HeaderPayload::default(),\n ))\n .await?;\n let payments_response = match response {\n services::ApplicationResponse::Json(response) => Ok(response),\n services::ApplicationResponse::JsonWithHeaders((response, _)) => Ok(response),\n _ => Err(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get the response in json\"),\n }?;\n let profile_id = payments_response\n .profile_id\n .as_ref()\n .get_required_value(\"profile_id\")?;\n let business_profile = state\n .store\n .find_business_profile_by_profile_id(\n key_manager_state,\n merchant_context.get_merchant_key_store(),\n profile_id,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::ProfileNotFound {\n id: profile_id.get_string_repr().to_owned(),\n })?;\n Ok(router_types::RedirectPaymentFlowResponse {\n payments_response,\n business_profile,\n })\n }\n\n fn get_payment_action(&self) -> services::PaymentAction {\n services::PaymentAction::CompleteAuthorize\n }\n\n fn generate_response(\n &self,\n payment_flow_response: &Self::PaymentFlowResponse,\n payment_id: id_type::PaymentId,\n connector: String,\n ) -> RouterResult> {\n let payments_response = &payment_flow_response.payments_response;\n // There might be multiple redirections needed for some flows\n // If the status is requires customer action, then send the startpay url again\n // The redirection data must have been provided and updated by the connector\n let redirection_response = match payments_response.status {\n enums::IntentStatus::RequiresCustomerAction => {\n let startpay_url = payments_response\n .next_action\n .clone()\n .and_then(|next_action_data| match next_action_data {\n api_models::payments::NextActionData::RedirectToUrl { redirect_to_url } => Some(redirect_to_url),\n api_models::payments::NextActionData::RedirectInsidePopup{popup_url, ..} => Some(popup_url),\n api_models::payments::NextActionData::DisplayBankTransferInformation { .. } => None,\n api_models::payments::NextActionData::ThirdPartySdkSessionToken { .. } => None,\n api_models::payments::NextActionData::QrCodeInformation{..} => None,\n api_models::payments::NextActionData::FetchQrCodeInformation{..} => None,\n api_models::payments::NextActionData::DisplayVoucherInformation{ .. } => None,\n api_models::payments::NextActionData::WaitScreenInformation{..} => None,\n api_models::payments::NextActionData::ThreeDsInvoke{..} => None,\n api_models::payments::NextActionData::InvokeSdkClient{..} => None,\n api_models::payments::NextActionData::CollectOtp{ .. } => None,\n api_models::payments::NextActionData::InvokeHiddenIframe{ .. } => None,\n api_models::payments::NextActionData::SdkUpiIntentInformation{ .. } => None,\n })\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n\n .attach_printable(\n \"did not receive redirect to url when status is requires customer action\",\n )?;\n Ok(api::RedirectionResponse {\n return_url: String::new(),\n params: vec![],\n return_url_with_query_params: startpay_url,\n http_method: \"GET\".to_string(),\n headers: vec![],\n })\n }\n // If the status is terminal status, then redirect to merchant return url to provide status\n enums::IntentStatus::Succeeded\n | enums::IntentStatus::Failed\n | enums::IntentStatus::Cancelled | enums::IntentStatus::RequiresCapture| enums::IntentStatus::Processing=> helpers::get_handle_response_url(\n payment_id,\n &payment_flow_response.business_profile,\n payments_response,\n connector,\n ),\n _ => Err(errors::ApiErrorResponse::InternalServerError).attach_printable_lazy(|| format!(\"Could not proceed with payment as payment status {} cannot be handled during redirection\",payments_response.status))?\n }?;\n if payments_response\n .is_iframe_redirection_enabled\n .unwrap_or(false)\n {\n // html script to check if inside iframe, then send post message to parent for redirection else redirect self to return_url\n let html = core_utils::get_html_redirect_response_popup(\n redirection_response.return_url_with_query_params,\n )?;\n Ok(services::ApplicationResponse::Form(Box::new(\n services::RedirectionFormData {\n redirect_form: services::RedirectForm::Html { html_data: html },\n payment_method_data: None,\n amount: payments_response.amount.to_string(),\n currency: payments_response.currency.clone(),\n },\n )))\n } else {\n Ok(services::ApplicationResponse::JsonForRedirection(\n redirection_response,\n ))\n }\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use hyperswitch_domain_models::router_response_types::RedirectForm;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use hyperswitch_domain_models::router_response_types::RedirectForm;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_payment_method_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData> {\n todo!()\n }", + "after_code": "fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_address", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_address(&self) -> &PaymentAddress {\n todo!()\n }", + "after_code": "fn get_address(&self) -> &PaymentAddress {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_sessions_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_sessions_token(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_sessions_token(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_payment_method_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_token(&self) -> Option<&PaymentMethodToken> {\n todo!()\n }", + "after_code": "fn get_payment_method_token(&self) -> Option<&PaymentMethodToken> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_address", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_address(&self) -> &PaymentAddress {\n &self.address\n }", + "after_code": "fn get_address(&self) -> &PaymentAddress {\n &self.address\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::ConnectorOnboarding", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ConnectorOnboarding {\n pub paypal: PayPalOnboarding,\n}", + "after_code": "pub struct ConnectorOnboarding {\n pub paypal: PayPalOnboarding,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::AuthenticationProviders", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct AuthenticationProviders {\n #[serde(deserialize_with = \"deserialize_connector_list\")]\n pub click_to_pay: HashSet,\n}", + "after_code": "pub struct AuthenticationProviders {\n #[serde(deserialize_with = \"deserialize_connector_list\")]\n pub click_to_pay: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use api_models::enums;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_setup_mandate", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_setup_mandate(&self) -> Option<&MandateData> {\n todo!()\n }", + "after_code": "fn get_setup_mandate(&self) -> Option<&MandateData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_merchant_connector_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_refunds", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_refunds(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_refunds(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Forex", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Forex;", + "after_code": "pub struct Forex;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_authentication", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>\n {\n todo!()\n }", + "after_code": "fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>\n {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::AppState::function::get_store_interface", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn get_store_interface(\n storage_impl: &StorageImpl,\n event_handler: &EventsHandler,\n conf: &Settings,\n tenant: &dyn TenantConfig,\n cache_store: Arc,\n testable: bool,\n ) -> Box {\n match storage_impl {\n StorageImpl::Postgresql | StorageImpl::PostgresqlTest => match event_handler {\n EventsHandler::Kafka(kafka_client) => Box::new(\n KafkaStore::new(\n #[allow(clippy::expect_used)]\n get_store(&conf.clone(), tenant, Arc::clone(&cache_store), testable)\n .await\n .expect(\"Failed to create store\"),\n kafka_client.clone(),\n TenantID(tenant.get_tenant_id().get_string_repr().to_owned()),\n tenant,\n )\n .await,\n ),\n EventsHandler::Logs(_) => Box::new(\n #[allow(clippy::expect_used)]\n get_store(conf, tenant, Arc::clone(&cache_store), testable)\n .await\n .expect(\"Failed to create store\"),\n ),\n },\n #[allow(clippy::expect_used)]\n StorageImpl::Mock => Box::new(\n MockDb::new(&conf.redis)\n .await\n .expect(\"Failed to create mock store\"),\n ),\n }\n }", + "after_code": "pub async fn get_store_interface(\n storage_impl: &StorageImpl,\n event_handler: &EventsHandler,\n conf: &Settings,\n tenant: &dyn TenantConfig,\n cache_store: Arc,\n testable: bool,\n ) -> Box {\n match storage_impl {\n StorageImpl::Postgresql | StorageImpl::PostgresqlTest => match event_handler {\n EventsHandler::Kafka(kafka_client) => Box::new(\n KafkaStore::new(\n #[allow(clippy::expect_used)]\n get_store(&conf.clone(), tenant, Arc::clone(&cache_store), testable)\n .await\n .expect(\"Failed to create store\"),\n kafka_client.clone(),\n TenantID(tenant.get_tenant_id().get_string_repr().to_owned()),\n tenant,\n )\n .await,\n ),\n EventsHandler::Logs(_) => Box::new(\n #[allow(clippy::expect_used)]\n get_store(conf, tenant, Arc::clone(&cache_store), testable)\n .await\n .expect(\"Failed to create store\"),\n ),\n },\n #[allow(clippy::expect_used)]\n StorageImpl::Mock => Box::new(\n MockDb::new(&conf.redis)\n .await\n .expect(\"Failed to create mock store\"),\n ),\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use self::settings::Tenant;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use self::settings::Tenant;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::GooglePayWallet::function::check_predecrypted_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn check_predecrypted_token(\n &self,\n payment_data: &D,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let google_pay_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_google_pay_wallet_data());\n\n let result = if let Some(data) = google_pay_wallet_data {\n match &data.tokenization_data {\n common_payments_types::GpayTokenizationData::Encrypted(_) => None,\n common_payments_types::GpayTokenizationData::Decrypted(\n google_pay_predecrypt_data,\n ) => {\n helpers::validate_card_expiry(\n &google_pay_predecrypt_data.card_exp_month,\n &google_pay_predecrypt_data.card_exp_year,\n )?;\n Some(PaymentMethodToken::GooglePayDecrypt(Box::new(\n google_pay_predecrypt_data.clone(),\n )))\n }\n }\n } else {\n None\n };\n Ok(result)\n }", + "after_code": "fn check_predecrypted_token(\n &self,\n payment_data: &D,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let google_pay_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_google_pay_wallet_data());\n\n let result = if let Some(data) = google_pay_wallet_data {\n match &data.tokenization_data {\n common_payments_types::GpayTokenizationData::Encrypted(_) => None,\n common_payments_types::GpayTokenizationData::Decrypted(\n google_pay_predecrypt_data,\n ) => {\n helpers::validate_card_expiry(\n &google_pay_predecrypt_data.card_exp_month,\n &google_pay_predecrypt_data.card_exp_year,\n )?;\n Some(PaymentMethodToken::GooglePayDecrypt(Box::new(\n google_pay_predecrypt_data.clone(),\n )))\n }\n }\n } else {\n None\n };\n Ok(result)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::enum::DecideWalletFlow", + "file": "crates/router/src/core/payments.rs", + "kind": "enum_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub enum DecideWalletFlow {\n ApplePayDecrypt(payments_api::PaymentProcessingDetails),\n PazeDecrypt(PazePaymentProcessingDetails),\n GooglePayDecrypt(GooglePayPaymentProcessingDetails),\n SkipDecryption,\n}", + "after_code": "pub enum DecideWalletFlow {\n ApplePayDecrypt(payments_api::PaymentProcessingDetails),\n PazeDecrypt(PazePaymentProcessingDetails),\n GooglePayDecrypt(GooglePayPaymentProcessingDetails),\n SkipDecryption,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_mandate_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails> {\n todo!()\n }", + "after_code": "fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::session_state", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn session_state(&self) -> SessionState {\n self.clone()\n }", + "after_code": "fn session_state(&self) -> SessionState {\n self.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentRedirectFlow::function::handle_payments_redirect_response", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn handle_payments_redirect_response(\n &self,\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n request: PaymentsRedirectResponseData,\n ) -> RouterResponse {\n metrics::REDIRECTION_TRIGGERED.add(\n 1,\n router_env::metric_attributes!((\n \"merchant_id\",\n merchant_context.get_merchant_account().get_id().clone()\n )),\n );\n\n let payment_flow_response = self\n .call_payment_flow(&state, req_state, merchant_context, profile, request)\n .await?;\n\n self.generate_response(&payment_flow_response)\n }", + "after_code": "async fn handle_payments_redirect_response(\n &self,\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n request: PaymentsRedirectResponseData,\n ) -> RouterResponse {\n metrics::REDIRECTION_TRIGGERED.add(\n 1,\n router_env::metric_attributes!((\n \"merchant_id\",\n merchant_context.get_merchant_account().get_id().clone()\n )),\n );\n\n let payment_flow_response = self\n .call_payment_flow(&state, req_state, merchant_context, profile, request)\n .await?;\n\n self.generate_response(&payment_flow_response)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_client_secret", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_client_secret(&mut self, client_secret: Option>) {\n todo!()\n }", + "after_code": "fn set_client_secret(&mut self, client_secret: Option>) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::GooglePayDecryptConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct GooglePayDecryptConfig {\n pub google_pay_root_signing_keys: Secret,\n}", + "after_code": "pub struct GooglePayDecryptConfig {\n pub google_pay_root_signing_keys: Secret,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_payment_intent_profile_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> {\n Some(&self.payment_intent.profile_id)\n }", + "after_code": "fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> {\n Some(&self.payment_intent.profile_id)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }", + "after_code": "fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::BlockListCheck::type::Output", + "file": "crates/router/src/core/payments.rs", + "kind": "type_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "type Output = CheckResult;", + "after_code": "type Output = CheckResult;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_connector_response_reference_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n todo!()\n }", + "after_code": "fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::TempLockerEnableConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct TempLockerEnableConfig(pub HashMap);", + "after_code": "pub struct TempLockerEnableConfig(pub HashMap);", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use diesel_models::enums::PaymentMethod;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use diesel_models::enums::PaymentMethod;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_authorizations", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_authorizations(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_authorizations(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::BillingConnectorPaymentsSyncCall", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct BillingConnectorPaymentsSyncCall {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub billing_connectors_which_require_payment_sync: HashSet,\n}", + "after_code": "pub struct BillingConnectorPaymentsSyncCall {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub billing_connectors_which_require_payment_sync: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use super::deserialize_hashset;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use api_models::enums;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::function::deserialize_merchant_ids", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn deserialize_merchant_ids<'de, D>(\n deserializer: D,\n) -> Result, D::Error>\nwhere\n D: serde::Deserializer<'de>,\n{\n let s = String::deserialize(deserializer)?;\n deserialize_merchant_ids_inner(s).map_err(serde::de::Error::custom)\n}", + "after_code": "fn deserialize_merchant_ids<'de, D>(\n deserializer: D,\n) -> Result, D::Error>\nwhere\n D: serde::Deserializer<'de>,\n{\n let s = String::deserialize(deserializer)?;\n deserialize_merchant_ids_inner(s).map_err(serde::de::Error::custom)\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use serde::de::Error;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::Error;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::DelayedSessionConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct DelayedSessionConfig {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub connectors_with_delayed_session_response: HashSet,\n}", + "after_code": "pub struct DelayedSessionConfig {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub connectors_with_delayed_session_response: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use super::deserialize_hashset;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use api_models::enums;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_surcharge_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }", + "after_code": "fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Payments", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Payments {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/payments\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n route = route\n .service(\n web::resource(\"/list\")\n .route(web::get().to(payments::payments_list))\n .route(web::post().to(payments::payments_list_by_filter)),\n )\n .service(\n web::resource(\"/profile/list\")\n .route(web::get().to(payments::profile_payments_list))\n .route(web::post().to(payments::profile_payments_list_by_filter)),\n )\n .service(\n web::resource(\"/filter\")\n .route(web::post().to(payments::get_filters_for_payments)),\n )\n .service(\n web::resource(\"/v2/filter\").route(web::get().to(payments::get_payment_filters)),\n )\n .service(\n web::resource(\"/aggregate\")\n .route(web::get().to(payments::get_payments_aggregates)),\n )\n .service(\n web::resource(\"/profile/aggregate\")\n .route(web::get().to(payments::get_payments_aggregates_profile)),\n )\n .service(\n web::resource(\"/v2/profile/filter\")\n .route(web::get().to(payments::get_payment_filters_profile)),\n )\n .service(\n web::resource(\"/{payment_id}/manual-update\")\n .route(web::put().to(payments::payments_manual_update)),\n )\n }\n #[cfg(feature = \"oltp\")]\n {\n route = route\n .service(web::resource(\"\").route(web::post().to(payments::payments_create)))\n .service(\n web::resource(\"/session_tokens\")\n .route(web::post().to(payments::payments_connector_session)),\n )\n .service(\n web::resource(\"/sync\")\n .route(web::post().to(payments::payments_retrieve_with_gateway_creds)),\n )\n .service(\n web::resource(\"/{payment_id}\")\n .route(web::get().to(payments::payments_retrieve))\n .route(web::post().to(payments::payments_update)),\n )\n .service(\n web::resource(\"/{payment_id}/post_session_tokens\").route(web::post().to(payments::payments_post_session_tokens)),\n )\n .service(\n web::resource(\"/{payment_id}/confirm\").route(web::post().to(payments::payments_confirm)),\n )\n .service(\n web::resource(\"/{payment_id}/cancel\").route(web::post().to(payments::payments_cancel)),\n )\n .service(\n web::resource(\"/{payment_id}/cancel_post_capture\").route(web::post().to(payments::payments_cancel_post_capture)),\n )\n .service(\n web::resource(\"/{payment_id}/capture\").route(web::post().to(payments::payments_capture)),\n )\n .service(\n web::resource(\"/{payment_id}/approve\")\n .route(web::post().to(payments::payments_approve)),\n )\n .service(\n web::resource(\"/{payment_id}/reject\")\n .route(web::post().to(payments::payments_reject)),\n )\n .service(\n web::resource(\"/{payment_id}/eligibility\")\n .route(web::post().to(payments::payments_submit_eligibility)),\n )\n .service(\n web::resource(\"/redirect/{payment_id}/{merchant_id}/{attempt_id}\")\n .route(web::get().to(payments::payments_start)),\n )\n .service(\n web::resource(\n \"/{payment_id}/{merchant_id}/redirect/response/{connector}/{creds_identifier}\",\n )\n .route(web::get().to(payments::payments_redirect_response_with_creds_identifier)),\n )\n .service(\n web::resource(\"/{payment_id}/{merchant_id}/redirect/response/{connector}\")\n .route(web::get().to(payments::payments_redirect_response))\n .route(web::post().to(payments::payments_redirect_response))\n )\n .service(\n web::resource(\"/{payment_id}/{merchant_id}/redirect/complete/{connector}/{creds_identifier}\")\n .route(web::get().to(payments::payments_complete_authorize_redirect_with_creds_identifier))\n .route(web::post().to(payments::payments_complete_authorize_redirect_with_creds_identifier))\n )\n .service(\n web::resource(\"/{payment_id}/{merchant_id}/redirect/complete/{connector}\")\n .route(web::get().to(payments::payments_complete_authorize_redirect))\n .route(web::post().to(payments::payments_complete_authorize_redirect)),\n )\n .service(\n web::resource(\"/{payment_id}/complete_authorize\")\n .route(web::post().to(payments::payments_complete_authorize)),\n )\n .service(\n web::resource(\"/{payment_id}/incremental_authorization\").route(web::post().to(payments::payments_incremental_authorization)),\n )\n .service(\n web::resource(\"/{payment_id}/extend_authorization\").route(web::post().to(payments::payments_extend_authorization)),\n )\n .service(\n web::resource(\"/{payment_id}/{merchant_id}/authorize/{connector}\")\n .route(web::post().to(payments::post_3ds_payments_authorize))\n .route(web::get().to(payments::post_3ds_payments_authorize))\n )\n .service(\n web::resource(\"/{payment_id}/3ds/authentication\").route(web::post().to(payments::payments_external_authentication)),\n )\n .service(\n web::resource(\"/{payment_id}/extended_card_info\").route(web::get().to(payments::retrieve_extended_card_info)),\n )\n .service(\n web::resource(\"{payment_id}/calculate_tax\")\n .route(web::post().to(payments::payments_dynamic_tax_calculation)),\n )\n .service(\n web::resource(\"{payment_id}/update_metadata\")\n .route(web::post().to(payments::payments_update_metadata)),\n );\n }\n route\n }\n}", + "after_code": "impl Payments {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/payments\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n route = route\n .service(\n web::resource(\"/list\")\n .route(web::get().to(payments::payments_list))\n .route(web::post().to(payments::payments_list_by_filter)),\n )\n .service(\n web::resource(\"/profile/list\")\n .route(web::get().to(payments::profile_payments_list))\n .route(web::post().to(payments::profile_payments_list_by_filter)),\n )\n .service(\n web::resource(\"/filter\")\n .route(web::post().to(payments::get_filters_for_payments)),\n )\n .service(\n web::resource(\"/v2/filter\").route(web::get().to(payments::get_payment_filters)),\n )\n .service(\n web::resource(\"/aggregate\")\n .route(web::get().to(payments::get_payments_aggregates)),\n )\n .service(\n web::resource(\"/profile/aggregate\")\n .route(web::get().to(payments::get_payments_aggregates_profile)),\n )\n .service(\n web::resource(\"/v2/profile/filter\")\n .route(web::get().to(payments::get_payment_filters_profile)),\n )\n .service(\n web::resource(\"/{payment_id}/manual-update\")\n .route(web::put().to(payments::payments_manual_update)),\n )\n }\n #[cfg(feature = \"oltp\")]\n {\n route = route\n .service(web::resource(\"\").route(web::post().to(payments::payments_create)))\n .service(\n web::resource(\"/session_tokens\")\n .route(web::post().to(payments::payments_connector_session)),\n )\n .service(\n web::resource(\"/sync\")\n .route(web::post().to(payments::payments_retrieve_with_gateway_creds)),\n )\n .service(\n web::resource(\"/{payment_id}\")\n .route(web::get().to(payments::payments_retrieve))\n .route(web::post().to(payments::payments_update)),\n )\n .service(\n web::resource(\"/{payment_id}/post_session_tokens\").route(web::post().to(payments::payments_post_session_tokens)),\n )\n .service(\n web::resource(\"/{payment_id}/confirm\").route(web::post().to(payments::payments_confirm)),\n )\n .service(\n web::resource(\"/{payment_id}/cancel\").route(web::post().to(payments::payments_cancel)),\n )\n .service(\n web::resource(\"/{payment_id}/cancel_post_capture\").route(web::post().to(payments::payments_cancel_post_capture)),\n )\n .service(\n web::resource(\"/{payment_id}/capture\").route(web::post().to(payments::payments_capture)),\n )\n .service(\n web::resource(\"/{payment_id}/approve\")\n .route(web::post().to(payments::payments_approve)),\n )\n .service(\n web::resource(\"/{payment_id}/reject\")\n .route(web::post().to(payments::payments_reject)),\n )\n .service(\n web::resource(\"/{payment_id}/eligibility\")\n .route(web::post().to(payments::payments_submit_eligibility)),\n )\n .service(\n web::resource(\"/redirect/{payment_id}/{merchant_id}/{attempt_id}\")\n .route(web::get().to(payments::payments_start)),\n )\n .service(\n web::resource(\n \"/{payment_id}/{merchant_id}/redirect/response/{connector}/{creds_identifier}\",\n )\n .route(web::get().to(payments::payments_redirect_response_with_creds_identifier)),\n )\n .service(\n web::resource(\"/{payment_id}/{merchant_id}/redirect/response/{connector}\")\n .route(web::get().to(payments::payments_redirect_response))\n .route(web::post().to(payments::payments_redirect_response))\n )\n .service(\n web::resource(\"/{payment_id}/{merchant_id}/redirect/complete/{connector}/{creds_identifier}\")\n .route(web::get().to(payments::payments_complete_authorize_redirect_with_creds_identifier))\n .route(web::post().to(payments::payments_complete_authorize_redirect_with_creds_identifier))\n )\n .service(\n web::resource(\"/{payment_id}/{merchant_id}/redirect/complete/{connector}\")\n .route(web::get().to(payments::payments_complete_authorize_redirect))\n .route(web::post().to(payments::payments_complete_authorize_redirect)),\n )\n .service(\n web::resource(\"/{payment_id}/complete_authorize\")\n .route(web::post().to(payments::payments_complete_authorize)),\n )\n .service(\n web::resource(\"/{payment_id}/incremental_authorization\").route(web::post().to(payments::payments_incremental_authorization)),\n )\n .service(\n web::resource(\"/{payment_id}/extend_authorization\").route(web::post().to(payments::payments_extend_authorization)),\n )\n .service(\n web::resource(\"/{payment_id}/{merchant_id}/authorize/{connector}\")\n .route(web::post().to(payments::post_3ds_payments_authorize))\n .route(web::get().to(payments::post_3ds_payments_authorize))\n )\n .service(\n web::resource(\"/{payment_id}/3ds/authentication\").route(web::post().to(payments::payments_external_authentication)),\n )\n .service(\n web::resource(\"/{payment_id}/extended_card_info\").route(web::get().to(payments::retrieve_extended_card_info)),\n )\n .service(\n web::resource(\"{payment_id}/calculate_tax\")\n .route(web::post().to(payments::payments_dynamic_tax_calculation)),\n )\n .service(\n web::resource(\"{payment_id}/update_metadata\")\n .route(web::post().to(payments::payments_update_metadata)),\n );\n }\n route\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use crate::routes::authentication;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use crate::routes::authentication;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_connector_request_reference_id_in_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n self.payment_attempt.connector_request_reference_id = Some(connector_request_reference_id);\n }", + "after_code": "fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n self.payment_attempt.connector_request_reference_id = Some(connector_request_reference_id);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/session_flow.rs::types::PaymentsSessionRouterData::function::decide_flows", + "file": "crates/router/src/core/payments/flows/session_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "async fn decide_flows<'a>(\n self,\n state: &routes::SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n _connector_request: Option,\n business_profile: &domain::Profile,\n header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n metrics::SESSION_TOKEN_CREATED.add(\n 1,\n router_env::metric_attributes!((\"connector\", connector.connector_name.to_string())),\n );\n self.decide_flow(\n state,\n connector,\n Some(true),\n call_connector_action,\n business_profile,\n header_payload,\n )\n .await\n }", + "after_code": "async fn decide_flows<'a>(\n self,\n state: &routes::SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n _connector_request: Option,\n business_profile: &domain::Profile,\n header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n metrics::SESSION_TOKEN_CREATED.add(\n 1,\n router_env::metric_attributes!((\"connector\", connector.connector_name.to_string())),\n );\n self.decide_flow(\n state,\n connector,\n Some(true),\n call_connector_action,\n business_profile,\n header_payload,\n )\n .await\n }", + "diff_span": { + "before": "", + "after": " header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n metrics::SESSION_TOKEN_CREATED.add(" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_mandate_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }", + "after_code": "fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_vault_session_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_vault_session_details(\n &mut self,\n external_vault_session_details: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_vault_session_details(\n &mut self,\n external_vault_session_details: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::is_pre_network_tokenization_enabled", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn is_pre_network_tokenization_enabled(\n state: &SessionState,\n business_profile: &domain::Profile,\n customer_acceptance: Option>,\n connector_name: enums::Connector,\n) -> bool {\n let ntid_supported_connectors = &state\n .conf\n .network_transaction_id_supported_connectors\n .connector_list;\n\n let is_nt_supported_connector = ntid_supported_connectors.contains(&connector_name);\n\n business_profile.is_network_tokenization_enabled\n && business_profile.is_pre_network_tokenization_enabled\n && customer_acceptance.is_some()\n && is_nt_supported_connector\n}", + "after_code": "pub fn is_pre_network_tokenization_enabled(\n state: &SessionState,\n business_profile: &domain::Profile,\n customer_acceptance: Option>,\n connector_name: enums::Connector,\n) -> bool {\n let ntid_supported_connectors = &state\n .conf\n .network_transaction_id_supported_connectors\n .connector_list;\n\n let is_nt_supported_connector = ntid_supported_connectors.contains(&connector_name);\n\n business_profile.is_network_tokenization_enabled\n && business_profile.is_pre_network_tokenization_enabled\n && customer_acceptance.is_some()\n && is_nt_supported_connector\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::CardTestingCheck", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl EligibilityCheck for CardTestingCheck {\n type Output = CheckResult;\n\n async fn should_run(\n &self,\n _state: &SessionState,\n _merchant_context: &domain::MerchantContext,\n ) -> CustomResult {\n // This check is always run as there is no runtime config enablement\n Ok(true)\n }\n\n async fn execute_check(\n &self,\n state: &SessionState,\n _merchant_context: &domain::MerchantContext,\n payment_elgibility_data: &PaymentEligibilityData,\n business_profile: &domain::Profile,\n ) -> CustomResult {\n match &payment_elgibility_data.payment_method_data {\n Some(domain::PaymentMethodData::Card(card)) => {\n match card_testing_guard_utils::validate_card_testing_guard_checks(\n state,\n payment_elgibility_data\n .browser_info\n .as_ref()\n .map(|browser_info| browser_info.peek()),\n card.card_number.clone(),\n &payment_elgibility_data.payment_intent.customer_id,\n business_profile,\n )\n .await\n {\n // If validation succeeds, allow the payment\n Ok(_) => Ok(CheckResult::Allow),\n // If validation fails, check the error type\n Err(e) => match e.current_context() {\n // If it's a PreconditionFailed error, deny with message\n errors::ApiErrorResponse::PreconditionFailed { message } => {\n Ok(CheckResult::Deny {\n message: message.to_string(),\n })\n }\n // For any other error, propagate it\n _ => Err(e),\n },\n }\n }\n // If payment method is not card, allow\n _ => Ok(CheckResult::Allow),\n }\n }\n\n fn transform(output: CheckResult) -> Option {\n output.into()\n }\n}", + "after_code": "impl EligibilityCheck for CardTestingCheck {\n type Output = CheckResult;\n\n async fn should_run(\n &self,\n _state: &SessionState,\n _merchant_context: &domain::MerchantContext,\n ) -> CustomResult {\n // This check is always run as there is no runtime config enablement\n Ok(true)\n }\n\n async fn execute_check(\n &self,\n state: &SessionState,\n _merchant_context: &domain::MerchantContext,\n payment_elgibility_data: &PaymentEligibilityData,\n business_profile: &domain::Profile,\n ) -> CustomResult {\n match &payment_elgibility_data.payment_method_data {\n Some(domain::PaymentMethodData::Card(card)) => {\n match card_testing_guard_utils::validate_card_testing_guard_checks(\n state,\n payment_elgibility_data\n .browser_info\n .as_ref()\n .map(|browser_info| browser_info.peek()),\n card.card_number.clone(),\n &payment_elgibility_data.payment_intent.customer_id,\n business_profile,\n )\n .await\n {\n // If validation succeeds, allow the payment\n Ok(_) => Ok(CheckResult::Allow),\n // If validation fails, check the error type\n Err(e) => match e.current_context() {\n // If it's a PreconditionFailed error, deny with message\n errors::ApiErrorResponse::PreconditionFailed { message } => {\n Ok(CheckResult::Deny {\n message: message.to_string(),\n })\n }\n // For any other error, propagate it\n _ => Err(e),\n },\n }\n }\n // If payment method is not card, allow\n _ => Ok(CheckResult::Allow),\n }\n }\n\n fn transform(output: CheckResult) -> Option {\n output.into()\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_payment_intent_status", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }", + "after_code": "fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_payment_method_info", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod> {\n todo!()\n }", + "after_code": "fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::function::deserialize_optional_hashset", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn deserialize_optional_hashset<'a, D, T>(deserializer: D) -> Result>, D::Error>\nwhere\n D: serde::Deserializer<'a>,\n T: Eq + std::str::FromStr + std::hash::Hash,\n ::Err: std::fmt::Display,\n{\n use serde::de::Error;\n\n >::deserialize(deserializer).map(|value| {\n value.map_or(Ok(None), |inner: String| {\n let list = deserialize_hashset_inner(inner).map_err(D::Error::custom)?;\n match list.len() {\n 0 => Ok(None),\n _ => Ok(Some(list)),\n }\n })\n })?\n}", + "after_code": "fn deserialize_optional_hashset<'a, D, T>(deserializer: D) -> Result>, D::Error>\nwhere\n D: serde::Deserializer<'a>,\n T: Eq + std::str::FromStr + std::hash::Hash,\n ::Err: std::fmt::Display,\n{\n use serde::de::Error;\n\n >::deserialize(deserializer).map(|value| {\n value.map_or(Ok(None), |inner: String| {\n let list = deserialize_hashset_inner(inner).map_err(D::Error::custom)?;\n match list.len() {\n 0 => Ok(None),\n _ => Ok(Some(list)),\n }\n })\n })?\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use super::deserialize_hashset;", + "use serde::de::Error;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use serde::de::Error;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_pre_routing_result", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_pre_routing_result(\n &self,\n ) -> Option> {\n None\n }", + "after_code": "fn get_pre_routing_result(\n &self,\n ) -> Option> {\n None\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::PayoutLink", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl PayoutLink {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/payout_link\").app_data(web::Data::new(state));\n route = route.service(\n web::resource(\"/{merchant_id}/{payout_id}\").route(web::get().to(render_payout_link)),\n );\n route\n }\n}", + "after_code": "impl PayoutLink {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/payout_link\").app_data(web::Data::new(state));\n route = route.service(\n web::resource(\"/{merchant_id}/{payout_id}\").route(web::get().to(render_payout_link)),\n );\n route\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_connector_in_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_in_payment_attempt(&mut self, connector: Option) {\n self.payment_attempt.connector = connector;\n }", + "after_code": "fn set_connector_in_payment_attempt(&mut self, connector: Option) {\n self.payment_attempt.connector = connector;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Subscription::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n let route = web::scope(\"/subscriptions\").app_data(web::Data::new(state.clone()));\n\n route\n .service(\n web::resource(\"\").route(web::post().to(|state, req, payload| {\n subscription::create_and_confirm_subscription(state, req, payload)\n })),\n )\n .service(web::resource(\"/create\").route(\n web::post().to(|state, req, payload| {\n subscription::create_subscription(state, req, payload)\n }),\n ))\n .service(web::resource(\"/estimate\").route(web::get().to(subscription::get_estimate)))\n .service(\n web::resource(\"/plans\").route(web::get().to(subscription::get_subscription_plans)),\n )\n .service(\n web::resource(\"/{subscription_id}/confirm\").route(web::post().to(\n |state, req, id, payload| {\n subscription::confirm_subscription(state, req, id, payload)\n },\n )),\n )\n .service(\n web::resource(\"/{subscription_id}/update\").route(web::put().to(\n |state, req, id, payload| {\n subscription::update_subscription(state, req, id, payload)\n },\n )),\n )\n .service(\n web::resource(\"/{subscription_id}\")\n .route(web::get().to(subscription::get_subscription)),\n )\n .service(\n web::resource(\"/{subscription_id}/pause\")\n .route(web::post().to(subscription::pause_subscription)),\n )\n .service(\n web::resource(\"/{subscription_id}/resume\")\n .route(web::post().to(subscription::resume_subscription)),\n )\n .service(\n web::resource(\"/{subscription_id}/cancel\")\n .route(web::post().to(subscription::cancel_subscription)),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n let route = web::scope(\"/subscriptions\").app_data(web::Data::new(state.clone()));\n\n route\n .service(\n web::resource(\"\").route(web::post().to(|state, req, payload| {\n subscription::create_and_confirm_subscription(state, req, payload)\n })),\n )\n .service(web::resource(\"/create\").route(\n web::post().to(|state, req, payload| {\n subscription::create_subscription(state, req, payload)\n }),\n ))\n .service(web::resource(\"/estimate\").route(web::get().to(subscription::get_estimate)))\n .service(\n web::resource(\"/plans\").route(web::get().to(subscription::get_subscription_plans)),\n )\n .service(\n web::resource(\"/{subscription_id}/confirm\").route(web::post().to(\n |state, req, id, payload| {\n subscription::confirm_subscription(state, req, id, payload)\n },\n )),\n )\n .service(\n web::resource(\"/{subscription_id}/update\").route(web::put().to(\n |state, req, id, payload| {\n subscription::update_subscription(state, req, id, payload)\n },\n )),\n )\n .service(\n web::resource(\"/{subscription_id}\")\n .route(web::get().to(subscription::get_subscription)),\n )\n .service(\n web::resource(\"/{subscription_id}/pause\")\n .route(web::post().to(subscription::pause_subscription)),\n )\n .service(\n web::resource(\"/{subscription_id}/resume\")\n .route(web::post().to(subscription::resume_subscription)),\n )\n .service(\n web::resource(\"/{subscription_id}/cancel\")\n .route(web::post().to(subscription::cancel_subscription)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::internal_payments_operation_core", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn internal_payments_operation_core(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: &domain::Profile,\n operation: Op,\n req: Req,\n get_tracker_response: operations::GetTrackerResponse,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n) -> RouterResult<(\n D,\n Req,\n Option,\n Option,\n common_types::domain::ConnectorResponseData,\n)>\nwhere\n F: Send + Clone + Sync,\n Req: Send + Sync + Authenticate,\n Op: Operation + Send + Sync,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n\n // To create connector flow specific interface data\n D: ConstructFlowSpecificData,\n RouterData: Feature,\n\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n\n RouterData:\n hyperswitch_domain_models::router_data::TrackerPostUpdateObjects,\n\n // To perform router related operation for PaymentResponse\n PaymentResponse: Operation,\n FData: Send + Sync + Clone + serde::Serialize,\n{\n let operation: BoxedOperation<'_, F, Req, D> = Box::new(operation);\n\n // Get the trackers related to track the state of the payment\n let operations::GetTrackerResponse { mut payment_data } = get_tracker_response;\n\n let connector_data = operation\n .to_domain()?\n .get_connector_from_request(state, &req, &mut payment_data)\n .await?;\n\n let merchant_connector_account = payment_data\n .get_merchant_connector_details()\n .map(domain::MerchantConnectorAccountTypeDetails::MerchantConnectorDetails)\n .ok_or_else(|| {\n error_stack::report!(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Merchant connector details not found in payment data\")\n })?;\n\n operation\n .to_domain()?\n .populate_payment_data(\n state,\n &mut payment_data,\n &merchant_context,\n profile,\n &connector_data,\n )\n .await?;\n\n let router_data = connector_service_decider(\n state,\n req_state.clone(),\n &merchant_context,\n connector_data.clone(),\n &operation,\n &mut payment_data,\n call_connector_action.clone(),\n header_payload.clone(),\n profile,\n req.should_return_raw_response(),\n merchant_connector_account,\n )\n .await?;\n\n let connector_response_data = common_types::domain::ConnectorResponseData {\n raw_connector_response: router_data.raw_connector_response.clone(),\n };\n\n let payments_response_operation = Box::new(PaymentResponse);\n\n let connector_http_status_code = router_data.connector_http_status_code;\n add_connector_http_status_code_metrics(connector_http_status_code);\n\n let payment_data = payments_response_operation\n .to_post_update_tracker()?\n .update_tracker(\n state,\n payment_data,\n router_data,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await?;\n\n Ok((\n payment_data,\n req,\n connector_http_status_code,\n None,\n connector_response_data,\n ))\n}", + "after_code": "pub async fn internal_payments_operation_core(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: &domain::Profile,\n operation: Op,\n req: Req,\n get_tracker_response: operations::GetTrackerResponse,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n) -> RouterResult<(\n D,\n Req,\n Option,\n Option,\n common_types::domain::ConnectorResponseData,\n)>\nwhere\n F: Send + Clone + Sync,\n Req: Send + Sync + Authenticate,\n Op: Operation + Send + Sync,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n\n // To create connector flow specific interface data\n D: ConstructFlowSpecificData,\n RouterData: Feature,\n\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n\n RouterData:\n hyperswitch_domain_models::router_data::TrackerPostUpdateObjects,\n\n // To perform router related operation for PaymentResponse\n PaymentResponse: Operation,\n FData: Send + Sync + Clone + serde::Serialize,\n{\n let operation: BoxedOperation<'_, F, Req, D> = Box::new(operation);\n\n // Get the trackers related to track the state of the payment\n let operations::GetTrackerResponse { mut payment_data } = get_tracker_response;\n\n let connector_data = operation\n .to_domain()?\n .get_connector_from_request(state, &req, &mut payment_data)\n .await?;\n\n let merchant_connector_account = payment_data\n .get_merchant_connector_details()\n .map(domain::MerchantConnectorAccountTypeDetails::MerchantConnectorDetails)\n .ok_or_else(|| {\n error_stack::report!(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Merchant connector details not found in payment data\")\n })?;\n\n operation\n .to_domain()?\n .populate_payment_data(\n state,\n &mut payment_data,\n &merchant_context,\n profile,\n &connector_data,\n )\n .await?;\n\n let router_data = connector_service_decider(\n state,\n req_state.clone(),\n &merchant_context,\n connector_data.clone(),\n &operation,\n &mut payment_data,\n call_connector_action.clone(),\n header_payload.clone(),\n profile,\n req.should_return_raw_response(),\n merchant_connector_account,\n )\n .await?;\n\n let connector_response_data = common_types::domain::ConnectorResponseData {\n raw_connector_response: router_data.raw_connector_response.clone(),\n };\n\n let payments_response_operation = Box::new(PaymentResponse);\n\n let connector_http_status_code = router_data.connector_http_status_code;\n add_connector_http_status_code_metrics(connector_http_status_code);\n\n let payment_data = payments_response_operation\n .to_post_update_tracker()?\n .update_tracker(\n state,\n payment_data,\n router_data,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await?;\n\n Ok((\n payment_data,\n req,\n connector_http_status_code,\n None,\n connector_response_data,\n ))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use error_stack::{report, ResultExt};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use error_stack::{report, ResultExt};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::enum::ActionType", + "file": "crates/router/src/core/payments.rs", + "kind": "enum_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub enum ActionType {\n NetworkTokenWithNetworkTransactionId(NTWithNTIRef),\n CardWithNetworkTransactionId(String), // Network Transaction Id\n #[cfg(feature = \"v1\")]\n ConnectorMandate(hyperswitch_domain_models::mandates::PaymentsMandateReference),\n}", + "after_code": "pub enum ActionType {\n NetworkTokenWithNetworkTransactionId(NTWithNTIRef),\n CardWithNetworkTransactionId(String), // Network Transaction Id\n #[cfg(feature = \"v1\")]\n ConnectorMandate(hyperswitch_domain_models::mandates::PaymentsMandateReference),\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_token(&self) -> Option<&str> {\n todo!()\n }", + "after_code": "fn get_token(&self) -> Option<&str> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::TaxData", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct TaxData {\n pub shipping_details: hyperswitch_domain_models::address::Address,\n pub payment_method_type: enums::PaymentMethodType,\n}", + "after_code": "pub struct TaxData {\n pub shipping_details: hyperswitch_domain_models::address::Address,\n pub payment_method_type: enums::PaymentMethodType,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_cancellation_reason", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n self.payment_attempt.cancellation_reason = cancellation_reason;\n }", + "after_code": "fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n self.payment_attempt.cancellation_reason = cancellation_reason;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::ConnectorRequestReferenceIdConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ConnectorRequestReferenceIdConfig {\n pub merchant_ids_send_payment_id_as_connector_request_id: HashSet,\n}", + "after_code": "pub struct ConnectorRequestReferenceIdConfig {\n pub merchant_ids_send_payment_id_as_connector_request_id: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::{HashMap, HashSet};", + "use std::collections::HashSet;" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_setup_mandate", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_setup_mandate(&self) -> Option<&MandateData> {\n todo!()\n }", + "after_code": "fn get_setup_mandate(&self) -> Option<&MandateData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_payment_link_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_link_data(&self) -> Option {\n self.payment_link_data.clone()\n }", + "after_code": "fn get_payment_link_data(&self) -> Option {\n self.payment_link_data.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_payment_method_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_token(&mut self, payment_method_token: Option) {\n self.payment_method_token = payment_method_token;\n }", + "after_code": "fn set_payment_method_token(&mut self, payment_method_token: Option) {\n self.payment_method_token = payment_method_token;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_ephemeral_key", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_ephemeral_key(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_ephemeral_key(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_mandate_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }", + "after_code": "fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::payments_api::NetworkTokenWithNTIRef", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl From for payments_api::NetworkTokenWithNTIRef {\n fn from(network_token_data: NTWithNTIRef) -> Self {\n Self {\n network_transaction_id: network_token_data.network_transaction_id,\n token_exp_month: network_token_data.token_exp_month,\n token_exp_year: network_token_data.token_exp_year,\n }\n }\n}", + "after_code": "impl From for payments_api::NetworkTokenWithNTIRef {\n fn from(network_token_data: NTWithNTIRef) -> Self {\n Self {\n network_transaction_id: network_token_data.network_transaction_id,\n token_exp_month: network_token_data.token_exp_month,\n token_exp_year: network_token_data.token_exp_year,\n }\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_connector_request_reference_id_in_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n todo!()\n }", + "after_code": "fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Customers", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Customers;", + "after_code": "pub struct Customers;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_connector_in_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_in_payment_attempt(&mut self, connector: Option) {\n todo!()\n }", + "after_code": "fn set_connector_in_payment_attempt(&mut self, connector: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/psync_flow.rs::types::RouterData::function::build_flow_specific_connector_request", + "file": "crates/router/src/core/payments/flows/psync_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n //validate_psync_reference_id if call_connector_action is trigger\n if connector\n .connector\n .validate_psync_reference_id(\n &self.request,\n self.is_three_ds(),\n self.status,\n self.connector_meta_data.clone(),\n )\n .is_err()\n {\n logger::warn!(\n \"validate_psync_reference_id failed, hence skipping call to connector\"\n );\n return Ok((None, false));\n }\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PSync,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }", + "after_code": "async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n //validate_psync_reference_id if call_connector_action is trigger\n if connector\n .connector\n .validate_psync_reference_id(\n &self.request,\n self.is_three_ds(),\n self.status,\n self.connector_meta_data.clone(),\n )\n .is_err()\n {\n logger::warn!(\n \"validate_psync_reference_id failed, hence skipping call to connector\"\n );\n return Ok((None, false));\n }\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PSync,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n};" + ], + "after_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::{\n api::gateway,\n unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n },\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::CurrencyCountryFlowFilter", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct CurrencyCountryFlowFilter {\n #[serde(deserialize_with = \"deserialize_optional_hashset\")]\n pub currency: Option>,\n #[serde(deserialize_with = \"deserialize_optional_hashset\")]\n pub country: Option>,\n pub not_available_flows: Option,\n}", + "after_code": "pub struct CurrencyCountryFlowFilter {\n #[serde(deserialize_with = \"deserialize_optional_hashset\")]\n pub currency: Option>,\n #[serde(deserialize_with = \"deserialize_optional_hashset\")]\n pub country: Option>,\n pub not_available_flows: Option,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use api_models::enums;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_refunds", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_refunds(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_refunds(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::trait::EligibilityCheck", + "file": "crates/router/src/core/payments.rs", + "kind": "trait_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "trait EligibilityCheck {\n type Output;\n\n // Determine if the check should be run based on the runtime checks\n async fn should_run(\n &self,\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n ) -> CustomResult;\n\n // Run the actual check and return the SDK Next Action if applicable\n async fn execute_check(\n &self,\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n payment_elgibility_data: &PaymentEligibilityData,\n business_profile: &domain::Profile,\n ) -> CustomResult;\n\n fn transform(output: Self::Output) -> Option;\n}", + "after_code": "trait EligibilityCheck {\n type Output;\n\n // Determine if the check should be run based on the runtime checks\n async fn should_run(\n &self,\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n ) -> CustomResult;\n\n // Run the actual check and return the SDK Next Action if applicable\n async fn execute_check(\n &self,\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n payment_elgibility_data: &PaymentEligibilityData,\n business_profile: &domain::Profile,\n ) -> CustomResult;\n\n fn transform(output: Self::Output) -> Option;\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_mandate_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_mandate_id(&self) -> Option<&payments_api::MandateIds> {\n todo!()\n }", + "after_code": "fn get_mandate_id(&self) -> Option<&payments_api::MandateIds> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::populate_surcharge_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn populate_surcharge_details(\n state: &SessionState,\n payment_data: &mut PaymentData,\n) -> RouterResult<()>\nwhere\n F: Send + Clone,\n{\n if payment_data\n .payment_intent\n .surcharge_applicable\n .unwrap_or(false)\n {\n logger::debug!(\"payment_intent.surcharge_applicable = true\");\n if let Some(surcharge_details) = payment_data.payment_attempt.get_surcharge_details() {\n // if retry payment, surcharge would have been populated from the previous attempt. Use the same surcharge\n let surcharge_details =\n types::SurchargeDetails::from((&surcharge_details, &payment_data.payment_attempt));\n payment_data.surcharge_details = Some(surcharge_details);\n return Ok(());\n }\n let raw_card_key = payment_data\n .payment_method_data\n .as_ref()\n .and_then(helpers::get_key_params_for_surcharge_details)\n .map(|(payment_method, payment_method_type, card_network)| {\n types::SurchargeKey::PaymentMethodData(\n payment_method,\n payment_method_type,\n card_network,\n )\n });\n let saved_card_key = payment_data.token.clone().map(types::SurchargeKey::Token);\n\n let surcharge_key = raw_card_key\n .or(saved_card_key)\n .get_required_value(\"payment_method_data or payment_token\")?;\n logger::debug!(surcharge_key_confirm =? surcharge_key);\n\n let calculated_surcharge_details =\n match types::SurchargeMetadata::get_individual_surcharge_detail_from_redis(\n state,\n surcharge_key,\n &payment_data.payment_attempt.attempt_id,\n )\n .await\n {\n Ok(surcharge_details) => Some(surcharge_details),\n Err(err) if err.current_context() == &RedisError::NotFound => None,\n Err(err) => {\n Err(err).change_context(errors::ApiErrorResponse::InternalServerError)?\n }\n };\n\n payment_data.surcharge_details = calculated_surcharge_details.clone();\n\n //Update payment_attempt net_amount with surcharge details\n payment_data\n .payment_attempt\n .net_amount\n .set_surcharge_details(calculated_surcharge_details);\n } else {\n let surcharge_details =\n payment_data\n .payment_attempt\n .get_surcharge_details()\n .map(|surcharge_details| {\n logger::debug!(\"surcharge sent in payments create request\");\n types::SurchargeDetails::from((\n &surcharge_details,\n &payment_data.payment_attempt,\n ))\n });\n payment_data.surcharge_details = surcharge_details;\n }\n Ok(())\n}", + "after_code": "async fn populate_surcharge_details(\n state: &SessionState,\n payment_data: &mut PaymentData,\n) -> RouterResult<()>\nwhere\n F: Send + Clone,\n{\n if payment_data\n .payment_intent\n .surcharge_applicable\n .unwrap_or(false)\n {\n logger::debug!(\"payment_intent.surcharge_applicable = true\");\n if let Some(surcharge_details) = payment_data.payment_attempt.get_surcharge_details() {\n // if retry payment, surcharge would have been populated from the previous attempt. Use the same surcharge\n let surcharge_details =\n types::SurchargeDetails::from((&surcharge_details, &payment_data.payment_attempt));\n payment_data.surcharge_details = Some(surcharge_details);\n return Ok(());\n }\n let raw_card_key = payment_data\n .payment_method_data\n .as_ref()\n .and_then(helpers::get_key_params_for_surcharge_details)\n .map(|(payment_method, payment_method_type, card_network)| {\n types::SurchargeKey::PaymentMethodData(\n payment_method,\n payment_method_type,\n card_network,\n )\n });\n let saved_card_key = payment_data.token.clone().map(types::SurchargeKey::Token);\n\n let surcharge_key = raw_card_key\n .or(saved_card_key)\n .get_required_value(\"payment_method_data or payment_token\")?;\n logger::debug!(surcharge_key_confirm =? surcharge_key);\n\n let calculated_surcharge_details =\n match types::SurchargeMetadata::get_individual_surcharge_detail_from_redis(\n state,\n surcharge_key,\n &payment_data.payment_attempt.attempt_id,\n )\n .await\n {\n Ok(surcharge_details) => Some(surcharge_details),\n Err(err) if err.current_context() == &RedisError::NotFound => None,\n Err(err) => {\n Err(err).change_context(errors::ApiErrorResponse::InternalServerError)?\n }\n };\n\n payment_data.surcharge_details = calculated_surcharge_details.clone();\n\n //Update payment_attempt net_amount with surcharge details\n payment_data\n .payment_attempt\n .net_amount\n .set_surcharge_details(calculated_surcharge_details);\n } else {\n let surcharge_details =\n payment_data\n .payment_attempt\n .get_surcharge_details()\n .map(|surcharge_details| {\n logger::debug!(\"surcharge sent in payments create request\");\n types::SurchargeDetails::from((\n &surcharge_details,\n &payment_data.payment_attempt,\n ))\n });\n payment_data.surcharge_details = surcharge_details;\n }\n Ok(())\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use redis_interface::errors::RedisError;" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use redis_interface::errors::RedisError;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_payment_attempt_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_attempt_connector(&self) -> Option<&str> {\n todo!()\n }", + "after_code": "fn get_payment_attempt_connector(&self) -> Option<&str> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_disputes", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_disputes(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_disputes(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_co_badged_card_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }", + "after_code": "fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::ProxyStatusMapping", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ProxyStatusMapping {\n pub proxy_connector_http_status_code: bool,\n}", + "after_code": "pub struct ProxyStatusMapping {\n pub proxy_connector_http_status_code: bool,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_poll_config", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_poll_config(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_poll_config(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_connector_request_reference_id_in_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n _connector_request_reference_id: String,\n ) {\n todo!()\n }", + "after_code": "fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n _connector_request_reference_id: String,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::to_event", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn to_event(&self) -> PaymentEvent {\n PaymentEvent {\n payment_intent: self.payment_intent.clone(),\n payment_attempt: self.payment_attempt.clone(),\n }\n }", + "after_code": "fn to_event(&self) -> PaymentEvent {\n PaymentEvent {\n payment_intent: self.payment_intent.clone(),\n payment_attempt: self.payment_attempt.clone(),\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::GooglePayPaymentProcessingDetails", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct GooglePayPaymentProcessingDetails {\n pub google_pay_private_key: Secret,\n pub google_pay_root_signing_keys: Secret,\n pub google_pay_recipient_id: Secret,\n}", + "after_code": "pub struct GooglePayPaymentProcessingDetails {\n pub google_pay_private_key: Secret,\n pub google_pay_root_signing_keys: Secret,\n pub google_pay_recipient_id: Secret,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::User::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/user\").app_data(web::Data::new(state.clone()));\n\n route = route\n .service(web::resource(\"\").route(web::get().to(user::get_user_details)))\n .service(web::resource(\"/signin\").route(web::post().to(user::user_signin)))\n .service(web::resource(\"/v2/signin\").route(web::post().to(user::user_signin)))\n // signin/signup with sso using openidconnect\n .service(web::resource(\"/oidc\").route(web::post().to(user::sso_sign)))\n .service(web::resource(\"/signout\").route(web::post().to(user::signout)))\n .service(web::resource(\"/rotate_password\").route(web::post().to(user::rotate_password)))\n .service(web::resource(\"/change_password\").route(web::post().to(user::change_password)))\n .service(\n web::resource(\"/internal_signup\").route(web::post().to(user::internal_user_signup)),\n )\n .service(\n web::resource(\"/tenant_signup\").route(web::post().to(user::create_tenant_user)),\n )\n .service(web::resource(\"/create_org\").route(web::post().to(user::user_org_create)))\n .service(\n web::resource(\"/create_merchant\")\n .route(web::post().to(user::user_merchant_account_create)),\n )\n // TODO: To be deprecated\n .service(\n web::resource(\"/permission_info\")\n .route(web::get().to(user_role::get_authorization_info)),\n )\n // TODO: To be deprecated\n .service(\n web::resource(\"/module/list\").route(web::get().to(user_role::get_role_information)),\n )\n .service(\n web::resource(\"/parent/list\")\n .route(web::get().to(user_role::get_parent_group_info)),\n )\n .service(\n web::resource(\"/update\").route(web::post().to(user::update_user_account_details)),\n )\n .service(\n web::resource(\"/data\")\n .route(web::get().to(user::get_multiple_dashboard_metadata))\n .route(web::post().to(user::set_dashboard_metadata)),\n );\n\n if state.conf.platform.enabled {\n route = route.service(\n web::resource(\"/create_platform\").route(web::post().to(user::create_platform)),\n )\n }\n\n route = route\n .service(web::scope(\"/key\").service(\n web::resource(\"/transfer\").route(web::post().to(user::transfer_user_key)),\n ));\n\n route = route.service(\n web::scope(\"/list\")\n .service(web::resource(\"/org\").route(web::get().to(user::list_orgs_for_user)))\n .service(\n web::resource(\"/merchant\")\n .route(web::get().to(user::list_merchants_for_user_in_org)),\n )\n .service(\n web::resource(\"/profile\")\n .route(web::get().to(user::list_profiles_for_user_in_org_and_merchant)),\n )\n .service(\n web::resource(\"/invitation\")\n .route(web::get().to(user_role::list_invitations_for_user)),\n ),\n );\n\n route = route.service(\n web::scope(\"/switch\")\n .service(web::resource(\"/org\").route(web::post().to(user::switch_org_for_user)))\n .service(\n web::resource(\"/merchant\")\n .route(web::post().to(user::switch_merchant_for_user_in_org)),\n )\n .service(\n web::resource(\"/profile\")\n .route(web::post().to(user::switch_profile_for_user_in_org_and_merchant)),\n ),\n );\n\n // Two factor auth routes\n route = route.service(\n web::scope(\"/2fa\")\n // TODO: to be deprecated\n .service(web::resource(\"\").route(web::get().to(user::check_two_factor_auth_status)))\n .service(\n web::resource(\"/v2\")\n .route(web::get().to(user::check_two_factor_auth_status_with_attempts)),\n )\n .service(\n web::scope(\"/totp\")\n .service(web::resource(\"/begin\").route(web::get().to(user::totp_begin)))\n .service(web::resource(\"/reset\").route(web::get().to(user::totp_reset)))\n .service(\n web::resource(\"/verify\")\n .route(web::post().to(user::totp_verify))\n .route(web::put().to(user::totp_update)),\n ),\n )\n .service(\n web::scope(\"/recovery_code\")\n .service(\n web::resource(\"/verify\")\n .route(web::post().to(user::verify_recovery_code)),\n )\n .service(\n web::resource(\"/generate\")\n .route(web::get().to(user::generate_recovery_codes)),\n ),\n )\n .service(\n web::resource(\"/terminate\")\n .route(web::get().to(user::terminate_two_factor_auth)),\n ),\n );\n\n route = route.service(\n web::scope(\"/auth\")\n .service(\n web::resource(\"\")\n .route(web::post().to(user::create_user_authentication_method))\n .route(web::put().to(user::update_user_authentication_method)),\n )\n .service(\n web::resource(\"/list\")\n .route(web::get().to(user::list_user_authentication_methods)),\n )\n .service(web::resource(\"/url\").route(web::get().to(user::get_sso_auth_url)))\n .service(\n web::resource(\"/select\").route(web::post().to(user::terminate_auth_select)),\n ),\n );\n\n #[cfg(feature = \"email\")]\n {\n route = route\n .service(web::resource(\"/from_email\").route(web::post().to(user::user_from_email)))\n .service(\n web::resource(\"/connect_account\")\n .route(web::post().to(user::user_connect_account)),\n )\n .service(\n web::resource(\"/forgot_password\").route(web::post().to(user::forgot_password)),\n )\n .service(\n web::resource(\"/reset_password\").route(web::post().to(user::reset_password)),\n )\n .service(\n web::resource(\"/signup_with_merchant_id\")\n .route(web::post().to(user::user_signup_with_merchant_id)),\n )\n .service(web::resource(\"/verify_email\").route(web::post().to(user::verify_email)))\n .service(\n web::resource(\"/v2/verify_email\").route(web::post().to(user::verify_email)),\n )\n .service(\n web::resource(\"/verify_email_request\")\n .route(web::post().to(user::verify_email_request)),\n )\n .service(\n web::resource(\"/user/resend_invite\").route(web::post().to(user::resend_invite)),\n )\n .service(\n web::resource(\"/accept_invite_from_email\")\n .route(web::post().to(user::accept_invite_from_email)),\n );\n }\n #[cfg(not(feature = \"email\"))]\n {\n route = route.service(web::resource(\"/signup\").route(web::post().to(user::user_signup)))\n }\n\n // User management\n route = route.service(\n web::scope(\"/user\")\n .service(web::resource(\"\").route(web::post().to(user::list_user_roles_details)))\n // TODO: To be deprecated\n .service(web::resource(\"/v2\").route(web::post().to(user::list_user_roles_details)))\n .service(\n web::resource(\"/list\").route(web::get().to(user_role::list_users_in_lineage)),\n )\n // TODO: To be deprecated\n .service(\n web::resource(\"/v2/list\")\n .route(web::get().to(user_role::list_users_in_lineage)),\n )\n .service(\n web::resource(\"/invite_multiple\")\n .route(web::post().to(user::invite_multiple_user)),\n )\n .service(\n web::scope(\"/invite/accept\")\n .service(\n web::resource(\"\")\n .route(web::post().to(user_role::accept_invitations_v2)),\n )\n .service(\n web::resource(\"/pre_auth\")\n .route(web::post().to(user_role::accept_invitations_pre_auth)),\n )\n .service(\n web::scope(\"/v2\")\n .service(\n web::resource(\"\")\n .route(web::post().to(user_role::accept_invitations_v2)),\n )\n .service(\n web::resource(\"/pre_auth\").route(\n web::post().to(user_role::accept_invitations_pre_auth),\n ),\n ),\n ),\n )\n .service(\n web::resource(\"/update_role\")\n .route(web::post().to(user_role::update_user_role)),\n )\n .service(\n web::resource(\"/delete\").route(web::delete().to(user_role::delete_user_role)),\n ),\n );\n\n if state.conf().clone_connector_allowlist.is_some() {\n route = route.service(\n web::resource(\"/clone_connector\").route(web::post().to(user::clone_connector)),\n );\n }\n\n // Role information\n route =\n route.service(\n web::scope(\"/role\")\n .service(\n web::resource(\"\")\n .route(web::get().to(user_role::get_role_from_token))\n // TODO: To be deprecated\n .route(web::post().to(user_role::create_role)),\n )\n .service(\n web::resource(\"/v2\")\n .route(web::post().to(user_role::create_role_v2))\n .route(\n web::get()\n .to(user_role::get_groups_and_resources_for_role_from_token),\n ),\n )\n .service(web::resource(\"/v3\").route(\n web::get().to(user_role::get_parent_groups_info_for_role_from_token),\n ))\n // TODO: To be deprecated\n .service(\n web::resource(\"/v2/list\")\n .route(web::get().to(user_role::list_roles_with_info)),\n )\n .service(\n web::scope(\"/list\")\n .service(\n web::resource(\"\")\n .route(web::get().to(user_role::list_roles_with_info)),\n )\n .service(web::resource(\"/invite\").route(\n web::get().to(user_role::list_invitable_roles_at_entity_level),\n ))\n .service(web::resource(\"/update\").route(\n web::get().to(user_role::list_updatable_roles_at_entity_level),\n )),\n )\n .service(\n web::resource(\"/{role_id}\")\n .route(web::get().to(user_role::get_role))\n .route(web::put().to(user_role::update_role)),\n )\n .service(\n web::resource(\"/{role_id}/v2\")\n .route(web::get().to(user_role::get_parent_info_for_role)),\n ),\n );\n\n #[cfg(feature = \"dummy_connector\")]\n {\n route = route.service(\n web::resource(\"/sample_data\")\n .route(web::post().to(user::generate_sample_data))\n .route(web::delete().to(user::delete_sample_data)),\n )\n }\n // Admin Theme\n // TODO: To be deprecated\n route = route.service(\n web::scope(\"/admin/theme\")\n .service(\n web::resource(\"\")\n .route(web::get().to(user::theme::get_theme_using_lineage))\n .route(web::post().to(user::theme::create_theme)),\n )\n .service(\n web::resource(\"/{theme_id}\")\n .route(web::get().to(user::theme::get_theme_using_theme_id))\n .route(web::put().to(user::theme::update_theme))\n .route(web::post().to(user::theme::upload_file_to_theme_storage))\n .route(web::delete().to(user::theme::delete_theme)),\n ),\n );\n // User Theme\n route = route.service(\n web::scope(\"/theme\")\n .service(\n web::resource(\"\")\n .route(web::post().to(user::theme::create_user_theme))\n .route(web::get().to(user::theme::get_user_theme_using_lineage)),\n )\n .service(\n web::resource(\"/list\")\n .route(web::get().to(user::theme::list_all_themes_in_lineage)),\n )\n .service(\n web::resource(\"/{theme_id}\")\n .route(web::get().to(user::theme::get_user_theme_using_theme_id))\n .route(web::put().to(user::theme::update_user_theme))\n .route(web::post().to(user::theme::upload_file_to_user_theme_storage))\n .route(web::delete().to(user::theme::delete_user_theme)),\n ),\n );\n route\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/user\").app_data(web::Data::new(state.clone()));\n\n route = route\n .service(web::resource(\"\").route(web::get().to(user::get_user_details)))\n .service(web::resource(\"/signin\").route(web::post().to(user::user_signin)))\n .service(web::resource(\"/v2/signin\").route(web::post().to(user::user_signin)))\n // signin/signup with sso using openidconnect\n .service(web::resource(\"/oidc\").route(web::post().to(user::sso_sign)))\n .service(web::resource(\"/signout\").route(web::post().to(user::signout)))\n .service(web::resource(\"/rotate_password\").route(web::post().to(user::rotate_password)))\n .service(web::resource(\"/change_password\").route(web::post().to(user::change_password)))\n .service(\n web::resource(\"/internal_signup\").route(web::post().to(user::internal_user_signup)),\n )\n .service(\n web::resource(\"/tenant_signup\").route(web::post().to(user::create_tenant_user)),\n )\n .service(web::resource(\"/create_org\").route(web::post().to(user::user_org_create)))\n .service(\n web::resource(\"/create_merchant\")\n .route(web::post().to(user::user_merchant_account_create)),\n )\n // TODO: To be deprecated\n .service(\n web::resource(\"/permission_info\")\n .route(web::get().to(user_role::get_authorization_info)),\n )\n // TODO: To be deprecated\n .service(\n web::resource(\"/module/list\").route(web::get().to(user_role::get_role_information)),\n )\n .service(\n web::resource(\"/parent/list\")\n .route(web::get().to(user_role::get_parent_group_info)),\n )\n .service(\n web::resource(\"/update\").route(web::post().to(user::update_user_account_details)),\n )\n .service(\n web::resource(\"/data\")\n .route(web::get().to(user::get_multiple_dashboard_metadata))\n .route(web::post().to(user::set_dashboard_metadata)),\n );\n\n if state.conf.platform.enabled {\n route = route.service(\n web::resource(\"/create_platform\").route(web::post().to(user::create_platform)),\n )\n }\n\n route = route\n .service(web::scope(\"/key\").service(\n web::resource(\"/transfer\").route(web::post().to(user::transfer_user_key)),\n ));\n\n route = route.service(\n web::scope(\"/list\")\n .service(web::resource(\"/org\").route(web::get().to(user::list_orgs_for_user)))\n .service(\n web::resource(\"/merchant\")\n .route(web::get().to(user::list_merchants_for_user_in_org)),\n )\n .service(\n web::resource(\"/profile\")\n .route(web::get().to(user::list_profiles_for_user_in_org_and_merchant)),\n )\n .service(\n web::resource(\"/invitation\")\n .route(web::get().to(user_role::list_invitations_for_user)),\n ),\n );\n\n route = route.service(\n web::scope(\"/switch\")\n .service(web::resource(\"/org\").route(web::post().to(user::switch_org_for_user)))\n .service(\n web::resource(\"/merchant\")\n .route(web::post().to(user::switch_merchant_for_user_in_org)),\n )\n .service(\n web::resource(\"/profile\")\n .route(web::post().to(user::switch_profile_for_user_in_org_and_merchant)),\n ),\n );\n\n // Two factor auth routes\n route = route.service(\n web::scope(\"/2fa\")\n // TODO: to be deprecated\n .service(web::resource(\"\").route(web::get().to(user::check_two_factor_auth_status)))\n .service(\n web::resource(\"/v2\")\n .route(web::get().to(user::check_two_factor_auth_status_with_attempts)),\n )\n .service(\n web::scope(\"/totp\")\n .service(web::resource(\"/begin\").route(web::get().to(user::totp_begin)))\n .service(web::resource(\"/reset\").route(web::get().to(user::totp_reset)))\n .service(\n web::resource(\"/verify\")\n .route(web::post().to(user::totp_verify))\n .route(web::put().to(user::totp_update)),\n ),\n )\n .service(\n web::scope(\"/recovery_code\")\n .service(\n web::resource(\"/verify\")\n .route(web::post().to(user::verify_recovery_code)),\n )\n .service(\n web::resource(\"/generate\")\n .route(web::get().to(user::generate_recovery_codes)),\n ),\n )\n .service(\n web::resource(\"/terminate\")\n .route(web::get().to(user::terminate_two_factor_auth)),\n ),\n );\n\n route = route.service(\n web::scope(\"/auth\")\n .service(\n web::resource(\"\")\n .route(web::post().to(user::create_user_authentication_method))\n .route(web::put().to(user::update_user_authentication_method)),\n )\n .service(\n web::resource(\"/list\")\n .route(web::get().to(user::list_user_authentication_methods)),\n )\n .service(web::resource(\"/url\").route(web::get().to(user::get_sso_auth_url)))\n .service(\n web::resource(\"/select\").route(web::post().to(user::terminate_auth_select)),\n ),\n );\n\n #[cfg(feature = \"email\")]\n {\n route = route\n .service(web::resource(\"/from_email\").route(web::post().to(user::user_from_email)))\n .service(\n web::resource(\"/connect_account\")\n .route(web::post().to(user::user_connect_account)),\n )\n .service(\n web::resource(\"/forgot_password\").route(web::post().to(user::forgot_password)),\n )\n .service(\n web::resource(\"/reset_password\").route(web::post().to(user::reset_password)),\n )\n .service(\n web::resource(\"/signup_with_merchant_id\")\n .route(web::post().to(user::user_signup_with_merchant_id)),\n )\n .service(web::resource(\"/verify_email\").route(web::post().to(user::verify_email)))\n .service(\n web::resource(\"/v2/verify_email\").route(web::post().to(user::verify_email)),\n )\n .service(\n web::resource(\"/verify_email_request\")\n .route(web::post().to(user::verify_email_request)),\n )\n .service(\n web::resource(\"/user/resend_invite\").route(web::post().to(user::resend_invite)),\n )\n .service(\n web::resource(\"/accept_invite_from_email\")\n .route(web::post().to(user::accept_invite_from_email)),\n );\n }\n #[cfg(not(feature = \"email\"))]\n {\n route = route.service(web::resource(\"/signup\").route(web::post().to(user::user_signup)))\n }\n\n // User management\n route = route.service(\n web::scope(\"/user\")\n .service(web::resource(\"\").route(web::post().to(user::list_user_roles_details)))\n // TODO: To be deprecated\n .service(web::resource(\"/v2\").route(web::post().to(user::list_user_roles_details)))\n .service(\n web::resource(\"/list\").route(web::get().to(user_role::list_users_in_lineage)),\n )\n // TODO: To be deprecated\n .service(\n web::resource(\"/v2/list\")\n .route(web::get().to(user_role::list_users_in_lineage)),\n )\n .service(\n web::resource(\"/invite_multiple\")\n .route(web::post().to(user::invite_multiple_user)),\n )\n .service(\n web::scope(\"/invite/accept\")\n .service(\n web::resource(\"\")\n .route(web::post().to(user_role::accept_invitations_v2)),\n )\n .service(\n web::resource(\"/pre_auth\")\n .route(web::post().to(user_role::accept_invitations_pre_auth)),\n )\n .service(\n web::scope(\"/v2\")\n .service(\n web::resource(\"\")\n .route(web::post().to(user_role::accept_invitations_v2)),\n )\n .service(\n web::resource(\"/pre_auth\").route(\n web::post().to(user_role::accept_invitations_pre_auth),\n ),\n ),\n ),\n )\n .service(\n web::resource(\"/update_role\")\n .route(web::post().to(user_role::update_user_role)),\n )\n .service(\n web::resource(\"/delete\").route(web::delete().to(user_role::delete_user_role)),\n ),\n );\n\n if state.conf().clone_connector_allowlist.is_some() {\n route = route.service(\n web::resource(\"/clone_connector\").route(web::post().to(user::clone_connector)),\n );\n }\n\n // Role information\n route =\n route.service(\n web::scope(\"/role\")\n .service(\n web::resource(\"\")\n .route(web::get().to(user_role::get_role_from_token))\n // TODO: To be deprecated\n .route(web::post().to(user_role::create_role)),\n )\n .service(\n web::resource(\"/v2\")\n .route(web::post().to(user_role::create_role_v2))\n .route(\n web::get()\n .to(user_role::get_groups_and_resources_for_role_from_token),\n ),\n )\n .service(web::resource(\"/v3\").route(\n web::get().to(user_role::get_parent_groups_info_for_role_from_token),\n ))\n // TODO: To be deprecated\n .service(\n web::resource(\"/v2/list\")\n .route(web::get().to(user_role::list_roles_with_info)),\n )\n .service(\n web::scope(\"/list\")\n .service(\n web::resource(\"\")\n .route(web::get().to(user_role::list_roles_with_info)),\n )\n .service(web::resource(\"/invite\").route(\n web::get().to(user_role::list_invitable_roles_at_entity_level),\n ))\n .service(web::resource(\"/update\").route(\n web::get().to(user_role::list_updatable_roles_at_entity_level),\n )),\n )\n .service(\n web::resource(\"/{role_id}\")\n .route(web::get().to(user_role::get_role))\n .route(web::put().to(user_role::update_role)),\n )\n .service(\n web::resource(\"/{role_id}/v2\")\n .route(web::get().to(user_role::get_parent_info_for_role)),\n ),\n );\n\n #[cfg(feature = \"dummy_connector\")]\n {\n route = route.service(\n web::resource(\"/sample_data\")\n .route(web::post().to(user::generate_sample_data))\n .route(web::delete().to(user::delete_sample_data)),\n )\n }\n // Admin Theme\n // TODO: To be deprecated\n route = route.service(\n web::scope(\"/admin/theme\")\n .service(\n web::resource(\"\")\n .route(web::get().to(user::theme::get_theme_using_lineage))\n .route(web::post().to(user::theme::create_theme)),\n )\n .service(\n web::resource(\"/{theme_id}\")\n .route(web::get().to(user::theme::get_theme_using_theme_id))\n .route(web::put().to(user::theme::update_theme))\n .route(web::post().to(user::theme::upload_file_to_theme_storage))\n .route(web::delete().to(user::theme::delete_theme)),\n ),\n );\n // User Theme\n route = route.service(\n web::scope(\"/theme\")\n .service(\n web::resource(\"\")\n .route(web::post().to(user::theme::create_user_theme))\n .route(web::get().to(user::theme::get_user_theme_using_lineage)),\n )\n .service(\n web::resource(\"/list\")\n .route(web::get().to(user::theme::list_all_themes_in_lineage)),\n )\n .service(\n web::resource(\"/{theme_id}\")\n .route(web::get().to(user::theme::get_user_theme_using_theme_id))\n .route(web::put().to(user::theme::update_user_theme))\n .route(web::post().to(user::theme::upload_file_to_user_theme_storage))\n .route(web::delete().to(user::theme::delete_user_theme)),\n ),\n );\n route\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use crate::routes::authentication;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use crate::routes::authentication;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_straight_through_algorithm_in_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_straight_through_algorithm_in_payment_attempt(\n &mut self,\n straight_through_algorithm: serde_json::Value,\n ) {\n self.payment_attempt.straight_through_algorithm = Some(straight_through_algorithm);\n }", + "after_code": "fn set_straight_through_algorithm_in_payment_attempt(\n &mut self,\n straight_through_algorithm: serde_json::Value,\n ) {\n self.payment_attempt.straight_through_algorithm = Some(straight_through_algorithm);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_creds_identifier", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_creds_identifier(&self) -> Option<&str> {\n todo!()\n }", + "after_code": "fn get_creds_identifier(&self) -> Option<&str> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::DecisionConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct DecisionConfig {\n pub base_url: String,\n}", + "after_code": "pub struct DecisionConfig {\n pub base_url: String,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_capture_method", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_capture_method(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_capture_method(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::hashset_deserialization_test::function::test_payment_method_hashset_deserializer_with_spaces", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn test_payment_method_hashset_deserializer_with_spaces() {\n use diesel_models::enums::PaymentMethod;\n\n let deserializer: StrDeserializer<'_, ValueError> =\n \"wallet, card, bank_debit\".into_deserializer();\n let payment_methods = deserialize_hashset::<'_, _, PaymentMethod>(deserializer);\n let expected_payment_methods = HashSet::from([\n PaymentMethod::Wallet,\n PaymentMethod::Card,\n PaymentMethod::BankDebit,\n ]);\n\n assert!(payment_methods.is_ok());\n assert_eq!(payment_methods.unwrap(), expected_payment_methods);\n }", + "after_code": "fn test_payment_method_hashset_deserializer_with_spaces() {\n use diesel_models::enums::PaymentMethod;\n\n let deserializer: StrDeserializer<'_, ValueError> =\n \"wallet, card, bank_debit\".into_deserializer();\n let payment_methods = deserialize_hashset::<'_, _, PaymentMethod>(deserializer);\n let expected_payment_methods = HashSet::from([\n PaymentMethod::Wallet,\n PaymentMethod::Card,\n PaymentMethod::BankDebit,\n ]);\n\n assert!(payment_methods.is_ok());\n assert_eq!(payment_methods.unwrap(), expected_payment_methods);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::PaymentMethod;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use super::deserialize_hashset;", + "use serde::de::Error;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "use serde::Deserialize;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use super::deserialize_hashset;", + "use serde::de::Error;", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::MerchantConnectorAccount", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct MerchantConnectorAccount;", + "after_code": "pub struct MerchantConnectorAccount;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_client_secret", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_client_secret(&mut self, client_secret: Option>) {\n self.client_secret = client_secret;\n }", + "after_code": "fn set_client_secret(&mut self, client_secret: Option>) {\n self.client_secret = client_secret;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::ProfileNew::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/account/{account_id}/profile\").app_data(web::Data::new(state))\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/account/{account_id}/profile\").app_data(web::Data::new(state))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Configs", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Configs;", + "after_code": "pub struct Configs;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::enum::CheckResult", + "file": "crates/router/src/core/payments.rs", + "kind": "enum_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub enum CheckResult {\n Allow,\n Deny { message: String },\n}", + "after_code": "pub enum CheckResult {\n Allow,\n Deny { message: String },\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_mandate_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_mandate_id(&self) -> Option<&payments_api::MandateIds> {\n self.mandate_id.as_ref()\n }", + "after_code": "fn get_mandate_id(&self) -> Option<&payments_api::MandateIds> {\n self.mandate_id.as_ref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_recurring_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_recurring_details(&self) -> Option<&RecurringDetails> {\n todo!()\n }", + "after_code": "fn get_recurring_details(&self) -> Option<&RecurringDetails> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_merchant_connector_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_merchant_connector_id_in_attempt(&self) -> Option {\n self.payment_attempt.merchant_connector_id.clone()\n }", + "after_code": "fn get_merchant_connector_id_in_attempt(&self) -> Option {\n self.payment_attempt.merchant_connector_id.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::Option", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl From for Option {\n fn from(result: CheckResult) -> Self {\n match result {\n CheckResult::Allow => None,\n CheckResult::Deny { message } => Some(api_models::payments::SdkNextAction {\n next_action: api_models::payments::NextActionCall::Deny { message },\n }),\n }\n }\n}", + "after_code": "impl From for Option {\n fn from(result: CheckResult) -> Self {\n match result {\n CheckResult::Allow => None,\n CheckResult::Deny { message } => Some(api_models::payments::SdkNextAction {\n next_action: api_models::payments::NextActionCall::Deny { message },\n }),\n }\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_attempt(&self) -> &storage::PaymentAttempt {\n &self.payment_attempt\n }", + "after_code": "fn get_payment_attempt(&self) -> &storage::PaymentAttempt {\n &self.payment_attempt\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_client_secret", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_client_secret(&self) -> &Option> {\n todo!()\n }", + "after_code": "fn get_client_secret(&self) -> &Option> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::RecoveryDataBackfill", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl RecoveryDataBackfill {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/recovery/data-backfill\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\").route(\n web::post()\n .to(super::revenue_recovery_data_backfill::revenue_recovery_data_backfill),\n ),\n )\n .service(web::resource(\"/status/{token_id}\").route(\n web::post().to(\n super::revenue_recovery_data_backfill::revenue_recovery_data_backfill_status,\n ),\n ))\n .service(web::resource(\"/redis-data/{token_id}\").route(\n web::get().to(\n super::revenue_recovery_redis::get_revenue_recovery_redis_data,\n ),\n ))\n .service(web::resource(\"/update-token\").route(\n web::put().to(\n super::revenue_recovery_data_backfill::update_revenue_recovery_additional_redis_data,\n ),\n ))\n }\n}", + "after_code": "impl RecoveryDataBackfill {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/recovery/data-backfill\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\").route(\n web::post()\n .to(super::revenue_recovery_data_backfill::revenue_recovery_data_backfill),\n ),\n )\n .service(web::resource(\"/status/{token_id}\").route(\n web::post().to(\n super::revenue_recovery_data_backfill::revenue_recovery_data_backfill_status,\n ),\n ))\n .service(web::resource(\"/redis-data/{token_id}\").route(\n web::get().to(\n super::revenue_recovery_redis::get_revenue_recovery_redis_data,\n ),\n ))\n .service(web::resource(\"/update-token\").route(\n web::put().to(\n super::revenue_recovery_data_backfill::update_revenue_recovery_additional_redis_data,\n ),\n ))\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::process_tracker::revenue_recovery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::process_tracker::revenue_recovery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::decide_multiplex_connector_for_normal_or_recurring_payment", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn decide_multiplex_connector_for_normal_or_recurring_payment(\n state: &SessionState,\n payment_data: &mut D,\n routing_data: &mut storage::RoutingData,\n connectors: Vec,\n mandate_type: Option,\n is_connector_agnostic_mit_enabled: Option,\n is_network_tokenization_enabled: bool,\n) -> RouterResult\nwhere\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n match (\n payment_data.get_payment_intent().setup_future_usage,\n payment_data.get_token_data().as_ref(),\n payment_data.get_recurring_details().as_ref(),\n payment_data.get_payment_intent().off_session,\n mandate_type,\n ) {\n (\n Some(storage_enums::FutureUsage::OffSession),\n Some(_),\n None,\n None,\n Some(api::MandateTransactionType::RecurringMandateTransaction),\n )\n | (\n None,\n None,\n Some(RecurringDetails::PaymentMethodId(_)),\n Some(true),\n Some(api::MandateTransactionType::RecurringMandateTransaction),\n )\n | (None, Some(_), None, Some(true), _) => {\n logger::debug!(\"euclid_routing: performing routing for token-based MIT flow\");\n\n let payment_method_info = payment_data\n .get_payment_method_info()\n .get_required_value(\"payment_method_info\")?\n .clone();\n\n let retryable_connectors =\n join_all(connectors.into_iter().map(|connector_routing_data| {\n let payment_method = payment_method_info.clone();\n async move {\n let action_types = get_all_action_types(\n state,\n is_connector_agnostic_mit_enabled,\n is_network_tokenization_enabled,\n &payment_method.clone(),\n connector_routing_data.connector_data.clone(),\n )\n .await;\n\n action_types\n .into_iter()\n .map(|action_type| api::ConnectorRoutingData {\n connector_data: connector_routing_data.connector_data.clone(),\n action_type: Some(action_type),\n network: connector_routing_data.network.clone(),\n })\n .collect::>()\n }\n }))\n .await\n .into_iter()\n .flatten()\n .collect::>();\n\n let chosen_connector_routing_data = retryable_connectors\n .first()\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\"no eligible connector found for token-based MIT payment\")?;\n\n let mandate_reference_id = get_mandate_reference_id(\n chosen_connector_routing_data.action_type.clone(),\n chosen_connector_routing_data.clone(),\n payment_data,\n &payment_method_info,\n )?;\n\n routing_data.routed_through = Some(\n chosen_connector_routing_data\n .connector_data\n .connector_name\n .to_string(),\n );\n\n routing_data.merchant_connector_id.clone_from(\n &chosen_connector_routing_data\n .connector_data\n .merchant_connector_id,\n );\n\n payment_data.set_mandate_id(payments_api::MandateIds {\n mandate_id: None,\n mandate_reference_id,\n });\n Ok(ConnectorCallType::Retryable(retryable_connectors))\n }\n (\n None,\n None,\n Some(RecurringDetails::ProcessorPaymentToken(_token)),\n Some(true),\n Some(api::MandateTransactionType::RecurringMandateTransaction),\n ) => {\n if let Some(connector) = connectors.first() {\n let connector = &connector.connector_data;\n routing_data.routed_through = Some(connector.connector_name.clone().to_string());\n routing_data\n .merchant_connector_id\n .clone_from(&connector.merchant_connector_id);\n Ok(ConnectorCallType::PreDetermined(\n api::ConnectorData {\n connector: connector.connector.clone(),\n connector_name: connector.connector_name,\n get_token: connector.get_token.clone(),\n merchant_connector_id: connector.merchant_connector_id.clone(),\n }\n .into(),\n ))\n } else {\n logger::error!(\n \"euclid_routing: no eligible connector found for the ppt_mandate payment\"\n );\n Err(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration.into())\n }\n }\n _ => {\n helpers::override_setup_future_usage_to_on_session(&*state.store, payment_data).await?;\n\n let first_choice = connectors\n .first()\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\"no eligible connector found for payment\")?\n .clone();\n\n routing_data.routed_through =\n Some(first_choice.connector_data.connector_name.to_string());\n\n routing_data.merchant_connector_id = first_choice.connector_data.merchant_connector_id;\n\n Ok(ConnectorCallType::Retryable(connectors))\n }\n }\n}", + "after_code": "pub async fn decide_multiplex_connector_for_normal_or_recurring_payment(\n state: &SessionState,\n payment_data: &mut D,\n routing_data: &mut storage::RoutingData,\n connectors: Vec,\n mandate_type: Option,\n is_connector_agnostic_mit_enabled: Option,\n is_network_tokenization_enabled: bool,\n) -> RouterResult\nwhere\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n match (\n payment_data.get_payment_intent().setup_future_usage,\n payment_data.get_token_data().as_ref(),\n payment_data.get_recurring_details().as_ref(),\n payment_data.get_payment_intent().off_session,\n mandate_type,\n ) {\n (\n Some(storage_enums::FutureUsage::OffSession),\n Some(_),\n None,\n None,\n Some(api::MandateTransactionType::RecurringMandateTransaction),\n )\n | (\n None,\n None,\n Some(RecurringDetails::PaymentMethodId(_)),\n Some(true),\n Some(api::MandateTransactionType::RecurringMandateTransaction),\n )\n | (None, Some(_), None, Some(true), _) => {\n logger::debug!(\"euclid_routing: performing routing for token-based MIT flow\");\n\n let payment_method_info = payment_data\n .get_payment_method_info()\n .get_required_value(\"payment_method_info\")?\n .clone();\n\n let retryable_connectors =\n join_all(connectors.into_iter().map(|connector_routing_data| {\n let payment_method = payment_method_info.clone();\n async move {\n let action_types = get_all_action_types(\n state,\n is_connector_agnostic_mit_enabled,\n is_network_tokenization_enabled,\n &payment_method.clone(),\n connector_routing_data.connector_data.clone(),\n )\n .await;\n\n action_types\n .into_iter()\n .map(|action_type| api::ConnectorRoutingData {\n connector_data: connector_routing_data.connector_data.clone(),\n action_type: Some(action_type),\n network: connector_routing_data.network.clone(),\n })\n .collect::>()\n }\n }))\n .await\n .into_iter()\n .flatten()\n .collect::>();\n\n let chosen_connector_routing_data = retryable_connectors\n .first()\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\"no eligible connector found for token-based MIT payment\")?;\n\n let mandate_reference_id = get_mandate_reference_id(\n chosen_connector_routing_data.action_type.clone(),\n chosen_connector_routing_data.clone(),\n payment_data,\n &payment_method_info,\n )?;\n\n routing_data.routed_through = Some(\n chosen_connector_routing_data\n .connector_data\n .connector_name\n .to_string(),\n );\n\n routing_data.merchant_connector_id.clone_from(\n &chosen_connector_routing_data\n .connector_data\n .merchant_connector_id,\n );\n\n payment_data.set_mandate_id(payments_api::MandateIds {\n mandate_id: None,\n mandate_reference_id,\n });\n Ok(ConnectorCallType::Retryable(retryable_connectors))\n }\n (\n None,\n None,\n Some(RecurringDetails::ProcessorPaymentToken(_token)),\n Some(true),\n Some(api::MandateTransactionType::RecurringMandateTransaction),\n ) => {\n if let Some(connector) = connectors.first() {\n let connector = &connector.connector_data;\n routing_data.routed_through = Some(connector.connector_name.clone().to_string());\n routing_data\n .merchant_connector_id\n .clone_from(&connector.merchant_connector_id);\n Ok(ConnectorCallType::PreDetermined(\n api::ConnectorData {\n connector: connector.connector.clone(),\n connector_name: connector.connector_name,\n get_token: connector.get_token.clone(),\n merchant_connector_id: connector.merchant_connector_id.clone(),\n }\n .into(),\n ))\n } else {\n logger::error!(\n \"euclid_routing: no eligible connector found for the ppt_mandate payment\"\n );\n Err(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration.into())\n }\n }\n _ => {\n helpers::override_setup_future_usage_to_on_session(&*state.store, payment_data).await?;\n\n let first_choice = connectors\n .first()\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\"no eligible connector found for payment\")?\n .clone();\n\n routing_data.routed_through =\n Some(first_choice.connector_data.connector_name.to_string());\n\n routing_data.merchant_connector_id = first_choice.connector_data.merchant_connector_id;\n\n Ok(ConnectorCallType::Retryable(connectors))\n }\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use futures::future::join_all;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use std::future;", + "use futures::future::join_all;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_payment_method_info", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod> {\n todo!()\n }", + "after_code": "fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_attempt(&mut self, _payment_attempt: storage::PaymentAttempt) {\n todo!()\n }", + "after_code": "fn set_payment_attempt(&mut self, _payment_attempt: storage::PaymentAttempt) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/psync_flow.rs::trait::RouterDataPSync", + "file": "crates/router/src/core/payments/flows/psync_flow.rs", + "kind": "trait_item", + "status": "modified", + "code_changed": true, + "imports_changed": true, + "before_code": "pub trait RouterDataPSync\nwhere\n Self: Sized,\n{\n async fn execute_connector_processing_step_for_each_capture(\n &self,\n _state: &SessionState,\n _pending_connector_capture_id_list: Vec,\n _call_connector_action: payments::CallConnectorAction,\n _connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PSync,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n >,\n _return_raw_connector_response: Option,\n ) -> RouterResult;\n}", + "after_code": "pub trait RouterDataPSync\nwhere\n Self: Sized,\n{\n async fn execute_connector_processing_step_for_each_capture(\n &self,\n state: &SessionState,\n pending_connector_capture_id_list: Vec,\n call_connector_action: payments::CallConnectorAction,\n connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PSync,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n >,\n return_raw_connector_response: Option,\n gateway_context: Option,\n ) -> RouterResult;\n}", + "diff_span": { + "before": " async fn execute_connector_processing_step_for_each_capture(\n &self,\n _state: &SessionState,\n _pending_connector_capture_id_list: Vec,\n _call_connector_action: payments::CallConnectorAction,\n _connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PSync,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n >,\n _return_raw_connector_response: Option,\n ) -> RouterResult;\n}", + "after": " async fn execute_connector_processing_step_for_each_capture(\n &self,\n state: &SessionState,\n pending_connector_capture_id_list: Vec,\n call_connector_action: payments::CallConnectorAction,\n connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PSync,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n >,\n return_raw_connector_response: Option,\n gateway_context: Option,\n ) -> RouterResult;\n}" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n};" + ], + "after_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::{\n api::gateway,\n unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n },\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::UnmaskedHeaders", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct UnmaskedHeaders {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub keys: HashSet,\n}", + "after_code": "pub struct UnmaskedHeaders {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub keys: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use super::deserialize_hashset;", + "use std::collections::{HashMap, HashSet};", + "use std::collections::HashSet;" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/helpers.rs::function::process_through_direct", + "file": "crates/router/src/core/payments/helpers.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "pub async fn process_through_direct<'a, F, RouterDReq, ApiRequest, D>(\n state: &'a SessionState,\n req_state: routes::app::ReqState,\n merchant_context: &'a domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &'a BoxedOperation<'a, F, ApiRequest, D>,\n payment_data: &'a mut D,\n customer: &Option,\n call_connector_action: CallConnectorAction,\n validate_result: &'a OperationsValidateResult,\n schedule_time: Option,\n header_payload: domain_payments::HeaderPayload,\n frm_suggestion: Option,\n business_profile: &'a domain::Profile,\n is_retry_payment: bool,\n all_keys_required: Option,\n merchant_connector_account: MerchantConnectorAccountType,\n router_data: RouterData,\n tokenization_action: TokenizationAction,\n) -> RouterResult<(\n RouterData,\n MerchantConnectorAccountType,\n)>\nwhere\n F: Send + Clone + Sync + 'static,\n RouterDReq: Send + Sync + Clone + 'static + Serialize,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData:\n Feature + Send + Clone + Serialize,\n dyn api::Connector: services::api::ConnectorIntegration,\n{\n router_env::logger::info!(\n \"Processing payment through Direct gateway system - payment_id={}, attempt_id={}\",\n payment_data\n .get_payment_intent()\n .payment_id\n .get_string_repr(),\n payment_data.get_payment_attempt().attempt_id\n );\n\n // Update feature metadata to track Direct routing usage for stickiness\n update_gateway_system_in_feature_metadata(payment_data, GatewaySystem::Direct)?;\n\n call_connector_service(\n state,\n req_state,\n merchant_context,\n connector,\n operation,\n payment_data,\n customer,\n call_connector_action,\n validate_result,\n schedule_time,\n header_payload,\n frm_suggestion,\n business_profile,\n is_retry_payment,\n all_keys_required,\n merchant_connector_account,\n router_data,\n tokenization_action,\n )\n .await\n}", + "after_code": "pub async fn process_through_direct<'a, F, RouterDReq, ApiRequest, D>(\n state: &'a SessionState,\n req_state: routes::app::ReqState,\n merchant_context: &'a domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &'a BoxedOperation<'a, F, ApiRequest, D>,\n payment_data: &'a mut D,\n customer: &Option,\n call_connector_action: CallConnectorAction,\n validate_result: &'a OperationsValidateResult,\n schedule_time: Option,\n header_payload: domain_payments::HeaderPayload,\n frm_suggestion: Option,\n business_profile: &'a domain::Profile,\n is_retry_payment: bool,\n all_keys_required: Option,\n merchant_connector_account: MerchantConnectorAccountType,\n router_data: RouterData,\n tokenization_action: TokenizationAction,\n) -> RouterResult<(\n RouterData,\n MerchantConnectorAccountType,\n)>\nwhere\n F: Send + Clone + Sync + 'static,\n RouterDReq: Send + Sync + Clone + 'static + Serialize,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData:\n Feature + Send + Clone + Serialize,\n dyn api::Connector: services::api::ConnectorIntegration,\n{\n router_env::logger::info!(\n \"Processing payment through Direct gateway system - payment_id={}, attempt_id={}\",\n payment_data\n .get_payment_intent()\n .payment_id\n .get_string_repr(),\n payment_data.get_payment_attempt().attempt_id\n );\n\n // Update feature metadata to track Direct routing usage for stickiness\n update_gateway_system_in_feature_metadata(payment_data, GatewaySystem::Direct)?;\n\n call_connector_service(\n state,\n req_state,\n merchant_context,\n connector,\n operation,\n payment_data,\n customer,\n call_connector_action,\n validate_result,\n schedule_time,\n header_payload,\n frm_suggestion,\n business_profile,\n is_retry_payment,\n all_keys_required,\n merchant_connector_account,\n router_data,\n tokenization_action,\n None,\n )\n .await\n}", + "diff_span": { + "before": "", + "after": " router_data,\n tokenization_action,\n None,\n )\n .await" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/configs/settings.rs::struct::ApplePayDecryptConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ApplePayDecryptConfig {\n pub apple_pay_ppc: Secret,\n pub apple_pay_ppc_key: Secret,\n pub apple_pay_merchant_cert: Secret,\n pub apple_pay_merchant_cert_key: Secret,\n}", + "after_code": "pub struct ApplePayDecryptConfig {\n pub apple_pay_ppc: Secret,\n pub apple_pay_ppc_key: Secret,\n pub apple_pay_merchant_cert: Secret,\n pub apple_pay_merchant_cert_key: Secret,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_click_to_pay_service_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_click_to_pay_service_details(&self) -> Option<&api_models::payments::CtpServiceDetails> {\n self.service_details.as_ref()\n }", + "after_code": "fn get_click_to_pay_service_details(&self) -> Option<&api_models::payments::CtpServiceDetails> {\n self.service_details.as_ref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::WebhookEvents", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl WebhookEvents {\n pub fn server(config: AppState) -> Scope {\n web::scope(\"/events\")\n .app_data(web::Data::new(config))\n .service(web::scope(\"/profile/list\").service(web::resource(\"\").route(\n web::post().to(webhook_events::list_initial_webhook_delivery_attempts_with_jwtauth),\n )))\n .service(\n web::scope(\"/{merchant_id}\")\n .service(web::resource(\"\").route(\n web::post().to(webhook_events::list_initial_webhook_delivery_attempts),\n ))\n .service(\n web::scope(\"/{event_id}\")\n .service(web::resource(\"attempts\").route(\n web::get().to(webhook_events::list_webhook_delivery_attempts),\n ))\n .service(web::resource(\"retry\").route(\n web::post().to(webhook_events::retry_webhook_delivery_attempt),\n )),\n ),\n )\n }\n}", + "after_code": "impl WebhookEvents {\n pub fn server(config: AppState) -> Scope {\n web::scope(\"/events\")\n .app_data(web::Data::new(config))\n .service(web::scope(\"/profile/list\").service(web::resource(\"\").route(\n web::post().to(webhook_events::list_initial_webhook_delivery_attempts_with_jwtauth),\n )))\n .service(\n web::scope(\"/{merchant_id}\")\n .service(web::resource(\"\").route(\n web::post().to(webhook_events::list_initial_webhook_delivery_attempts),\n ))\n .service(\n web::scope(\"/{event_id}\")\n .service(web::resource(\"attempts\").route(\n web::get().to(webhook_events::list_webhook_delivery_attempts),\n ))\n .service(web::resource(\"retry\").route(\n web::post().to(webhook_events::retry_webhook_delivery_attempt),\n )),\n ),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::User", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl User {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/user\").app_data(web::Data::new(state.clone()));\n\n route = route\n .service(web::resource(\"\").route(web::get().to(user::get_user_details)))\n .service(web::resource(\"/signin\").route(web::post().to(user::user_signin)))\n .service(web::resource(\"/v2/signin\").route(web::post().to(user::user_signin)))\n // signin/signup with sso using openidconnect\n .service(web::resource(\"/oidc\").route(web::post().to(user::sso_sign)))\n .service(web::resource(\"/signout\").route(web::post().to(user::signout)))\n .service(web::resource(\"/rotate_password\").route(web::post().to(user::rotate_password)))\n .service(web::resource(\"/change_password\").route(web::post().to(user::change_password)))\n .service(\n web::resource(\"/internal_signup\").route(web::post().to(user::internal_user_signup)),\n )\n .service(\n web::resource(\"/tenant_signup\").route(web::post().to(user::create_tenant_user)),\n )\n .service(web::resource(\"/create_org\").route(web::post().to(user::user_org_create)))\n .service(\n web::resource(\"/create_merchant\")\n .route(web::post().to(user::user_merchant_account_create)),\n )\n // TODO: To be deprecated\n .service(\n web::resource(\"/permission_info\")\n .route(web::get().to(user_role::get_authorization_info)),\n )\n // TODO: To be deprecated\n .service(\n web::resource(\"/module/list\").route(web::get().to(user_role::get_role_information)),\n )\n .service(\n web::resource(\"/parent/list\")\n .route(web::get().to(user_role::get_parent_group_info)),\n )\n .service(\n web::resource(\"/update\").route(web::post().to(user::update_user_account_details)),\n )\n .service(\n web::resource(\"/data\")\n .route(web::get().to(user::get_multiple_dashboard_metadata))\n .route(web::post().to(user::set_dashboard_metadata)),\n );\n\n if state.conf.platform.enabled {\n route = route.service(\n web::resource(\"/create_platform\").route(web::post().to(user::create_platform)),\n )\n }\n\n route = route\n .service(web::scope(\"/key\").service(\n web::resource(\"/transfer\").route(web::post().to(user::transfer_user_key)),\n ));\n\n route = route.service(\n web::scope(\"/list\")\n .service(web::resource(\"/org\").route(web::get().to(user::list_orgs_for_user)))\n .service(\n web::resource(\"/merchant\")\n .route(web::get().to(user::list_merchants_for_user_in_org)),\n )\n .service(\n web::resource(\"/profile\")\n .route(web::get().to(user::list_profiles_for_user_in_org_and_merchant)),\n )\n .service(\n web::resource(\"/invitation\")\n .route(web::get().to(user_role::list_invitations_for_user)),\n ),\n );\n\n route = route.service(\n web::scope(\"/switch\")\n .service(web::resource(\"/org\").route(web::post().to(user::switch_org_for_user)))\n .service(\n web::resource(\"/merchant\")\n .route(web::post().to(user::switch_merchant_for_user_in_org)),\n )\n .service(\n web::resource(\"/profile\")\n .route(web::post().to(user::switch_profile_for_user_in_org_and_merchant)),\n ),\n );\n\n // Two factor auth routes\n route = route.service(\n web::scope(\"/2fa\")\n // TODO: to be deprecated\n .service(web::resource(\"\").route(web::get().to(user::check_two_factor_auth_status)))\n .service(\n web::resource(\"/v2\")\n .route(web::get().to(user::check_two_factor_auth_status_with_attempts)),\n )\n .service(\n web::scope(\"/totp\")\n .service(web::resource(\"/begin\").route(web::get().to(user::totp_begin)))\n .service(web::resource(\"/reset\").route(web::get().to(user::totp_reset)))\n .service(\n web::resource(\"/verify\")\n .route(web::post().to(user::totp_verify))\n .route(web::put().to(user::totp_update)),\n ),\n )\n .service(\n web::scope(\"/recovery_code\")\n .service(\n web::resource(\"/verify\")\n .route(web::post().to(user::verify_recovery_code)),\n )\n .service(\n web::resource(\"/generate\")\n .route(web::get().to(user::generate_recovery_codes)),\n ),\n )\n .service(\n web::resource(\"/terminate\")\n .route(web::get().to(user::terminate_two_factor_auth)),\n ),\n );\n\n route = route.service(\n web::scope(\"/auth\")\n .service(\n web::resource(\"\")\n .route(web::post().to(user::create_user_authentication_method))\n .route(web::put().to(user::update_user_authentication_method)),\n )\n .service(\n web::resource(\"/list\")\n .route(web::get().to(user::list_user_authentication_methods)),\n )\n .service(web::resource(\"/url\").route(web::get().to(user::get_sso_auth_url)))\n .service(\n web::resource(\"/select\").route(web::post().to(user::terminate_auth_select)),\n ),\n );\n\n #[cfg(feature = \"email\")]\n {\n route = route\n .service(web::resource(\"/from_email\").route(web::post().to(user::user_from_email)))\n .service(\n web::resource(\"/connect_account\")\n .route(web::post().to(user::user_connect_account)),\n )\n .service(\n web::resource(\"/forgot_password\").route(web::post().to(user::forgot_password)),\n )\n .service(\n web::resource(\"/reset_password\").route(web::post().to(user::reset_password)),\n )\n .service(\n web::resource(\"/signup_with_merchant_id\")\n .route(web::post().to(user::user_signup_with_merchant_id)),\n )\n .service(web::resource(\"/verify_email\").route(web::post().to(user::verify_email)))\n .service(\n web::resource(\"/v2/verify_email\").route(web::post().to(user::verify_email)),\n )\n .service(\n web::resource(\"/verify_email_request\")\n .route(web::post().to(user::verify_email_request)),\n )\n .service(\n web::resource(\"/user/resend_invite\").route(web::post().to(user::resend_invite)),\n )\n .service(\n web::resource(\"/accept_invite_from_email\")\n .route(web::post().to(user::accept_invite_from_email)),\n );\n }\n #[cfg(not(feature = \"email\"))]\n {\n route = route.service(web::resource(\"/signup\").route(web::post().to(user::user_signup)))\n }\n\n // User management\n route = route.service(\n web::scope(\"/user\")\n .service(web::resource(\"\").route(web::post().to(user::list_user_roles_details)))\n // TODO: To be deprecated\n .service(web::resource(\"/v2\").route(web::post().to(user::list_user_roles_details)))\n .service(\n web::resource(\"/list\").route(web::get().to(user_role::list_users_in_lineage)),\n )\n // TODO: To be deprecated\n .service(\n web::resource(\"/v2/list\")\n .route(web::get().to(user_role::list_users_in_lineage)),\n )\n .service(\n web::resource(\"/invite_multiple\")\n .route(web::post().to(user::invite_multiple_user)),\n )\n .service(\n web::scope(\"/invite/accept\")\n .service(\n web::resource(\"\")\n .route(web::post().to(user_role::accept_invitations_v2)),\n )\n .service(\n web::resource(\"/pre_auth\")\n .route(web::post().to(user_role::accept_invitations_pre_auth)),\n )\n .service(\n web::scope(\"/v2\")\n .service(\n web::resource(\"\")\n .route(web::post().to(user_role::accept_invitations_v2)),\n )\n .service(\n web::resource(\"/pre_auth\").route(\n web::post().to(user_role::accept_invitations_pre_auth),\n ),\n ),\n ),\n )\n .service(\n web::resource(\"/update_role\")\n .route(web::post().to(user_role::update_user_role)),\n )\n .service(\n web::resource(\"/delete\").route(web::delete().to(user_role::delete_user_role)),\n ),\n );\n\n if state.conf().clone_connector_allowlist.is_some() {\n route = route.service(\n web::resource(\"/clone_connector\").route(web::post().to(user::clone_connector)),\n );\n }\n\n // Role information\n route =\n route.service(\n web::scope(\"/role\")\n .service(\n web::resource(\"\")\n .route(web::get().to(user_role::get_role_from_token))\n // TODO: To be deprecated\n .route(web::post().to(user_role::create_role)),\n )\n .service(\n web::resource(\"/v2\")\n .route(web::post().to(user_role::create_role_v2))\n .route(\n web::get()\n .to(user_role::get_groups_and_resources_for_role_from_token),\n ),\n )\n .service(web::resource(\"/v3\").route(\n web::get().to(user_role::get_parent_groups_info_for_role_from_token),\n ))\n // TODO: To be deprecated\n .service(\n web::resource(\"/v2/list\")\n .route(web::get().to(user_role::list_roles_with_info)),\n )\n .service(\n web::scope(\"/list\")\n .service(\n web::resource(\"\")\n .route(web::get().to(user_role::list_roles_with_info)),\n )\n .service(web::resource(\"/invite\").route(\n web::get().to(user_role::list_invitable_roles_at_entity_level),\n ))\n .service(web::resource(\"/update\").route(\n web::get().to(user_role::list_updatable_roles_at_entity_level),\n )),\n )\n .service(\n web::resource(\"/{role_id}\")\n .route(web::get().to(user_role::get_role))\n .route(web::put().to(user_role::update_role)),\n )\n .service(\n web::resource(\"/{role_id}/v2\")\n .route(web::get().to(user_role::get_parent_info_for_role)),\n ),\n );\n\n #[cfg(feature = \"dummy_connector\")]\n {\n route = route.service(\n web::resource(\"/sample_data\")\n .route(web::post().to(user::generate_sample_data))\n .route(web::delete().to(user::delete_sample_data)),\n )\n }\n // Admin Theme\n // TODO: To be deprecated\n route = route.service(\n web::scope(\"/admin/theme\")\n .service(\n web::resource(\"\")\n .route(web::get().to(user::theme::get_theme_using_lineage))\n .route(web::post().to(user::theme::create_theme)),\n )\n .service(\n web::resource(\"/{theme_id}\")\n .route(web::get().to(user::theme::get_theme_using_theme_id))\n .route(web::put().to(user::theme::update_theme))\n .route(web::post().to(user::theme::upload_file_to_theme_storage))\n .route(web::delete().to(user::theme::delete_theme)),\n ),\n );\n // User Theme\n route = route.service(\n web::scope(\"/theme\")\n .service(\n web::resource(\"\")\n .route(web::post().to(user::theme::create_user_theme))\n .route(web::get().to(user::theme::get_user_theme_using_lineage)),\n )\n .service(\n web::resource(\"/list\")\n .route(web::get().to(user::theme::list_all_themes_in_lineage)),\n )\n .service(\n web::resource(\"/{theme_id}\")\n .route(web::get().to(user::theme::get_user_theme_using_theme_id))\n .route(web::put().to(user::theme::update_user_theme))\n .route(web::post().to(user::theme::upload_file_to_user_theme_storage))\n .route(web::delete().to(user::theme::delete_user_theme)),\n ),\n );\n route\n }\n}", + "after_code": "impl User {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/user\").app_data(web::Data::new(state.clone()));\n\n route = route\n .service(web::resource(\"\").route(web::get().to(user::get_user_details)))\n .service(web::resource(\"/signin\").route(web::post().to(user::user_signin)))\n .service(web::resource(\"/v2/signin\").route(web::post().to(user::user_signin)))\n // signin/signup with sso using openidconnect\n .service(web::resource(\"/oidc\").route(web::post().to(user::sso_sign)))\n .service(web::resource(\"/signout\").route(web::post().to(user::signout)))\n .service(web::resource(\"/rotate_password\").route(web::post().to(user::rotate_password)))\n .service(web::resource(\"/change_password\").route(web::post().to(user::change_password)))\n .service(\n web::resource(\"/internal_signup\").route(web::post().to(user::internal_user_signup)),\n )\n .service(\n web::resource(\"/tenant_signup\").route(web::post().to(user::create_tenant_user)),\n )\n .service(web::resource(\"/create_org\").route(web::post().to(user::user_org_create)))\n .service(\n web::resource(\"/create_merchant\")\n .route(web::post().to(user::user_merchant_account_create)),\n )\n // TODO: To be deprecated\n .service(\n web::resource(\"/permission_info\")\n .route(web::get().to(user_role::get_authorization_info)),\n )\n // TODO: To be deprecated\n .service(\n web::resource(\"/module/list\").route(web::get().to(user_role::get_role_information)),\n )\n .service(\n web::resource(\"/parent/list\")\n .route(web::get().to(user_role::get_parent_group_info)),\n )\n .service(\n web::resource(\"/update\").route(web::post().to(user::update_user_account_details)),\n )\n .service(\n web::resource(\"/data\")\n .route(web::get().to(user::get_multiple_dashboard_metadata))\n .route(web::post().to(user::set_dashboard_metadata)),\n );\n\n if state.conf.platform.enabled {\n route = route.service(\n web::resource(\"/create_platform\").route(web::post().to(user::create_platform)),\n )\n }\n\n route = route\n .service(web::scope(\"/key\").service(\n web::resource(\"/transfer\").route(web::post().to(user::transfer_user_key)),\n ));\n\n route = route.service(\n web::scope(\"/list\")\n .service(web::resource(\"/org\").route(web::get().to(user::list_orgs_for_user)))\n .service(\n web::resource(\"/merchant\")\n .route(web::get().to(user::list_merchants_for_user_in_org)),\n )\n .service(\n web::resource(\"/profile\")\n .route(web::get().to(user::list_profiles_for_user_in_org_and_merchant)),\n )\n .service(\n web::resource(\"/invitation\")\n .route(web::get().to(user_role::list_invitations_for_user)),\n ),\n );\n\n route = route.service(\n web::scope(\"/switch\")\n .service(web::resource(\"/org\").route(web::post().to(user::switch_org_for_user)))\n .service(\n web::resource(\"/merchant\")\n .route(web::post().to(user::switch_merchant_for_user_in_org)),\n )\n .service(\n web::resource(\"/profile\")\n .route(web::post().to(user::switch_profile_for_user_in_org_and_merchant)),\n ),\n );\n\n // Two factor auth routes\n route = route.service(\n web::scope(\"/2fa\")\n // TODO: to be deprecated\n .service(web::resource(\"\").route(web::get().to(user::check_two_factor_auth_status)))\n .service(\n web::resource(\"/v2\")\n .route(web::get().to(user::check_two_factor_auth_status_with_attempts)),\n )\n .service(\n web::scope(\"/totp\")\n .service(web::resource(\"/begin\").route(web::get().to(user::totp_begin)))\n .service(web::resource(\"/reset\").route(web::get().to(user::totp_reset)))\n .service(\n web::resource(\"/verify\")\n .route(web::post().to(user::totp_verify))\n .route(web::put().to(user::totp_update)),\n ),\n )\n .service(\n web::scope(\"/recovery_code\")\n .service(\n web::resource(\"/verify\")\n .route(web::post().to(user::verify_recovery_code)),\n )\n .service(\n web::resource(\"/generate\")\n .route(web::get().to(user::generate_recovery_codes)),\n ),\n )\n .service(\n web::resource(\"/terminate\")\n .route(web::get().to(user::terminate_two_factor_auth)),\n ),\n );\n\n route = route.service(\n web::scope(\"/auth\")\n .service(\n web::resource(\"\")\n .route(web::post().to(user::create_user_authentication_method))\n .route(web::put().to(user::update_user_authentication_method)),\n )\n .service(\n web::resource(\"/list\")\n .route(web::get().to(user::list_user_authentication_methods)),\n )\n .service(web::resource(\"/url\").route(web::get().to(user::get_sso_auth_url)))\n .service(\n web::resource(\"/select\").route(web::post().to(user::terminate_auth_select)),\n ),\n );\n\n #[cfg(feature = \"email\")]\n {\n route = route\n .service(web::resource(\"/from_email\").route(web::post().to(user::user_from_email)))\n .service(\n web::resource(\"/connect_account\")\n .route(web::post().to(user::user_connect_account)),\n )\n .service(\n web::resource(\"/forgot_password\").route(web::post().to(user::forgot_password)),\n )\n .service(\n web::resource(\"/reset_password\").route(web::post().to(user::reset_password)),\n )\n .service(\n web::resource(\"/signup_with_merchant_id\")\n .route(web::post().to(user::user_signup_with_merchant_id)),\n )\n .service(web::resource(\"/verify_email\").route(web::post().to(user::verify_email)))\n .service(\n web::resource(\"/v2/verify_email\").route(web::post().to(user::verify_email)),\n )\n .service(\n web::resource(\"/verify_email_request\")\n .route(web::post().to(user::verify_email_request)),\n )\n .service(\n web::resource(\"/user/resend_invite\").route(web::post().to(user::resend_invite)),\n )\n .service(\n web::resource(\"/accept_invite_from_email\")\n .route(web::post().to(user::accept_invite_from_email)),\n );\n }\n #[cfg(not(feature = \"email\"))]\n {\n route = route.service(web::resource(\"/signup\").route(web::post().to(user::user_signup)))\n }\n\n // User management\n route = route.service(\n web::scope(\"/user\")\n .service(web::resource(\"\").route(web::post().to(user::list_user_roles_details)))\n // TODO: To be deprecated\n .service(web::resource(\"/v2\").route(web::post().to(user::list_user_roles_details)))\n .service(\n web::resource(\"/list\").route(web::get().to(user_role::list_users_in_lineage)),\n )\n // TODO: To be deprecated\n .service(\n web::resource(\"/v2/list\")\n .route(web::get().to(user_role::list_users_in_lineage)),\n )\n .service(\n web::resource(\"/invite_multiple\")\n .route(web::post().to(user::invite_multiple_user)),\n )\n .service(\n web::scope(\"/invite/accept\")\n .service(\n web::resource(\"\")\n .route(web::post().to(user_role::accept_invitations_v2)),\n )\n .service(\n web::resource(\"/pre_auth\")\n .route(web::post().to(user_role::accept_invitations_pre_auth)),\n )\n .service(\n web::scope(\"/v2\")\n .service(\n web::resource(\"\")\n .route(web::post().to(user_role::accept_invitations_v2)),\n )\n .service(\n web::resource(\"/pre_auth\").route(\n web::post().to(user_role::accept_invitations_pre_auth),\n ),\n ),\n ),\n )\n .service(\n web::resource(\"/update_role\")\n .route(web::post().to(user_role::update_user_role)),\n )\n .service(\n web::resource(\"/delete\").route(web::delete().to(user_role::delete_user_role)),\n ),\n );\n\n if state.conf().clone_connector_allowlist.is_some() {\n route = route.service(\n web::resource(\"/clone_connector\").route(web::post().to(user::clone_connector)),\n );\n }\n\n // Role information\n route =\n route.service(\n web::scope(\"/role\")\n .service(\n web::resource(\"\")\n .route(web::get().to(user_role::get_role_from_token))\n // TODO: To be deprecated\n .route(web::post().to(user_role::create_role)),\n )\n .service(\n web::resource(\"/v2\")\n .route(web::post().to(user_role::create_role_v2))\n .route(\n web::get()\n .to(user_role::get_groups_and_resources_for_role_from_token),\n ),\n )\n .service(web::resource(\"/v3\").route(\n web::get().to(user_role::get_parent_groups_info_for_role_from_token),\n ))\n // TODO: To be deprecated\n .service(\n web::resource(\"/v2/list\")\n .route(web::get().to(user_role::list_roles_with_info)),\n )\n .service(\n web::scope(\"/list\")\n .service(\n web::resource(\"\")\n .route(web::get().to(user_role::list_roles_with_info)),\n )\n .service(web::resource(\"/invite\").route(\n web::get().to(user_role::list_invitable_roles_at_entity_level),\n ))\n .service(web::resource(\"/update\").route(\n web::get().to(user_role::list_updatable_roles_at_entity_level),\n )),\n )\n .service(\n web::resource(\"/{role_id}\")\n .route(web::get().to(user_role::get_role))\n .route(web::put().to(user_role::update_role)),\n )\n .service(\n web::resource(\"/{role_id}/v2\")\n .route(web::get().to(user_role::get_parent_info_for_role)),\n ),\n );\n\n #[cfg(feature = \"dummy_connector\")]\n {\n route = route.service(\n web::resource(\"/sample_data\")\n .route(web::post().to(user::generate_sample_data))\n .route(web::delete().to(user::delete_sample_data)),\n )\n }\n // Admin Theme\n // TODO: To be deprecated\n route = route.service(\n web::scope(\"/admin/theme\")\n .service(\n web::resource(\"\")\n .route(web::get().to(user::theme::get_theme_using_lineage))\n .route(web::post().to(user::theme::create_theme)),\n )\n .service(\n web::resource(\"/{theme_id}\")\n .route(web::get().to(user::theme::get_theme_using_theme_id))\n .route(web::put().to(user::theme::update_theme))\n .route(web::post().to(user::theme::upload_file_to_theme_storage))\n .route(web::delete().to(user::theme::delete_theme)),\n ),\n );\n // User Theme\n route = route.service(\n web::scope(\"/theme\")\n .service(\n web::resource(\"\")\n .route(web::post().to(user::theme::create_user_theme))\n .route(web::get().to(user::theme::get_user_theme_using_lineage)),\n )\n .service(\n web::resource(\"/list\")\n .route(web::get().to(user::theme::list_all_themes_in_lineage)),\n )\n .service(\n web::resource(\"/{theme_id}\")\n .route(web::get().to(user::theme::get_user_theme_using_theme_id))\n .route(web::put().to(user::theme::update_user_theme))\n .route(web::post().to(user::theme::upload_file_to_user_theme_storage))\n .route(web::delete().to(user::theme::delete_user_theme)),\n ),\n );\n route\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use crate::routes::authentication;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use crate::routes::authentication;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::list_payments_attempts", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn list_payments_attempts(&self) -> &Vec {\n todo!()\n }", + "after_code": "fn list_payments_attempts(&self) -> &Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::NetworkTransactionIdSupportedConnectors", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct NetworkTransactionIdSupportedConnectors {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub connector_list: HashSet,\n}", + "after_code": "pub struct NetworkTransactionIdSupportedConnectors {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub connector_list: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use super::deserialize_hashset;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use api_models::enums;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::mod::customers", + "file": "crates/router/src/core/payments.rs", + "kind": "mod_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub mod customers;", + "after_code": "pub mod customers;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_payment_method_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }", + "after_code": "fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::SessionState", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct SessionState {\n pub store: Box,\n /// Global store is used for global schema operations in tables like Users and Tenants\n pub global_store: Box,\n pub accounts_store: Box,\n pub conf: Arc>,\n pub api_client: Box,\n pub event_handler: EventsHandler,\n #[cfg(feature = \"email\")]\n pub email_client: Arc>,\n #[cfg(feature = \"olap\")]\n pub pool: AnalyticsProvider,\n pub file_storage_client: Arc,\n pub request_id: Option,\n pub base_url: String,\n pub tenant: Tenant,\n #[cfg(feature = \"olap\")]\n pub opensearch_client: Option>,\n pub grpc_client: Arc,\n pub theme_storage_client: Arc,\n pub locale: String,\n pub crm_client: Arc,\n pub infra_components: Option,\n pub enhancement: Option>,\n pub superposition_service: Option>,\n}", + "after_code": "pub struct SessionState {\n pub store: Box,\n /// Global store is used for global schema operations in tables like Users and Tenants\n pub global_store: Box,\n pub accounts_store: Box,\n pub conf: Arc>,\n pub api_client: Box,\n pub event_handler: EventsHandler,\n #[cfg(feature = \"email\")]\n pub email_client: Arc>,\n #[cfg(feature = \"olap\")]\n pub pool: AnalyticsProvider,\n pub file_storage_client: Arc,\n pub request_id: Option,\n pub base_url: String,\n pub tenant: Tenant,\n #[cfg(feature = \"olap\")]\n pub opensearch_client: Option>,\n pub grpc_client: Arc,\n pub theme_storage_client: Arc,\n pub locale: String,\n pub crm_client: Arc,\n pub infra_components: Option,\n pub enhancement: Option>,\n pub superposition_service: Option>,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use crate::analytics::AnalyticsProvider;", + "pub use crate::analytics::opensearch::OpenSearchClient;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use self::settings::Tenant;", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};", + "use router_env::tracing_actix_web::RequestId;" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::analytics::opensearch::OpenSearchClient;", + "use crate::analytics::AnalyticsProvider;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use self::settings::Tenant;", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use router_env::tracing_actix_web::RequestId;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_capture_method", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_capture_method(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_capture_method(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Profile", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Profile;", + "after_code": "pub struct Profile;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::decide_apple_pay_flow", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn decide_apple_pay_flow(\n state: &SessionState,\n payment_method_type: Option,\n merchant_connector_account: Option<&helpers::MerchantConnectorAccountType>,\n) -> Option {\n payment_method_type.and_then(|pmt| match pmt {\n enums::PaymentMethodType::ApplePay => {\n check_apple_pay_metadata(state, merchant_connector_account)\n }\n _ => None,\n })\n}", + "after_code": "fn decide_apple_pay_flow(\n state: &SessionState,\n payment_method_type: Option,\n merchant_connector_account: Option<&helpers::MerchantConnectorAccountType>,\n) -> Option {\n payment_method_type.and_then(|pmt| match pmt {\n enums::PaymentMethodType::ApplePay => {\n check_apple_pay_metadata(state, merchant_connector_account)\n }\n _ => None,\n })\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_frm_message", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }", + "after_code": "fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::AppState::function::get_request_id", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_request_id(&self) -> Option {\n self.api_client.get_request_id_str()\n }", + "after_code": "fn get_request_id(&self) -> Option {\n self.api_client.get_request_id_str()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_vault_operation_for_pre_network_tokenization", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn get_vault_operation_for_pre_network_tokenization(\n state: &SessionState,\n customer_id: id_type::CustomerId,\n card_data: &hyperswitch_domain_models::payment_method_data::Card,\n) -> payments::VaultOperation {\n let pre_tokenization_response =\n tokenization::pre_payment_tokenization(state, customer_id, card_data)\n .await\n .ok();\n match pre_tokenization_response {\n Some((Some(token_response), Some(token_ref))) => {\n let token_data = domain::NetworkTokenData::from(token_response);\n let network_token_data_for_vault = payments::NetworkTokenDataForVault {\n network_token_data: token_data.clone(),\n network_token_req_ref_id: token_ref,\n };\n\n payments::VaultOperation::SaveCardAndNetworkTokenData(Box::new(\n payments::CardAndNetworkTokenDataForVault {\n card_data: card_data.clone(),\n network_token: network_token_data_for_vault.clone(),\n },\n ))\n }\n Some((None, Some(token_ref))) => {\n payments::VaultOperation::SaveCardData(payments::CardDataForVault {\n card_data: card_data.clone(),\n network_token_req_ref_id: Some(token_ref),\n })\n }\n _ => payments::VaultOperation::SaveCardData(payments::CardDataForVault {\n card_data: card_data.clone(),\n network_token_req_ref_id: None,\n }),\n }\n}", + "after_code": "pub async fn get_vault_operation_for_pre_network_tokenization(\n state: &SessionState,\n customer_id: id_type::CustomerId,\n card_data: &hyperswitch_domain_models::payment_method_data::Card,\n) -> payments::VaultOperation {\n let pre_tokenization_response =\n tokenization::pre_payment_tokenization(state, customer_id, card_data)\n .await\n .ok();\n match pre_tokenization_response {\n Some((Some(token_response), Some(token_ref))) => {\n let token_data = domain::NetworkTokenData::from(token_response);\n let network_token_data_for_vault = payments::NetworkTokenDataForVault {\n network_token_data: token_data.clone(),\n network_token_req_ref_id: token_ref,\n };\n\n payments::VaultOperation::SaveCardAndNetworkTokenData(Box::new(\n payments::CardAndNetworkTokenDataForVault {\n card_data: card_data.clone(),\n network_token: network_token_data_for_vault.clone(),\n },\n ))\n }\n Some((None, Some(token_ref))) => {\n payments::VaultOperation::SaveCardData(payments::CardDataForVault {\n card_data: card_data.clone(),\n network_token_req_ref_id: Some(token_ref),\n })\n }\n _ => payments::VaultOperation::SaveCardData(payments::CardDataForVault {\n card_data: card_data.clone(),\n network_token_req_ref_id: None,\n }),\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_attempts", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_attempts(&self) -> Option> {\n todo!()\n }", + "after_code": "fn get_attempts(&self) -> Option> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Organization::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/organizations\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(admin::organization_create)))\n .service(\n web::scope(\"/{id}\")\n .service(\n web::resource(\"\")\n .route(web::get().to(admin::organization_retrieve))\n .route(web::put().to(admin::organization_update)),\n )\n .service(\n web::resource(\"/merchant-accounts\")\n .route(web::get().to(admin::merchant_account_list)),\n ),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/organizations\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(admin::organization_create)))\n .service(\n web::scope(\"/{id}\")\n .service(\n web::resource(\"\")\n .route(web::get().to(admin::organization_retrieve))\n .route(web::put().to(admin::organization_update)),\n )\n .service(\n web::resource(\"/merchant-accounts\")\n .route(web::get().to(admin::merchant_account_list)),\n ),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::ReqState", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ReqState {\n pub event_context: events::EventContext,\n}", + "after_code": "pub struct ReqState {\n pub event_context: events::EventContext,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::get_grpc_headers", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn get_grpc_headers(&self) -> GrpcHeaders {\n GrpcHeaders {\n tenant_id: self.tenant.tenant_id.get_string_repr().to_string(),\n request_id: self.request_id.map(|req_id| (*req_id).to_string()),\n }\n }", + "after_code": "pub fn get_grpc_headers(&self) -> GrpcHeaders {\n GrpcHeaders {\n tenant_id: self.tenant.tenant_id.get_string_repr().to_string(),\n request_id: self.request_id.map(|req_id| (*req_id).to_string()),\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::dummy_connector::*;", + "use super::payout_link::*;", + "use super::payouts::*;", + "use super::admin::*;", + "use super::recovery_webhooks::*;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::webhooks::*;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::ephemeral_key::*;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use super::dummy_connector::*;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use super::payout_link::*;", + "use super::payouts::*;", + "use super::admin::*;", + "use super::recovery_webhooks::*;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::webhooks::*;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::ephemeral_key::*;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Tokenization", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Tokenization;", + "after_code": "pub struct Tokenization;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::payments_list_attempts_using_payment_intent_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn payments_list_attempts_using_payment_intent_id(\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n payment_id: id_type::GlobalPaymentId,\n header_payload: HeaderPayload,\n) -> RouterResponse\nwhere\n F: Send + Clone + Sync,\n Op: Operation + Send + Sync + Clone,\n Req: Debug + Clone,\n D: OperationSessionGetters + Send + Sync + Clone,\n Res: transformers::ToResponse,\n{\n let (payment_data, _req, customer) = payments_attempt_operation_core::<_, _, _, _>(\n &state,\n req_state,\n merchant_context.clone(),\n profile,\n operation.clone(),\n req,\n payment_id,\n header_payload.clone(),\n )\n .await?;\n\n Res::generate_response(\n payment_data,\n customer,\n &state.base_url,\n operation,\n &state.conf.connector_request_reference_id_config,\n None,\n None,\n header_payload.x_hs_latency,\n &merchant_context,\n )\n}", + "after_code": "pub async fn payments_list_attempts_using_payment_intent_id(\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n payment_id: id_type::GlobalPaymentId,\n header_payload: HeaderPayload,\n) -> RouterResponse\nwhere\n F: Send + Clone + Sync,\n Op: Operation + Send + Sync + Clone,\n Req: Debug + Clone,\n D: OperationSessionGetters + Send + Sync + Clone,\n Res: transformers::ToResponse,\n{\n let (payment_data, _req, customer) = payments_attempt_operation_core::<_, _, _, _>(\n &state,\n req_state,\n merchant_context.clone(),\n profile,\n operation.clone(),\n req,\n payment_id,\n header_payload.clone(),\n )\n .await?;\n\n Res::generate_response(\n payment_data,\n customer,\n &state.base_url,\n operation,\n &state.conf.connector_request_reference_id_config,\n None,\n None,\n header_payload.x_hs_latency,\n &merchant_context,\n )\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::if_not_create_change_operation", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn if_not_create_change_operation<'a, Op, F>(\n status: storage_enums::IntentStatus,\n confirm: Option,\n current: &'a Op,\n) -> BoxedOperation<'a, F, api::PaymentsRequest, PaymentData>\nwhere\n F: Send + Clone + Sync,\n Op: Operation> + Send + Sync,\n &'a Op: Operation>,\n PaymentStatus: Operation>,\n &'a PaymentStatus: Operation>,\n{\n if confirm.unwrap_or(false) {\n Box::new(PaymentConfirm)\n } else {\n match status {\n storage_enums::IntentStatus::RequiresConfirmation\n | storage_enums::IntentStatus::RequiresCustomerAction\n | storage_enums::IntentStatus::RequiresPaymentMethod => Box::new(current),\n _ => Box::new(&PaymentStatus),\n }\n }\n}", + "after_code": "pub fn if_not_create_change_operation<'a, Op, F>(\n status: storage_enums::IntentStatus,\n confirm: Option,\n current: &'a Op,\n) -> BoxedOperation<'a, F, api::PaymentsRequest, PaymentData>\nwhere\n F: Send + Clone + Sync,\n Op: Operation> + Send + Sync,\n &'a Op: Operation>,\n PaymentStatus: Operation>,\n &'a PaymentStatus: Operation>,\n{\n if confirm.unwrap_or(false) {\n Box::new(PaymentConfirm)\n } else {\n match status {\n storage_enums::IntentStatus::RequiresConfirmation\n | storage_enums::IntentStatus::RequiresCustomerAction\n | storage_enums::IntentStatus::RequiresPaymentMethod => Box::new(current),\n _ => Box::new(&PaymentStatus),\n }\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/psync_flow.rs::hyperswitch_domain_models::payments::PaymentStatusData::function::construct_router_data", + "file": "crates/router/src/core/payments/flows/psync_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn construct_router_data<'a>(\n &self,\n state: &SessionState,\n connector_id: &str,\n merchant_context: &domain::MerchantContext,\n customer: &Option,\n merchant_connector_account: &domain::MerchantConnectorAccountTypeDetails,\n merchant_recipient_data: Option,\n header_payload: Option,\n ) -> RouterResult<\n types::RouterData,\n > {\n Box::pin(transformers::construct_router_data_for_psync(\n state,\n self.clone(),\n connector_id,\n merchant_context,\n customer,\n merchant_connector_account,\n merchant_recipient_data,\n header_payload,\n ))\n .await\n }", + "after_code": "async fn construct_router_data<'a>(\n &self,\n state: &SessionState,\n connector_id: &str,\n merchant_context: &domain::MerchantContext,\n customer: &Option,\n merchant_connector_account: &domain::MerchantConnectorAccountTypeDetails,\n merchant_recipient_data: Option,\n header_payload: Option,\n ) -> RouterResult<\n types::RouterData,\n > {\n Box::pin(transformers::construct_router_data_for_psync(\n state,\n self.clone(),\n connector_id,\n merchant_context,\n customer,\n merchant_connector_account,\n merchant_recipient_data,\n header_payload,\n ))\n .await\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n};" + ], + "after_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::{\n api::gateway,\n unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n },\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Hypersense", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Hypersense {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/hypersense\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/token\")\n .route(web::get().to(hypersense_routes::get_hypersense_token)),\n )\n .service(\n web::resource(\"/verify_token\")\n .route(web::post().to(hypersense_routes::verify_hypersense_token)),\n )\n .service(\n web::resource(\"/signout\")\n .route(web::post().to(hypersense_routes::signout_hypersense_token)),\n )\n }\n}", + "after_code": "impl Hypersense {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/hypersense\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/token\")\n .route(web::get().to(hypersense_routes::get_hypersense_token)),\n )\n .service(\n web::resource(\"/verify_token\")\n .route(web::post().to(hypersense_routes::verify_hypersense_token)),\n )\n .service(\n web::resource(\"/signout\")\n .route(web::post().to(hypersense_routes::signout_hypersense_token)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::DecideWalletFlow::function::get_apple_pay_payment_processing_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_apple_pay_payment_processing_details(\n &self,\n ) -> Option<&payments_api::PaymentProcessingDetails> {\n if let Self::ApplePayDecrypt(details) = self {\n Some(details)\n } else {\n None\n }\n }", + "after_code": "fn get_apple_pay_payment_processing_details(\n &self,\n ) -> Option<&payments_api::PaymentProcessingDetails> {\n if let Self::ApplePayDecrypt(details) = self {\n Some(details)\n } else {\n None\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::AppState::function::with_storage", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn with_storage(\n conf: settings::Settings,\n storage_impl: StorageImpl,\n shut_down_signal: oneshot::Sender<()>,\n api_client: Box,\n ) -> Self {\n #[allow(clippy::expect_used)]\n let secret_management_client = conf\n .secrets_management\n .get_secret_management_client()\n .await\n .expect(\"Failed to create secret management client\");\n\n let conf = Box::pin(secrets_transformers::fetch_raw_secrets(\n conf,\n &*secret_management_client,\n ))\n .await;\n\n #[allow(clippy::expect_used)]\n let encryption_client = conf\n .encryption_management\n .get_encryption_management_client()\n .await\n .expect(\"Failed to create encryption client\");\n\n Box::pin(async move {\n let testable = storage_impl == StorageImpl::PostgresqlTest;\n #[allow(clippy::expect_used)]\n let event_handler = conf\n .events\n .get_event_handler()\n .await\n .expect(\"Failed to create event handler\");\n\n #[allow(clippy::expect_used)]\n #[cfg(feature = \"olap\")]\n let opensearch_client = conf\n .opensearch\n .get_opensearch_client()\n .await\n .expect(\"Failed to initialize OpenSearch client.\")\n .map(Arc::new);\n\n #[allow(clippy::expect_used)]\n let cache_store = get_cache_store(&conf.clone(), shut_down_signal, testable)\n .await\n .expect(\"Failed to create store\");\n let global_store: Box = Self::get_store_interface(\n &storage_impl,\n &event_handler,\n &conf,\n &conf.multitenancy.global_tenant,\n Arc::clone(&cache_store),\n testable,\n )\n .await\n .get_global_storage_interface();\n #[cfg(feature = \"olap\")]\n let pools = conf\n .multitenancy\n .tenants\n .get_pools_map(conf.analytics.get_inner())\n .await;\n let stores = conf\n .multitenancy\n .tenants\n .get_store_interface_map(&storage_impl, &conf, Arc::clone(&cache_store), testable)\n .await;\n let accounts_store = conf\n .multitenancy\n .tenants\n .get_accounts_store_interface_map(\n &storage_impl,\n &conf,\n Arc::clone(&cache_store),\n testable,\n )\n .await;\n\n #[cfg(feature = \"email\")]\n let email_client = Arc::new(create_email_client(&conf).await);\n\n let file_storage_client = conf.file_storage.get_file_storage_client().await;\n let theme_storage_client = conf.theme.storage.get_file_storage_client().await;\n let crm_client = conf.crm.get_crm_client().await;\n\n let grpc_client = conf.grpc_client.get_grpc_client_interface().await;\n let infra_component_values = Self::process_env_mappings(conf.infra_values.clone());\n let enhancement = conf.enhancement.clone();\n let superposition_service = if conf.superposition.get_inner().enabled {\n match SuperpositionClient::new(conf.superposition.get_inner().clone()).await {\n Ok(client) => {\n router_env::logger::info!(\"Superposition client initialized successfully\");\n Some(Arc::new(client))\n }\n Err(err) => {\n router_env::logger::warn!(\n \"Failed to initialize superposition client: {:?}. Continuing without superposition support.\",\n err\n );\n None\n }\n }\n } else {\n None\n };\n Self {\n flow_name: String::from(\"default\"),\n stores,\n global_store,\n accounts_store,\n conf: Arc::new(conf),\n #[cfg(feature = \"email\")]\n email_client,\n api_client,\n event_handler,\n #[cfg(feature = \"olap\")]\n pools,\n #[cfg(feature = \"olap\")]\n opensearch_client,\n request_id: None,\n file_storage_client,\n encryption_client,\n grpc_client,\n theme_storage_client,\n crm_client,\n infra_components: infra_component_values,\n enhancement,\n superposition_service,\n }\n })\n .await\n }", + "after_code": "pub async fn with_storage(\n conf: settings::Settings,\n storage_impl: StorageImpl,\n shut_down_signal: oneshot::Sender<()>,\n api_client: Box,\n ) -> Self {\n #[allow(clippy::expect_used)]\n let secret_management_client = conf\n .secrets_management\n .get_secret_management_client()\n .await\n .expect(\"Failed to create secret management client\");\n\n let conf = Box::pin(secrets_transformers::fetch_raw_secrets(\n conf,\n &*secret_management_client,\n ))\n .await;\n\n #[allow(clippy::expect_used)]\n let encryption_client = conf\n .encryption_management\n .get_encryption_management_client()\n .await\n .expect(\"Failed to create encryption client\");\n\n Box::pin(async move {\n let testable = storage_impl == StorageImpl::PostgresqlTest;\n #[allow(clippy::expect_used)]\n let event_handler = conf\n .events\n .get_event_handler()\n .await\n .expect(\"Failed to create event handler\");\n\n #[allow(clippy::expect_used)]\n #[cfg(feature = \"olap\")]\n let opensearch_client = conf\n .opensearch\n .get_opensearch_client()\n .await\n .expect(\"Failed to initialize OpenSearch client.\")\n .map(Arc::new);\n\n #[allow(clippy::expect_used)]\n let cache_store = get_cache_store(&conf.clone(), shut_down_signal, testable)\n .await\n .expect(\"Failed to create store\");\n let global_store: Box = Self::get_store_interface(\n &storage_impl,\n &event_handler,\n &conf,\n &conf.multitenancy.global_tenant,\n Arc::clone(&cache_store),\n testable,\n )\n .await\n .get_global_storage_interface();\n #[cfg(feature = \"olap\")]\n let pools = conf\n .multitenancy\n .tenants\n .get_pools_map(conf.analytics.get_inner())\n .await;\n let stores = conf\n .multitenancy\n .tenants\n .get_store_interface_map(&storage_impl, &conf, Arc::clone(&cache_store), testable)\n .await;\n let accounts_store = conf\n .multitenancy\n .tenants\n .get_accounts_store_interface_map(\n &storage_impl,\n &conf,\n Arc::clone(&cache_store),\n testable,\n )\n .await;\n\n #[cfg(feature = \"email\")]\n let email_client = Arc::new(create_email_client(&conf).await);\n\n let file_storage_client = conf.file_storage.get_file_storage_client().await;\n let theme_storage_client = conf.theme.storage.get_file_storage_client().await;\n let crm_client = conf.crm.get_crm_client().await;\n\n let grpc_client = conf.grpc_client.get_grpc_client_interface().await;\n let infra_component_values = Self::process_env_mappings(conf.infra_values.clone());\n let enhancement = conf.enhancement.clone();\n let superposition_service = if conf.superposition.get_inner().enabled {\n match SuperpositionClient::new(conf.superposition.get_inner().clone()).await {\n Ok(client) => {\n router_env::logger::info!(\"Superposition client initialized successfully\");\n Some(Arc::new(client))\n }\n Err(err) => {\n router_env::logger::warn!(\n \"Failed to initialize superposition client: {:?}. Continuing without superposition support.\",\n err\n );\n None\n }\n }\n } else {\n None\n };\n Self {\n flow_name: String::from(\"default\"),\n stores,\n global_store,\n accounts_store,\n conf: Arc::new(conf),\n #[cfg(feature = \"email\")]\n email_client,\n api_client,\n event_handler,\n #[cfg(feature = \"olap\")]\n pools,\n #[cfg(feature = \"olap\")]\n opensearch_client,\n request_id: None,\n file_storage_client,\n encryption_client,\n grpc_client,\n theme_storage_client,\n crm_client,\n infra_components: infra_component_values,\n enhancement,\n superposition_service,\n }\n })\n .await\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::dummy_connector::*;", + "use super::payout_link::*;", + "use tokio::sync::oneshot;", + "use super::payouts::*;", + "use router_env::logger;", + "use super::admin::*;", + "use super::recovery_webhooks::*;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::webhooks::*;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::ephemeral_key::*;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use super::dummy_connector::*;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use super::payout_link::*;", + "use tokio::sync::oneshot;", + "use super::payouts::*;", + "use router_env::logger;", + "use super::admin::*;", + "use super::recovery_webhooks::*;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::webhooks::*;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::ephemeral_key::*;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Poll", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Poll {\n pub fn server(config: AppState) -> Scope {\n web::scope(\"/poll\")\n .app_data(web::Data::new(config))\n .service(\n web::resource(\"/status/{poll_id}\").route(web::get().to(poll::retrieve_poll_status)),\n )\n }\n}", + "after_code": "impl Poll {\n pub fn server(config: AppState) -> Scope {\n web::scope(\"/poll\")\n .app_data(web::Data::new(config))\n .service(\n web::resource(\"/status/{poll_id}\").route(web::get().to(poll::retrieve_poll_status)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::poll;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use super::poll;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_authorizations", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_authorizations(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_authorizations(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_setup_future_usage_in_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }", + "after_code": "fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use std::future;", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::get_req_state", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn get_req_state(&self) -> ReqState {\n ReqState {\n event_context: events::EventContext::new(self.event_handler.clone()),\n }\n }", + "after_code": "pub fn get_req_state(&self) -> ReqState {\n ReqState {\n event_context: events::EventContext::new(self.event_handler.clone()),\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::push_sessions_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn push_sessions_token(&mut self, _token: api::SessionToken) {\n todo!()\n }", + "after_code": "fn push_sessions_token(&mut self, _token: api::SessionToken) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAuthenticateCompleteAuthorize::function::call_payment_flow", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn call_payment_flow(\n &self,\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n req: PaymentsRedirectResponseData,\n connector_action: CallConnectorAction,\n connector: String,\n payment_id: id_type::PaymentId,\n ) -> RouterResult {\n let merchant_id = merchant_context.get_merchant_account().get_id().clone();\n let key_manager_state = &state.into();\n\n let payment_intent = state\n .store\n .find_payment_intent_by_payment_id_merchant_id(\n key_manager_state,\n &payment_id,\n &merchant_id,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n let payment_attempt = state\n .store\n .find_payment_attempt_by_attempt_id_merchant_id(\n &payment_intent.active_attempt.get_id(),\n &merchant_id,\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n let authentication_id = payment_attempt\n .authentication_id\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing authentication_id in payment_attempt\")?;\n let authentication = state\n .store\n .find_authentication_by_merchant_id_authentication_id(&merchant_id, &authentication_id)\n .await\n .to_not_found_response(errors::ApiErrorResponse::AuthenticationNotFound {\n id: authentication_id.get_string_repr().to_string(),\n })?;\n // Fetching merchant_connector_account to check if pull_mechanism is enabled for 3ds connector\n let authentication_merchant_connector_account = helpers::get_merchant_connector_account(\n state,\n &merchant_id,\n None,\n merchant_context.get_merchant_key_store(),\n &payment_intent\n .profile_id\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing profile_id in payment_intent\")?,\n &payment_attempt\n .authentication_connector\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing authentication connector in payment_intent\")?,\n None,\n )\n .await?;\n let is_pull_mechanism_enabled =\n utils::check_if_pull_mechanism_for_external_3ds_enabled_from_connector_metadata(\n authentication_merchant_connector_account\n .get_metadata()\n .map(|metadata| metadata.expose()),\n );\n let response = if is_pull_mechanism_enabled\n || authentication.authentication_type\n != Some(common_enums::DecoupledAuthenticationType::Challenge)\n {\n let payment_confirm_req = api::PaymentsRequest {\n payment_id: Some(req.resource_id.clone()),\n merchant_id: req.merchant_id.clone(),\n feature_metadata: Some(api_models::payments::FeatureMetadata {\n redirect_response: Some(api_models::payments::RedirectResponse {\n param: req.param.map(Secret::new),\n json_payload: Some(\n req.json_payload.unwrap_or(serde_json::json!({})).into(),\n ),\n }),\n search_tags: None,\n apple_pay_recurring_details: None,\n }),\n ..Default::default()\n };\n Box::pin(payments_core::<\n api::Authorize,\n api::PaymentsResponse,\n _,\n _,\n _,\n _,\n >(\n state.clone(),\n req_state,\n merchant_context.clone(),\n None,\n PaymentConfirm,\n payment_confirm_req,\n services::api::AuthFlow::Merchant,\n connector_action,\n None,\n None,\n HeaderPayload::with_source(enums::PaymentSource::ExternalAuthenticator),\n ))\n .await?\n } else {\n let payment_sync_req = api::PaymentsRetrieveRequest {\n resource_id: req.resource_id,\n merchant_id: req.merchant_id,\n param: req.param,\n force_sync: req.force_sync,\n connector: req.connector,\n merchant_connector_details: req.creds_identifier.map(|creds_id| {\n api::MerchantConnectorDetailsWrap {\n creds_identifier: creds_id,\n encoded_data: None,\n }\n }),\n client_secret: None,\n expand_attempts: None,\n expand_captures: None,\n all_keys_required: None,\n };\n Box::pin(\n payments_core::(\n state.clone(),\n req_state,\n merchant_context.clone(),\n None,\n PaymentStatus,\n payment_sync_req,\n services::api::AuthFlow::Merchant,\n connector_action,\n None,\n None,\n HeaderPayload::default(),\n ),\n )\n .await?\n };\n let payments_response = match response {\n services::ApplicationResponse::Json(response) => Ok(response),\n services::ApplicationResponse::JsonWithHeaders((response, _)) => Ok(response),\n _ => Err(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get the response in json\"),\n }?;\n // When intent status is RequiresCustomerAction, Set poll_id in redis to allow the fetch status of poll through retrieve_poll_status api from client\n if payments_response.status == common_enums::IntentStatus::RequiresCustomerAction {\n let req_poll_id = core_utils::get_external_authentication_request_poll_id(&payment_id);\n let poll_id = core_utils::get_poll_id(&merchant_id, req_poll_id.clone());\n let redis_conn = state\n .store\n .get_redis_conn()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get redis connection\")?;\n redis_conn\n .set_key_with_expiry(\n &poll_id.into(),\n api_models::poll::PollStatus::Pending.to_string(),\n consts::POLL_ID_TTL,\n )\n .await\n .change_context(errors::StorageError::KVError)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to add poll_id in redis\")?;\n };\n let default_poll_config = router_types::PollConfig::default();\n let default_config_str = default_poll_config\n .encode_to_string_of_json()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while stringifying default poll config\")?;\n let poll_config = state\n .store\n .find_config_by_key_unwrap_or(\n &router_types::PollConfig::get_poll_config_key(connector),\n Some(default_config_str),\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"The poll config was not found in the DB\")?;\n let poll_config: router_types::PollConfig = poll_config\n .config\n .parse_struct(\"PollConfig\")\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while parsing PollConfig\")?;\n let profile_id = payments_response\n .profile_id\n .as_ref()\n .get_required_value(\"profile_id\")?;\n let business_profile = state\n .store\n .find_business_profile_by_profile_id(\n key_manager_state,\n merchant_context.get_merchant_key_store(),\n profile_id,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::ProfileNotFound {\n id: profile_id.get_string_repr().to_owned(),\n })?;\n Ok(router_types::AuthenticatePaymentFlowResponse {\n payments_response,\n poll_config,\n business_profile,\n })\n }", + "after_code": "async fn call_payment_flow(\n &self,\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n req: PaymentsRedirectResponseData,\n connector_action: CallConnectorAction,\n connector: String,\n payment_id: id_type::PaymentId,\n ) -> RouterResult {\n let merchant_id = merchant_context.get_merchant_account().get_id().clone();\n let key_manager_state = &state.into();\n\n let payment_intent = state\n .store\n .find_payment_intent_by_payment_id_merchant_id(\n key_manager_state,\n &payment_id,\n &merchant_id,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n let payment_attempt = state\n .store\n .find_payment_attempt_by_attempt_id_merchant_id(\n &payment_intent.active_attempt.get_id(),\n &merchant_id,\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n let authentication_id = payment_attempt\n .authentication_id\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing authentication_id in payment_attempt\")?;\n let authentication = state\n .store\n .find_authentication_by_merchant_id_authentication_id(&merchant_id, &authentication_id)\n .await\n .to_not_found_response(errors::ApiErrorResponse::AuthenticationNotFound {\n id: authentication_id.get_string_repr().to_string(),\n })?;\n // Fetching merchant_connector_account to check if pull_mechanism is enabled for 3ds connector\n let authentication_merchant_connector_account = helpers::get_merchant_connector_account(\n state,\n &merchant_id,\n None,\n merchant_context.get_merchant_key_store(),\n &payment_intent\n .profile_id\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing profile_id in payment_intent\")?,\n &payment_attempt\n .authentication_connector\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing authentication connector in payment_intent\")?,\n None,\n )\n .await?;\n let is_pull_mechanism_enabled =\n utils::check_if_pull_mechanism_for_external_3ds_enabled_from_connector_metadata(\n authentication_merchant_connector_account\n .get_metadata()\n .map(|metadata| metadata.expose()),\n );\n let response = if is_pull_mechanism_enabled\n || authentication.authentication_type\n != Some(common_enums::DecoupledAuthenticationType::Challenge)\n {\n let payment_confirm_req = api::PaymentsRequest {\n payment_id: Some(req.resource_id.clone()),\n merchant_id: req.merchant_id.clone(),\n feature_metadata: Some(api_models::payments::FeatureMetadata {\n redirect_response: Some(api_models::payments::RedirectResponse {\n param: req.param.map(Secret::new),\n json_payload: Some(\n req.json_payload.unwrap_or(serde_json::json!({})).into(),\n ),\n }),\n search_tags: None,\n apple_pay_recurring_details: None,\n }),\n ..Default::default()\n };\n Box::pin(payments_core::<\n api::Authorize,\n api::PaymentsResponse,\n _,\n _,\n _,\n _,\n >(\n state.clone(),\n req_state,\n merchant_context.clone(),\n None,\n PaymentConfirm,\n payment_confirm_req,\n services::api::AuthFlow::Merchant,\n connector_action,\n None,\n None,\n HeaderPayload::with_source(enums::PaymentSource::ExternalAuthenticator),\n ))\n .await?\n } else {\n let payment_sync_req = api::PaymentsRetrieveRequest {\n resource_id: req.resource_id,\n merchant_id: req.merchant_id,\n param: req.param,\n force_sync: req.force_sync,\n connector: req.connector,\n merchant_connector_details: req.creds_identifier.map(|creds_id| {\n api::MerchantConnectorDetailsWrap {\n creds_identifier: creds_id,\n encoded_data: None,\n }\n }),\n client_secret: None,\n expand_attempts: None,\n expand_captures: None,\n all_keys_required: None,\n };\n Box::pin(\n payments_core::(\n state.clone(),\n req_state,\n merchant_context.clone(),\n None,\n PaymentStatus,\n payment_sync_req,\n services::api::AuthFlow::Merchant,\n connector_action,\n None,\n None,\n HeaderPayload::default(),\n ),\n )\n .await?\n };\n let payments_response = match response {\n services::ApplicationResponse::Json(response) => Ok(response),\n services::ApplicationResponse::JsonWithHeaders((response, _)) => Ok(response),\n _ => Err(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get the response in json\"),\n }?;\n // When intent status is RequiresCustomerAction, Set poll_id in redis to allow the fetch status of poll through retrieve_poll_status api from client\n if payments_response.status == common_enums::IntentStatus::RequiresCustomerAction {\n let req_poll_id = core_utils::get_external_authentication_request_poll_id(&payment_id);\n let poll_id = core_utils::get_poll_id(&merchant_id, req_poll_id.clone());\n let redis_conn = state\n .store\n .get_redis_conn()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get redis connection\")?;\n redis_conn\n .set_key_with_expiry(\n &poll_id.into(),\n api_models::poll::PollStatus::Pending.to_string(),\n consts::POLL_ID_TTL,\n )\n .await\n .change_context(errors::StorageError::KVError)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to add poll_id in redis\")?;\n };\n let default_poll_config = router_types::PollConfig::default();\n let default_config_str = default_poll_config\n .encode_to_string_of_json()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while stringifying default poll config\")?;\n let poll_config = state\n .store\n .find_config_by_key_unwrap_or(\n &router_types::PollConfig::get_poll_config_key(connector),\n Some(default_config_str),\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"The poll config was not found in the DB\")?;\n let poll_config: router_types::PollConfig = poll_config\n .config\n .parse_struct(\"PollConfig\")\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while parsing PollConfig\")?;\n let profile_id = payments_response\n .profile_id\n .as_ref()\n .get_required_value(\"profile_id\")?;\n let business_profile = state\n .store\n .find_business_profile_by_profile_id(\n key_manager_state,\n merchant_context.get_merchant_key_store(),\n profile_id,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::ProfileNotFound {\n id: profile_id.get_string_repr().to_owned(),\n })?;\n Ok(router_types::AuthenticatePaymentFlowResponse {\n payments_response,\n poll_config,\n business_profile,\n })\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::DecideWalletFlow::function::get_paze_payment_processing_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_paze_payment_processing_details(&self) -> Option<&PazePaymentProcessingDetails> {\n if let Self::PazeDecrypt(details) = self {\n Some(details)\n } else {\n None\n }\n }", + "after_code": "fn get_paze_payment_processing_details(&self) -> Option<&PazePaymentProcessingDetails> {\n if let Self::PazeDecrypt(details) = self {\n Some(details)\n } else {\n None\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Relay", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Relay {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/relay\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(relay::relay)))\n .service(web::resource(\"/{relay_id}\").route(web::get().to(relay::relay_retrieve)))\n }\n}", + "after_code": "impl Relay {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/relay\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(relay::relay)))\n .service(web::resource(\"/{relay_id}\").route(web::get().to(relay::relay_retrieve)))\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Mandates", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Mandates {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/mandates\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n route =\n route.service(web::resource(\"/list\").route(web::get().to(retrieve_mandates_list)));\n route = route.service(web::resource(\"/{id}\").route(web::get().to(get_mandate)));\n }\n #[cfg(feature = \"oltp\")]\n {\n route =\n route.service(web::resource(\"/revoke/{id}\").route(web::post().to(revoke_mandate)));\n }\n route\n }\n}", + "after_code": "impl Mandates {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/mandates\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n route =\n route.service(web::resource(\"/list\").route(web::get().to(retrieve_mandates_list)));\n route = route.service(web::resource(\"/{id}\").route(web::get().to(get_mandate)));\n }\n #[cfg(feature = \"oltp\")]\n {\n route =\n route.service(web::resource(\"/revoke/{id}\").route(web::post().to(revoke_mandate)));\n }\n route\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_attempt(&self) -> &storage::PaymentAttempt {\n &self.payment_attempt\n }", + "after_code": "fn get_payment_attempt(&self) -> &storage::PaymentAttempt {\n &self.payment_attempt\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_connector_response_reference_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n todo!()\n }", + "after_code": "fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::Database", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Database {\n pub username: String,\n pub password: Secret,\n pub host: String,\n pub port: u16,\n pub dbname: String,\n pub pool_size: u32,\n pub connection_timeout: u64,\n pub queue_strategy: QueueStrategy,\n pub min_idle: Option,\n pub max_lifetime: Option,\n}", + "after_code": "pub struct Database {\n pub username: String,\n pub password: Secret,\n pub host: String,\n pub port: u16,\n pub dbname: String,\n pub pool_size: u32,\n pub connection_timeout: u64,\n pub queue_strategy: QueueStrategy,\n pub min_idle: Option,\n pub max_lifetime: Option,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use storage_impl::config::QueueStrategy;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use storage_impl::config::QueueStrategy;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_authentication", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>\n {\n todo!()\n }", + "after_code": "fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>\n {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_merchant_connector_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_merchant_connector_details(\n &self,\n ) -> Option {\n todo!()\n }", + "after_code": "fn get_merchant_connector_details(\n &self,\n ) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_is_manual_retry_enabled", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_is_manual_retry_enabled(&self) -> Option {\n self.is_manual_retry_enabled\n }", + "after_code": "fn get_is_manual_retry_enabled(&self) -> Option {\n self.is_manual_retry_enabled\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::ProcessTracker", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ProcessTracker;", + "after_code": "pub struct ProcessTracker;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_payment_attempt_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_attempt_connector(&self) -> Option<&str> {\n todo!()\n }", + "after_code": "fn get_payment_attempt_connector(&self) -> Option<&str> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::MerchantAccount", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl MerchantAccount {\n pub fn server(state: AppState) -> Scope {\n let mut routes = web::scope(\"/accounts\")\n .service(web::resource(\"\").route(web::post().to(admin::merchant_account_create)))\n .service(web::resource(\"/list\").route(web::get().to(admin::merchant_account_list)))\n .service(\n web::resource(\"/{id}/kv\")\n .route(web::post().to(admin::merchant_account_toggle_kv))\n .route(web::get().to(admin::merchant_account_kv_status)),\n )\n .service(\n web::resource(\"/transfer\")\n .route(web::post().to(admin::merchant_account_transfer_keys)),\n )\n .service(\n web::resource(\"/kv\").route(web::post().to(admin::merchant_account_toggle_all_kv)),\n )\n .service(\n web::resource(\"/{id}\")\n .route(web::get().to(admin::retrieve_merchant_account))\n .route(web::post().to(admin::update_merchant_account))\n .route(web::delete().to(admin::delete_merchant_account)),\n );\n if state.conf.platform.enabled {\n routes = routes.service(\n web::resource(\"/{id}/platform\")\n .route(web::post().to(admin::merchant_account_enable_platform_account)),\n )\n }\n routes.app_data(web::Data::new(state))\n }\n}", + "after_code": "impl MerchantAccount {\n pub fn server(state: AppState) -> Scope {\n let mut routes = web::scope(\"/accounts\")\n .service(web::resource(\"\").route(web::post().to(admin::merchant_account_create)))\n .service(web::resource(\"/list\").route(web::get().to(admin::merchant_account_list)))\n .service(\n web::resource(\"/{id}/kv\")\n .route(web::post().to(admin::merchant_account_toggle_kv))\n .route(web::get().to(admin::merchant_account_kv_status)),\n )\n .service(\n web::resource(\"/transfer\")\n .route(web::post().to(admin::merchant_account_transfer_keys)),\n )\n .service(\n web::resource(\"/kv\").route(web::post().to(admin::merchant_account_toggle_all_kv)),\n )\n .service(\n web::resource(\"/{id}\")\n .route(web::get().to(admin::retrieve_merchant_account))\n .route(web::post().to(admin::update_merchant_account))\n .route(web::delete().to(admin::delete_merchant_account)),\n );\n if state.conf.platform.enabled {\n routes = routes.service(\n web::resource(\"/{id}/platform\")\n .route(web::post().to(admin::merchant_account_enable_platform_account)),\n )\n }\n routes.app_data(web::Data::new(state))\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::NTWithNTIRef", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct NTWithNTIRef {\n pub network_transaction_id: String,\n pub token_exp_month: Option>,\n pub token_exp_year: Option>,\n}", + "after_code": "pub struct NTWithNTIRef {\n pub network_transaction_id: String,\n pub token_exp_month: Option>,\n pub token_exp_year: Option>,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_connector_customer_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_customer_id(&mut self, _customer_id: Option) {\n // TODO: handle this case. Should we add connector_customer_id in paymentConfirmData?\n }", + "after_code": "fn set_connector_customer_id(&mut self, _customer_id: Option) {\n // TODO: handle this case. Should we add connector_customer_id in paymentConfirmData?\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_optional_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt> {\n Some(&self.payment_attempt)\n }", + "after_code": "fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt> {\n Some(&self.payment_attempt)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_ephemeral_key", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_ephemeral_key(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_ephemeral_key(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Payments::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/payments\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n route = route\n .service(\n web::resource(\"/list\")\n .route(web::get().to(payments::payments_list))\n .route(web::post().to(payments::payments_list_by_filter)),\n )\n .service(\n web::resource(\"/profile/list\")\n .route(web::get().to(payments::profile_payments_list))\n .route(web::post().to(payments::profile_payments_list_by_filter)),\n )\n .service(\n web::resource(\"/filter\")\n .route(web::post().to(payments::get_filters_for_payments)),\n )\n .service(\n web::resource(\"/v2/filter\").route(web::get().to(payments::get_payment_filters)),\n )\n .service(\n web::resource(\"/aggregate\")\n .route(web::get().to(payments::get_payments_aggregates)),\n )\n .service(\n web::resource(\"/profile/aggregate\")\n .route(web::get().to(payments::get_payments_aggregates_profile)),\n )\n .service(\n web::resource(\"/v2/profile/filter\")\n .route(web::get().to(payments::get_payment_filters_profile)),\n )\n .service(\n web::resource(\"/{payment_id}/manual-update\")\n .route(web::put().to(payments::payments_manual_update)),\n )\n }\n #[cfg(feature = \"oltp\")]\n {\n route = route\n .service(web::resource(\"\").route(web::post().to(payments::payments_create)))\n .service(\n web::resource(\"/session_tokens\")\n .route(web::post().to(payments::payments_connector_session)),\n )\n .service(\n web::resource(\"/sync\")\n .route(web::post().to(payments::payments_retrieve_with_gateway_creds)),\n )\n .service(\n web::resource(\"/{payment_id}\")\n .route(web::get().to(payments::payments_retrieve))\n .route(web::post().to(payments::payments_update)),\n )\n .service(\n web::resource(\"/{payment_id}/post_session_tokens\").route(web::post().to(payments::payments_post_session_tokens)),\n )\n .service(\n web::resource(\"/{payment_id}/confirm\").route(web::post().to(payments::payments_confirm)),\n )\n .service(\n web::resource(\"/{payment_id}/cancel\").route(web::post().to(payments::payments_cancel)),\n )\n .service(\n web::resource(\"/{payment_id}/cancel_post_capture\").route(web::post().to(payments::payments_cancel_post_capture)),\n )\n .service(\n web::resource(\"/{payment_id}/capture\").route(web::post().to(payments::payments_capture)),\n )\n .service(\n web::resource(\"/{payment_id}/approve\")\n .route(web::post().to(payments::payments_approve)),\n )\n .service(\n web::resource(\"/{payment_id}/reject\")\n .route(web::post().to(payments::payments_reject)),\n )\n .service(\n web::resource(\"/{payment_id}/eligibility\")\n .route(web::post().to(payments::payments_submit_eligibility)),\n )\n .service(\n web::resource(\"/redirect/{payment_id}/{merchant_id}/{attempt_id}\")\n .route(web::get().to(payments::payments_start)),\n )\n .service(\n web::resource(\n \"/{payment_id}/{merchant_id}/redirect/response/{connector}/{creds_identifier}\",\n )\n .route(web::get().to(payments::payments_redirect_response_with_creds_identifier)),\n )\n .service(\n web::resource(\"/{payment_id}/{merchant_id}/redirect/response/{connector}\")\n .route(web::get().to(payments::payments_redirect_response))\n .route(web::post().to(payments::payments_redirect_response))\n )\n .service(\n web::resource(\"/{payment_id}/{merchant_id}/redirect/complete/{connector}/{creds_identifier}\")\n .route(web::get().to(payments::payments_complete_authorize_redirect_with_creds_identifier))\n .route(web::post().to(payments::payments_complete_authorize_redirect_with_creds_identifier))\n )\n .service(\n web::resource(\"/{payment_id}/{merchant_id}/redirect/complete/{connector}\")\n .route(web::get().to(payments::payments_complete_authorize_redirect))\n .route(web::post().to(payments::payments_complete_authorize_redirect)),\n )\n .service(\n web::resource(\"/{payment_id}/complete_authorize\")\n .route(web::post().to(payments::payments_complete_authorize)),\n )\n .service(\n web::resource(\"/{payment_id}/incremental_authorization\").route(web::post().to(payments::payments_incremental_authorization)),\n )\n .service(\n web::resource(\"/{payment_id}/extend_authorization\").route(web::post().to(payments::payments_extend_authorization)),\n )\n .service(\n web::resource(\"/{payment_id}/{merchant_id}/authorize/{connector}\")\n .route(web::post().to(payments::post_3ds_payments_authorize))\n .route(web::get().to(payments::post_3ds_payments_authorize))\n )\n .service(\n web::resource(\"/{payment_id}/3ds/authentication\").route(web::post().to(payments::payments_external_authentication)),\n )\n .service(\n web::resource(\"/{payment_id}/extended_card_info\").route(web::get().to(payments::retrieve_extended_card_info)),\n )\n .service(\n web::resource(\"{payment_id}/calculate_tax\")\n .route(web::post().to(payments::payments_dynamic_tax_calculation)),\n )\n .service(\n web::resource(\"{payment_id}/update_metadata\")\n .route(web::post().to(payments::payments_update_metadata)),\n );\n }\n route\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/payments\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n route = route\n .service(\n web::resource(\"/list\")\n .route(web::get().to(payments::payments_list))\n .route(web::post().to(payments::payments_list_by_filter)),\n )\n .service(\n web::resource(\"/profile/list\")\n .route(web::get().to(payments::profile_payments_list))\n .route(web::post().to(payments::profile_payments_list_by_filter)),\n )\n .service(\n web::resource(\"/filter\")\n .route(web::post().to(payments::get_filters_for_payments)),\n )\n .service(\n web::resource(\"/v2/filter\").route(web::get().to(payments::get_payment_filters)),\n )\n .service(\n web::resource(\"/aggregate\")\n .route(web::get().to(payments::get_payments_aggregates)),\n )\n .service(\n web::resource(\"/profile/aggregate\")\n .route(web::get().to(payments::get_payments_aggregates_profile)),\n )\n .service(\n web::resource(\"/v2/profile/filter\")\n .route(web::get().to(payments::get_payment_filters_profile)),\n )\n .service(\n web::resource(\"/{payment_id}/manual-update\")\n .route(web::put().to(payments::payments_manual_update)),\n )\n }\n #[cfg(feature = \"oltp\")]\n {\n route = route\n .service(web::resource(\"\").route(web::post().to(payments::payments_create)))\n .service(\n web::resource(\"/session_tokens\")\n .route(web::post().to(payments::payments_connector_session)),\n )\n .service(\n web::resource(\"/sync\")\n .route(web::post().to(payments::payments_retrieve_with_gateway_creds)),\n )\n .service(\n web::resource(\"/{payment_id}\")\n .route(web::get().to(payments::payments_retrieve))\n .route(web::post().to(payments::payments_update)),\n )\n .service(\n web::resource(\"/{payment_id}/post_session_tokens\").route(web::post().to(payments::payments_post_session_tokens)),\n )\n .service(\n web::resource(\"/{payment_id}/confirm\").route(web::post().to(payments::payments_confirm)),\n )\n .service(\n web::resource(\"/{payment_id}/cancel\").route(web::post().to(payments::payments_cancel)),\n )\n .service(\n web::resource(\"/{payment_id}/cancel_post_capture\").route(web::post().to(payments::payments_cancel_post_capture)),\n )\n .service(\n web::resource(\"/{payment_id}/capture\").route(web::post().to(payments::payments_capture)),\n )\n .service(\n web::resource(\"/{payment_id}/approve\")\n .route(web::post().to(payments::payments_approve)),\n )\n .service(\n web::resource(\"/{payment_id}/reject\")\n .route(web::post().to(payments::payments_reject)),\n )\n .service(\n web::resource(\"/{payment_id}/eligibility\")\n .route(web::post().to(payments::payments_submit_eligibility)),\n )\n .service(\n web::resource(\"/redirect/{payment_id}/{merchant_id}/{attempt_id}\")\n .route(web::get().to(payments::payments_start)),\n )\n .service(\n web::resource(\n \"/{payment_id}/{merchant_id}/redirect/response/{connector}/{creds_identifier}\",\n )\n .route(web::get().to(payments::payments_redirect_response_with_creds_identifier)),\n )\n .service(\n web::resource(\"/{payment_id}/{merchant_id}/redirect/response/{connector}\")\n .route(web::get().to(payments::payments_redirect_response))\n .route(web::post().to(payments::payments_redirect_response))\n )\n .service(\n web::resource(\"/{payment_id}/{merchant_id}/redirect/complete/{connector}/{creds_identifier}\")\n .route(web::get().to(payments::payments_complete_authorize_redirect_with_creds_identifier))\n .route(web::post().to(payments::payments_complete_authorize_redirect_with_creds_identifier))\n )\n .service(\n web::resource(\"/{payment_id}/{merchant_id}/redirect/complete/{connector}\")\n .route(web::get().to(payments::payments_complete_authorize_redirect))\n .route(web::post().to(payments::payments_complete_authorize_redirect)),\n )\n .service(\n web::resource(\"/{payment_id}/complete_authorize\")\n .route(web::post().to(payments::payments_complete_authorize)),\n )\n .service(\n web::resource(\"/{payment_id}/incremental_authorization\").route(web::post().to(payments::payments_incremental_authorization)),\n )\n .service(\n web::resource(\"/{payment_id}/extend_authorization\").route(web::post().to(payments::payments_extend_authorization)),\n )\n .service(\n web::resource(\"/{payment_id}/{merchant_id}/authorize/{connector}\")\n .route(web::post().to(payments::post_3ds_payments_authorize))\n .route(web::get().to(payments::post_3ds_payments_authorize))\n )\n .service(\n web::resource(\"/{payment_id}/3ds/authentication\").route(web::post().to(payments::payments_external_authentication)),\n )\n .service(\n web::resource(\"/{payment_id}/extended_card_info\").route(web::get().to(payments::retrieve_extended_card_info)),\n )\n .service(\n web::resource(\"{payment_id}/calculate_tax\")\n .route(web::post().to(payments::payments_dynamic_tax_calculation)),\n )\n .service(\n web::resource(\"{payment_id}/update_metadata\")\n .route(web::post().to(payments::payments_update_metadata)),\n );\n }\n route\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use crate::routes::authentication;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use crate::routes::authentication;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::trait::PaymentMethodChecker", + "file": "crates/router/src/core/payments.rs", + "kind": "trait_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub trait PaymentMethodChecker {\n fn should_update_in_post_update_tracker(&self) -> bool;\n fn should_update_in_update_tracker(&self) -> bool;\n}", + "after_code": "pub trait PaymentMethodChecker {\n fn should_update_in_post_update_tracker(&self) -> bool;\n fn should_update_in_update_tracker(&self) -> bool;\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_pm_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_pm_token(&mut self, _token: String) {\n todo!()\n }", + "after_code": "fn set_pm_token(&mut self, _token: String) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_cancellation_reason", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n todo!()\n }", + "after_code": "fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_session_token_for_click_to_pay", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn get_session_token_for_click_to_pay(\n state: &SessionState,\n merchant_id: &id_type::MerchantId,\n merchant_context: &domain::MerchantContext,\n authentication_product_ids: common_types::payments::AuthenticationConnectorAccountMap,\n payment_intent: &payments::PaymentIntent,\n profile_id: &id_type::ProfileId,\n) -> RouterResult {\n let click_to_pay_mca_id = authentication_product_ids\n .get_click_to_pay_connector_account_id()\n .change_context(errors::ApiErrorResponse::MissingRequiredField {\n field_name: \"authentication_product_ids\",\n })?;\n let key_manager_state = &(state).into();\n let merchant_connector_account = state\n .store\n .find_by_merchant_connector_account_merchant_id_merchant_connector_id(\n key_manager_state,\n merchant_id,\n &click_to_pay_mca_id,\n merchant_context.get_merchant_key_store(),\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::MerchantConnectorAccountNotFound {\n id: click_to_pay_mca_id.get_string_repr().to_string(),\n })?;\n let click_to_pay_metadata: ClickToPayMetaData = merchant_connector_account\n .metadata\n .parse_value(\"ClickToPayMetaData\")\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while parsing ClickToPayMetaData\")?;\n let transaction_currency = payment_intent\n .currency\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"currency is not present in payment_data.payment_intent\")?;\n let required_amount_type = common_utils::types::StringMajorUnitForConnector;\n let transaction_amount = required_amount_type\n .convert(payment_intent.amount, transaction_currency)\n .change_context(errors::ApiErrorResponse::AmountConversionFailed {\n amount_type: \"string major unit\",\n })?;\n\n let customer_details_value = payment_intent\n .customer_details\n .clone()\n .get_required_value(\"customer_details\")?;\n\n let customer_details: CustomerData = customer_details_value\n .parse_value(\"CustomerData\")\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while parsing customer data from payment intent\")?;\n\n validate_customer_details_for_click_to_pay(&customer_details)?;\n\n let provider = match merchant_connector_account.connector_name.as_str() {\n \"ctp_mastercard\" => Some(enums::CtpServiceProvider::Mastercard),\n \"ctp_visa\" => Some(enums::CtpServiceProvider::Visa),\n _ => None,\n };\n\n let card_brands = get_card_brands_based_on_active_merchant_connector_account(\n state,\n profile_id,\n merchant_context.get_merchant_key_store(),\n )\n .await?;\n\n Ok(api_models::payments::SessionToken::ClickToPay(Box::new(\n api_models::payments::ClickToPaySessionResponse {\n dpa_id: click_to_pay_metadata.dpa_id,\n dpa_name: click_to_pay_metadata.dpa_name,\n locale: click_to_pay_metadata.locale,\n card_brands,\n acquirer_bin: click_to_pay_metadata.acquirer_bin,\n acquirer_merchant_id: click_to_pay_metadata.acquirer_merchant_id,\n merchant_category_code: click_to_pay_metadata.merchant_category_code,\n merchant_country_code: click_to_pay_metadata.merchant_country_code,\n transaction_amount,\n transaction_currency_code: transaction_currency,\n phone_number: customer_details.phone.clone(),\n email: customer_details.email.clone(),\n phone_country_code: customer_details.phone_country_code.clone(),\n provider,\n dpa_client_id: click_to_pay_metadata.dpa_client_id.clone(),\n },\n )))\n}", + "after_code": "pub async fn get_session_token_for_click_to_pay(\n state: &SessionState,\n merchant_id: &id_type::MerchantId,\n merchant_context: &domain::MerchantContext,\n authentication_product_ids: common_types::payments::AuthenticationConnectorAccountMap,\n payment_intent: &payments::PaymentIntent,\n profile_id: &id_type::ProfileId,\n) -> RouterResult {\n let click_to_pay_mca_id = authentication_product_ids\n .get_click_to_pay_connector_account_id()\n .change_context(errors::ApiErrorResponse::MissingRequiredField {\n field_name: \"authentication_product_ids\",\n })?;\n let key_manager_state = &(state).into();\n let merchant_connector_account = state\n .store\n .find_by_merchant_connector_account_merchant_id_merchant_connector_id(\n key_manager_state,\n merchant_id,\n &click_to_pay_mca_id,\n merchant_context.get_merchant_key_store(),\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::MerchantConnectorAccountNotFound {\n id: click_to_pay_mca_id.get_string_repr().to_string(),\n })?;\n let click_to_pay_metadata: ClickToPayMetaData = merchant_connector_account\n .metadata\n .parse_value(\"ClickToPayMetaData\")\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while parsing ClickToPayMetaData\")?;\n let transaction_currency = payment_intent\n .currency\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"currency is not present in payment_data.payment_intent\")?;\n let required_amount_type = common_utils::types::StringMajorUnitForConnector;\n let transaction_amount = required_amount_type\n .convert(payment_intent.amount, transaction_currency)\n .change_context(errors::ApiErrorResponse::AmountConversionFailed {\n amount_type: \"string major unit\",\n })?;\n\n let customer_details_value = payment_intent\n .customer_details\n .clone()\n .get_required_value(\"customer_details\")?;\n\n let customer_details: CustomerData = customer_details_value\n .parse_value(\"CustomerData\")\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while parsing customer data from payment intent\")?;\n\n validate_customer_details_for_click_to_pay(&customer_details)?;\n\n let provider = match merchant_connector_account.connector_name.as_str() {\n \"ctp_mastercard\" => Some(enums::CtpServiceProvider::Mastercard),\n \"ctp_visa\" => Some(enums::CtpServiceProvider::Visa),\n _ => None,\n };\n\n let card_brands = get_card_brands_based_on_active_merchant_connector_account(\n state,\n profile_id,\n merchant_context.get_merchant_key_store(),\n )\n .await?;\n\n Ok(api_models::payments::SessionToken::ClickToPay(Box::new(\n api_models::payments::ClickToPaySessionResponse {\n dpa_id: click_to_pay_metadata.dpa_id,\n dpa_name: click_to_pay_metadata.dpa_name,\n locale: click_to_pay_metadata.locale,\n card_brands,\n acquirer_bin: click_to_pay_metadata.acquirer_bin,\n acquirer_merchant_id: click_to_pay_metadata.acquirer_merchant_id,\n merchant_category_code: click_to_pay_metadata.merchant_category_code,\n merchant_country_code: click_to_pay_metadata.merchant_country_code,\n transaction_amount,\n transaction_currency_code: transaction_currency,\n phone_number: customer_details.phone.clone(),\n email: customer_details.email.clone(),\n phone_country_code: customer_details.phone_country_code.clone(),\n provider,\n dpa_client_id: click_to_pay_metadata.dpa_client_id.clone(),\n },\n )))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::ServerTls", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ServerTls {\n /// Port to host the TLS secure server on\n pub port: u16,\n /// Use a different host (optional) (defaults to the host provided in [`Server`] config)\n pub host: Option,\n /// private key file path associated with TLS (path to the private key file (`pem` format))\n pub private_key: PathBuf,\n /// certificate file associated with TLS (path to the certificate file (`pem` format))\n pub certificate: PathBuf,\n}", + "after_code": "pub struct ServerTls {\n /// Port to host the TLS secure server on\n pub port: u16,\n /// Use a different host (optional) (defaults to the host provided in [`Server`] config)\n pub host: Option,\n /// private key file path associated with TLS (path to the private key file (`pem` format))\n pub private_key: PathBuf,\n /// certificate file associated with TLS (path to the certificate file (`pem` format))\n pub certificate: PathBuf,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Configs", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Configs {\n pub fn server(config: AppState) -> Scope {\n web::scope(\"/v2/configs\")\n .app_data(web::Data::new(config))\n .service(web::resource(\"/\").route(web::post().to(config_key_create)))\n .service(\n web::resource(\"/{key}\")\n .route(web::get().to(config_key_retrieve))\n .route(web::post().to(config_key_update))\n .route(web::delete().to(config_key_delete)),\n )\n }\n}", + "after_code": "impl Configs {\n pub fn server(config: AppState) -> Scope {\n web::scope(\"/v2/configs\")\n .app_data(web::Data::new(config))\n .service(web::resource(\"/\").route(web::post().to(config_key_create)))\n .service(\n web::resource(\"/{key}\")\n .route(web::get().to(config_key_retrieve))\n .route(web::post().to(config_key_update))\n .route(web::delete().to(config_key_delete)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_vault_session_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_vault_session_details(\n &mut self,\n vault_session_details: Option,\n ) {\n self.vault_session_details = vault_session_details;\n }", + "after_code": "fn set_vault_session_details(\n &mut self,\n vault_session_details: Option,\n ) {\n self.vault_session_details = vault_session_details;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::GenericLinkEnvConfig::function::default", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn default() -> Self {\n Self {\n #[allow(clippy::expect_used)]\n sdk_url: url::Url::parse(\"http://localhost:9050/HyperLoader.js\")\n .expect(\"Failed to parse default SDK URL\"),\n expiry: 900,\n ui_config: GenericLinkEnvUiConfig::default(),\n enabled_payment_methods: HashMap::default(),\n }\n }", + "after_code": "fn default() -> Self {\n Self {\n #[allow(clippy::expect_used)]\n sdk_url: url::Url::parse(\"http://localhost:9050/HyperLoader.js\")\n .expect(\"Failed to parse default SDK URL\"),\n expiry: 900,\n ui_config: GenericLinkEnvUiConfig::default(),\n enabled_payment_methods: HashMap::default(),\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::collections::{HashMap, HashSet};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/incremental_authorization_flow.rs::impl::types::RouterData<\n api::IncrementalAuthorization,\n types::PaymentsIncrementalAuthorizationData,\n types::PaymentsResponseData,\n >", + "file": "crates/router/src/core/payments/flows/incremental_authorization_flow.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "impl Feature\n for types::RouterData<\n api::IncrementalAuthorization,\n types::PaymentsIncrementalAuthorizationData,\n types::PaymentsResponseData,\n >\n{\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::IncrementalAuthorization,\n types::PaymentsIncrementalAuthorizationData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n Ok(resp)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::IncrementalAuthorization,\n types::PaymentsIncrementalAuthorizationData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n}", + "after_code": "impl Feature\n for types::RouterData<\n api::IncrementalAuthorization,\n types::PaymentsIncrementalAuthorizationData,\n types::PaymentsResponseData,\n >\n{\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::IncrementalAuthorization,\n types::PaymentsIncrementalAuthorizationData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n Ok(resp)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::IncrementalAuthorization,\n types::PaymentsIncrementalAuthorizationData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n}", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments/flows/cancel_post_capture_flow.rs::types::RouterData<\n api::PostCaptureVoid,\n types::PaymentsCancelPostCaptureData,\n types::PaymentsResponseData,\n >::function::decide_flows", + "file": "crates/router/src/core/payments/flows/cancel_post_capture_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n metrics::PAYMENT_CANCEL_COUNT.add(\n 1,\n router_env::metric_attributes!((\"connector\", connector.connector_name.to_string())),\n );\n\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PostCaptureVoid,\n types::PaymentsCancelPostCaptureData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n Ok(resp)\n }", + "after_code": "async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n metrics::PAYMENT_CANCEL_COUNT.add(\n 1,\n router_env::metric_attributes!((\"connector\", connector.connector_name.to_string())),\n );\n\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PostCaptureVoid,\n types::PaymentsCancelPostCaptureData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n Ok(resp)\n }", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n metrics::PAYMENT_CANCEL_COUNT.add(" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_token_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_token_data(&self) -> Option<&storage::PaymentTokenData> {\n self.token_data.as_ref()\n }", + "after_code": "fn get_token_data(&self) -> Option<&storage::PaymentTokenData> {\n self.token_data.as_ref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::function::deserialize_connector_list", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn deserialize_connector_list<'a, D>(deserializer: D) -> Result, D::Error>\nwhere\n D: serde::Deserializer<'a>,\n{\n use serde::de::Error;\n\n #[derive(Deserialize)]\n struct Wrapper {\n connector_list: String,\n }\n\n let wrapper = Wrapper::deserialize(deserializer)?;\n wrapper\n .connector_list\n .split(',')\n .map(|s| s.trim().parse().map_err(D::Error::custom))\n .collect()\n}", + "after_code": "fn deserialize_connector_list<'a, D>(deserializer: D) -> Result, D::Error>\nwhere\n D: serde::Deserializer<'a>,\n{\n use serde::de::Error;\n\n #[derive(Deserialize)]\n struct Wrapper {\n connector_list: String,\n }\n\n let wrapper = Wrapper::deserialize(deserializer)?;\n wrapper\n .connector_list\n .split(',')\n .map(|s| s.trim().parse().map_err(D::Error::custom))\n .collect()\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use serde::de::Error;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "use serde::Deserialize;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::Error;", + "use api_models::enums;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_token(&self) -> Option<&str> {\n todo!()\n }", + "after_code": "fn get_token(&self) -> Option<&str> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_co_badged_card_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n let co_badged_card_data =\n api_models::payment_methods::CoBadgedCardData::from(debit_routing_output);\n let card_type = debit_routing_output\n .card_type\n .clone()\n .to_string()\n .to_uppercase();\n if let Some(domain::PaymentMethodData::Card(card)) = &mut self.payment_method_data {\n card.co_badged_card_data = Some(co_badged_card_data);\n card.card_type = Some(card_type);\n logger::debug!(\"set co-badged card data in payment method data\");\n };\n }", + "after_code": "fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n let co_badged_card_data =\n api_models::payment_methods::CoBadgedCardData::from(debit_routing_output);\n let card_type = debit_routing_output\n .card_type\n .clone()\n .to_string()\n .to_uppercase();\n if let Some(domain::PaymentMethodData::Card(card)) = &mut self.payment_method_data {\n card.co_badged_card_data = Some(co_badged_card_data);\n card.card_type = Some(card_type);\n logger::debug!(\"set co-badged card data in payment method data\");\n };\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::decide_unified_connector_service_call", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn decide_unified_connector_service_call(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n customer: &Option,\n call_connector_action: CallConnectorAction,\n schedule_time: Option,\n header_payload: HeaderPayload,\n frm_suggestion: Option,\n business_profile: &domain::Profile,\n is_retry_payment: bool,\n should_retry_with_pan: bool,\n return_raw_connector_response: Option,\n merchant_connector_account_type_details: domain::MerchantConnectorAccountTypeDetails,\n mut router_data: RouterData,\n updated_customer: Option,\n tokenization_action: TokenizationAction,\n) -> RouterResult>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n record_time_taken_with(|| async {\n let (execution, updated_state) = should_call_unified_connector_service(\n state,\n merchant_context,\n &router_data,\n Some(payment_data),\n call_connector_action.clone(),\n None,\n )\n .await?;\n if matches!(execution, ExecutionPath::UnifiedConnectorService) {\n router_env::logger::info!(\n \"Executing payment through UCS gateway system - payment_id={}, attempt_id={}\",\n payment_data.get_payment_intent().id.get_string_repr(),\n payment_data.get_payment_attempt().id.get_string_repr()\n );\n if should_add_task_to_process_tracker(payment_data) {\n operation\n .to_domain()?\n .add_task_to_process_tracker(\n state,\n payment_data.get_payment_attempt(),\n false,\n schedule_time,\n )\n .await\n .map_err(|error| logger::error!(process_tracker_error=?error))\n .ok();\n }\n\n (_, *payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data.clone(),\n customer.clone(),\n merchant_context.get_merchant_account().storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n frm_suggestion,\n header_payload.clone(),\n )\n .await?;\n let lineage_ids = grpc_client::LineageIds::new(\n business_profile.merchant_id.clone(),\n business_profile.get_id().clone(),\n );\n\n // Extract merchant_order_reference_id from payment data for UCS audit trail\n let merchant_order_reference_id = payment_data.get_payment_intent().merchant_reference_id\n .clone()\n .map(|id| id.get_string_repr().to_string());\n let creds_identifier = payment_data.get_creds_identifier().map(str::to_owned);\n\n // Check for cached access token in Redis (no generation for UCS flows)\n let cached_access_token = access_token::get_cached_access_token_for_ucs(\n state,\n &connector,\n merchant_context,\n router_data.payment_method,\n payment_data.get_creds_identifier(),\n )\n .await?;\n\n // Set cached access token in router_data if available\n if let Some(access_token) = cached_access_token {\n router_data.access_token = Some(access_token);\n }\n\n router_data\n .call_unified_connector_service(\n state,\n &header_payload,\n lineage_ids,\n merchant_connector_account_type_details.clone(),\n merchant_context,\n &connector,\n ExecutionMode::Primary, //UCS is called in primary mode\n merchant_order_reference_id,\n call_connector_action,\n creds_identifier\n )\n .await?;\n\n Ok(router_data)\n } else {\n if matches!(execution, ExecutionPath::ShadowUnifiedConnectorService) {\n router_env::logger::info!(\n \"Shadow UCS mode not implemented in v2, processing through direct path - payment_id={}, attempt_id={}\",\n payment_data.get_payment_intent().id.get_string_repr(),\n payment_data.get_payment_attempt().id.get_string_repr()\n );\n } else {\n router_env::logger::info!(\n \"Processing payment through Direct gateway system - payment_id={}, attempt_id={}\",\n payment_data.get_payment_intent().id.get_string_repr(),\n payment_data.get_payment_attempt().id.get_string_repr()\n );\n }\n\n\n let session_state = if matches!(execution, ExecutionPath::ShadowUnifiedConnectorService) {\n &updated_state\n } else {\n state\n };\n\n call_connector_service(\n session_state,\n req_state,\n merchant_context,\n connector,\n operation,\n payment_data,\n customer,\n call_connector_action,\n schedule_time,\n header_payload,\n frm_suggestion,\n business_profile,\n is_retry_payment,\n should_retry_with_pan,\n return_raw_connector_response,\n merchant_connector_account_type_details,\n router_data,\n updated_customer,\n tokenization_action,\n )\n .await\n }\n })\n .await\n}", + "after_code": "pub async fn decide_unified_connector_service_call(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n customer: &Option,\n call_connector_action: CallConnectorAction,\n schedule_time: Option,\n header_payload: HeaderPayload,\n frm_suggestion: Option,\n business_profile: &domain::Profile,\n is_retry_payment: bool,\n should_retry_with_pan: bool,\n return_raw_connector_response: Option,\n merchant_connector_account_type_details: domain::MerchantConnectorAccountTypeDetails,\n mut router_data: RouterData,\n updated_customer: Option,\n tokenization_action: TokenizationAction,\n) -> RouterResult>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n record_time_taken_with(|| async {\n let (execution, updated_state) = should_call_unified_connector_service(\n state,\n merchant_context,\n &router_data,\n Some(payment_data),\n call_connector_action.clone(),\n None,\n )\n .await?;\n if matches!(execution, ExecutionPath::UnifiedConnectorService) {\n router_env::logger::info!(\n \"Executing payment through UCS gateway system - payment_id={}, attempt_id={}\",\n payment_data.get_payment_intent().id.get_string_repr(),\n payment_data.get_payment_attempt().id.get_string_repr()\n );\n if should_add_task_to_process_tracker(payment_data) {\n operation\n .to_domain()?\n .add_task_to_process_tracker(\n state,\n payment_data.get_payment_attempt(),\n false,\n schedule_time,\n )\n .await\n .map_err(|error| logger::error!(process_tracker_error=?error))\n .ok();\n }\n\n (_, *payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data.clone(),\n customer.clone(),\n merchant_context.get_merchant_account().storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n frm_suggestion,\n header_payload.clone(),\n )\n .await?;\n let lineage_ids = grpc_client::LineageIds::new(\n business_profile.merchant_id.clone(),\n business_profile.get_id().clone(),\n );\n\n // Extract merchant_order_reference_id from payment data for UCS audit trail\n let merchant_order_reference_id = payment_data.get_payment_intent().merchant_reference_id\n .clone()\n .map(|id| id.get_string_repr().to_string());\n let creds_identifier = payment_data.get_creds_identifier().map(str::to_owned);\n\n // Check for cached access token in Redis (no generation for UCS flows)\n let cached_access_token = access_token::get_cached_access_token_for_ucs(\n state,\n &connector,\n merchant_context,\n router_data.payment_method,\n payment_data.get_creds_identifier(),\n )\n .await?;\n\n // Set cached access token in router_data if available\n if let Some(access_token) = cached_access_token {\n router_data.access_token = Some(access_token);\n }\n\n router_data\n .call_unified_connector_service(\n state,\n &header_payload,\n lineage_ids,\n merchant_connector_account_type_details.clone(),\n merchant_context,\n &connector,\n ExecutionMode::Primary, //UCS is called in primary mode\n merchant_order_reference_id,\n call_connector_action,\n creds_identifier\n )\n .await?;\n\n Ok(router_data)\n } else {\n if matches!(execution, ExecutionPath::ShadowUnifiedConnectorService) {\n router_env::logger::info!(\n \"Shadow UCS mode not implemented in v2, processing through direct path - payment_id={}, attempt_id={}\",\n payment_data.get_payment_intent().id.get_string_repr(),\n payment_data.get_payment_attempt().id.get_string_repr()\n );\n } else {\n router_env::logger::info!(\n \"Processing payment through Direct gateway system - payment_id={}, attempt_id={}\",\n payment_data.get_payment_intent().id.get_string_repr(),\n payment_data.get_payment_attempt().id.get_string_repr()\n );\n }\n\n\n let session_state = if matches!(execution, ExecutionPath::ShadowUnifiedConnectorService) {\n &updated_state\n } else {\n state\n };\n\n call_connector_service(\n session_state,\n req_state,\n merchant_context,\n connector,\n operation,\n payment_data,\n customer,\n call_connector_action,\n schedule_time,\n header_payload,\n frm_suggestion,\n business_profile,\n is_retry_payment,\n should_retry_with_pan,\n return_raw_connector_response,\n merchant_connector_account_type_details,\n router_data,\n updated_customer,\n tokenization_action,\n )\n .await\n }\n })\n .await\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use external_services::grpc_client;" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use external_services::grpc_client;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_force_sync", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_force_sync(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_force_sync(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PazeWallet::function::decrypt_wallet_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn decrypt_wallet_token(\n &self,\n wallet_flow: &DecideWalletFlow,\n payment_data: &D,\n ) -> CustomResult {\n let paze_payment_processing_details = wallet_flow\n .get_paze_payment_processing_details()\n .get_required_value(\"Paze payment processing details\")\n .attach_printable(\n \"Paze payment processing details not found in Paze decryption flow\",\n )?;\n\n let paze_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_paze_wallet_data())\n .get_required_value(\"Paze wallet token\").attach_printable(\n \"Paze wallet data not found in the payment method data during the Paze decryption flow\",\n )?;\n\n let paze_data = decrypt_paze_token(\n paze_wallet_data.clone(),\n paze_payment_processing_details.paze_private_key.clone(),\n paze_payment_processing_details\n .paze_private_key_passphrase\n .clone(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to decrypt paze token\")?;\n\n let paze_decrypted_data = paze_data\n .parse_value::(\n \"PazeDecryptedData\",\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to parse PazeDecryptedData\")?;\n Ok(PaymentMethodToken::PazeDecrypt(Box::new(\n paze_decrypted_data,\n )))\n }", + "after_code": "async fn decrypt_wallet_token(\n &self,\n wallet_flow: &DecideWalletFlow,\n payment_data: &D,\n ) -> CustomResult {\n let paze_payment_processing_details = wallet_flow\n .get_paze_payment_processing_details()\n .get_required_value(\"Paze payment processing details\")\n .attach_printable(\n \"Paze payment processing details not found in Paze decryption flow\",\n )?;\n\n let paze_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_paze_wallet_data())\n .get_required_value(\"Paze wallet token\").attach_printable(\n \"Paze wallet data not found in the payment method data during the Paze decryption flow\",\n )?;\n\n let paze_data = decrypt_paze_token(\n paze_wallet_data.clone(),\n paze_payment_processing_details.paze_private_key.clone(),\n paze_payment_processing_details\n .paze_private_key_passphrase\n .clone(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to decrypt paze token\")?;\n\n let paze_decrypted_data = paze_data\n .parse_value::(\n \"PazeDecryptedData\",\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to parse PazeDecryptedData\")?;\n Ok(PaymentMethodToken::PazeDecrypt(Box::new(\n paze_decrypted_data,\n )))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use helpers::{decrypt_paze_token, ApplePayData};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use helpers::{decrypt_paze_token, ApplePayData};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::is_preprocessing_required_for_wallets", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn is_preprocessing_required_for_wallets(connector_name: String) -> bool {\n connector_name == *\"trustpay\" || connector_name == *\"payme\"\n}", + "after_code": "pub fn is_preprocessing_required_for_wallets(connector_name: String) -> bool {\n connector_name == *\"trustpay\" || connector_name == *\"payme\"\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::proxy_for_call_connector_service", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": true, + "before_code": "pub async fn proxy_for_call_connector_service(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n business_profile: &domain::Profile,\n return_raw_connector_response: Option,\n) -> RouterResult>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n let stime_connector = Instant::now();\n\n let merchant_connector_account =\n domain::MerchantConnectorAccountTypeDetails::MerchantConnectorAccount(Box::new(\n helpers::get_merchant_connector_account_v2(\n state,\n merchant_context.get_merchant_key_store(),\n connector.merchant_connector_id.as_ref(),\n )\n .await?,\n ));\n operation\n .to_domain()?\n .populate_payment_data(\n state,\n payment_data,\n merchant_context,\n business_profile,\n &connector,\n )\n .await?;\n\n let mut router_data = payment_data\n .construct_router_data(\n state,\n connector.connector.id(),\n merchant_context,\n &None,\n &merchant_connector_account,\n None,\n Some(header_payload.clone()),\n )\n .await?;\n\n let add_access_token_result = router_data\n .add_access_token(\n state,\n &connector,\n merchant_context,\n payment_data.get_creds_identifier(),\n )\n .await?;\n\n router_data = router_data.add_session_token(state, &connector).await?;\n\n let mut should_continue_further = access_token::update_router_data_with_access_token_result(\n &add_access_token_result,\n &mut router_data,\n &call_connector_action,\n );\n\n let (connector_request, should_continue_further) = if should_continue_further {\n router_data\n .build_flow_specific_connector_request(state, &connector, call_connector_action.clone())\n .await?\n } else {\n (None, false)\n };\n\n (_, *payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data.clone(),\n None,\n merchant_context.get_merchant_account().storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n None,\n header_payload.clone(),\n )\n .await?;\n\n let router_data = if should_continue_further {\n router_data\n .decide_flows(\n state,\n &connector,\n call_connector_action,\n connector_request,\n business_profile,\n header_payload.clone(),\n return_raw_connector_response,\n )\n .await\n } else {\n Ok(router_data)\n }?;\n\n let etime_connector = Instant::now();\n let duration_connector = etime_connector.saturating_duration_since(stime_connector);\n tracing::info!(duration = format!(\"Duration taken: {}\", duration_connector.as_millis()));\n\n Ok(router_data)\n}", + "after_code": "pub async fn proxy_for_call_connector_service(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n business_profile: &domain::Profile,\n return_raw_connector_response: Option,\n) -> RouterResult>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n let stime_connector = Instant::now();\n\n let merchant_connector_account =\n domain::MerchantConnectorAccountTypeDetails::MerchantConnectorAccount(Box::new(\n helpers::get_merchant_connector_account_v2(\n state,\n merchant_context.get_merchant_key_store(),\n connector.merchant_connector_id.as_ref(),\n )\n .await?,\n ));\n operation\n .to_domain()?\n .populate_payment_data(\n state,\n payment_data,\n merchant_context,\n business_profile,\n &connector,\n )\n .await?;\n\n let mut router_data = payment_data\n .construct_router_data(\n state,\n connector.connector.id(),\n merchant_context,\n &None,\n &merchant_connector_account,\n None,\n Some(header_payload.clone()),\n )\n .await?;\n\n let add_access_token_result = router_data\n .add_access_token(\n state,\n &connector,\n merchant_context,\n payment_data.get_creds_identifier(),\n )\n .await?;\n\n router_data = router_data.add_session_token(state, &connector).await?;\n\n let mut should_continue_further = access_token::update_router_data_with_access_token_result(\n &add_access_token_result,\n &mut router_data,\n &call_connector_action,\n );\n\n let (connector_request, should_continue_further) = if should_continue_further {\n router_data\n .build_flow_specific_connector_request(state, &connector, call_connector_action.clone())\n .await?\n } else {\n (None, false)\n };\n\n (_, *payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data.clone(),\n None,\n merchant_context.get_merchant_account().storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n None,\n header_payload.clone(),\n )\n .await?;\n\n let router_data = if should_continue_further {\n router_data\n .decide_flows(\n state,\n &connector,\n call_connector_action,\n connector_request,\n business_profile,\n header_payload.clone(),\n return_raw_connector_response,\n None,\n )\n .await\n } else {\n Ok(router_data)\n }?;\n\n let etime_connector = Instant::now();\n let duration_connector = etime_connector.saturating_duration_since(stime_connector);\n tracing::info!(duration = format!(\"Duration taken: {}\", duration_connector.as_millis()));\n\n Ok(router_data)\n}", + "diff_span": { + "before": "", + "after": " header_payload.clone(),\n return_raw_connector_response,\n None,\n )\n .await" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use router_env::{instrument, tracing};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use router_env::{instrument, tracing};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/complete_authorize_flow.rs::types::RouterData<\n api::CompleteAuthorize,\n types::CompleteAuthorizeData,\n types::PaymentsResponseData,\n >::function::decide_flows", + "file": "crates/router/src/core/payments/flows/complete_authorize_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "async fn decide_flows<'a>(\n mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n business_profile: &domain::Profile,\n header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::CompleteAuthorize,\n types::CompleteAuthorizeData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let mut complete_authorize_router_data = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action.clone(),\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n match complete_authorize_router_data.response.clone() {\n Err(_) => Ok(complete_authorize_router_data),\n Ok(complete_authorize_response) => {\n // Check if the Capture API should be called based on the connector and other parameters\n if super::should_initiate_capture_flow(\n &connector.connector_name,\n self.request.customer_acceptance,\n self.request.capture_method,\n self.request.setup_future_usage,\n complete_authorize_router_data.status,\n ) {\n complete_authorize_router_data = Box::pin(process_capture_flow(\n complete_authorize_router_data,\n complete_authorize_response,\n state,\n connector,\n call_connector_action.clone(),\n business_profile,\n header_payload,\n ))\n .await?;\n }\n Ok(complete_authorize_router_data)\n }\n }\n }", + "after_code": "async fn decide_flows<'a>(\n mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n business_profile: &domain::Profile,\n header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::CompleteAuthorize,\n types::CompleteAuthorizeData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let mut complete_authorize_router_data = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action.clone(),\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n match complete_authorize_router_data.response.clone() {\n Err(_) => Ok(complete_authorize_router_data),\n Ok(complete_authorize_response) => {\n // Check if the Capture API should be called based on the connector and other parameters\n if super::should_initiate_capture_flow(\n &connector.connector_name,\n self.request.customer_acceptance,\n self.request.capture_method,\n self.request.setup_future_usage,\n complete_authorize_router_data.status,\n ) {\n complete_authorize_router_data = Box::pin(process_capture_flow(\n complete_authorize_router_data,\n complete_authorize_response,\n state,\n connector,\n call_connector_action.clone(),\n business_profile,\n header_payload,\n ))\n .await?;\n }\n Ok(complete_authorize_router_data)\n }\n }\n }", + "diff_span": { + "before": "", + "after": " header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/configs/settings.rs::struct::DebitRoutingConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct DebitRoutingConfig {\n #[serde(deserialize_with = \"deserialize_hashmap\")]\n pub connector_supported_debit_networks: HashMap>,\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub supported_currencies: HashSet,\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub supported_connectors: HashSet,\n}", + "after_code": "pub struct DebitRoutingConfig {\n #[serde(deserialize_with = \"deserialize_hashmap\")]\n pub connector_supported_debit_networks: HashMap>,\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub supported_currencies: HashSet,\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub supported_connectors: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use super::deserialize_hashset;", + "use super::deserialize_hashmap;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use super::deserialize_hashmap;", + "use api_models::enums;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Refunds", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Refunds;", + "after_code": "pub struct Refunds;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::ApplePayCertificatesMigration", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ApplePayCertificatesMigration;", + "after_code": "pub struct ApplePayCertificatesMigration;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_connector_response_reference_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_response_reference_id(&mut self, _reference_id: Option) {\n todo!()\n }", + "after_code": "fn set_connector_response_reference_id(&mut self, _reference_id: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_payment_method_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_token(&self) -> Option<&PaymentMethodToken> {\n todo!()\n }", + "after_code": "fn get_payment_method_token(&self) -> Option<&PaymentMethodToken> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::hashmap_deserialization_test::function::test_payment_method_deserializer_error", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn test_payment_method_deserializer_error() {\n use diesel_models::enums::{PaymentMethod, PaymentMethodType};\n\n let input_map: HashMap = HashMap::from([\n (\"unknown\".to_string(), \"ach,bacs\".to_string()),\n (\"wallet\".to_string(), \"paypal,unknown\".to_string()),\n ]);\n let deserializer: MapDeserializer<\n '_,\n std::collections::hash_map::IntoIter,\n ValueError,\n > = input_map.into_deserializer();\n let result = deserialize_hashmap::<'_, _, PaymentMethod, PaymentMethodType>(deserializer);\n\n assert!(result.is_err());\n }", + "after_code": "fn test_payment_method_deserializer_error() {\n use diesel_models::enums::{PaymentMethod, PaymentMethodType};\n\n let input_map: HashMap = HashMap::from([\n (\"unknown\".to_string(), \"ach,bacs\".to_string()),\n (\"wallet\".to_string(), \"paypal,unknown\".to_string()),\n ]);\n let deserializer: MapDeserializer<\n '_,\n std::collections::hash_map::IntoIter,\n ValueError,\n > = input_map.into_deserializer();\n let result = deserialize_hashmap::<'_, _, PaymentMethod, PaymentMethodType>(deserializer);\n\n assert!(result.is_err());\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use super::deserialize_hashmap;", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use serde::de::Error;", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "use serde::Deserialize;", + "use super::deserialize_hashmap;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use serde::de::Error;", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_pre_routing_result", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_pre_routing_result(\n &self,\n ) -> Option> {\n None\n }", + "after_code": "fn get_pre_routing_result(\n &self,\n ) -> Option> {\n None\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_sessions_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_sessions_token(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_sessions_token(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::ActionTypesBuilder::function::with_mandate_flow", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn with_mandate_flow(\n mut self,\n is_mandate_flow: bool,\n connector_mandate_details: Option<\n hyperswitch_domain_models::mandates::PaymentsMandateReference,\n >,\n ) -> Self {\n if is_mandate_flow {\n self.action_types.extend(\n connector_mandate_details\n .map(|details| ActionType::ConnectorMandate(details.to_owned())),\n );\n }\n self\n }", + "after_code": "pub fn with_mandate_flow(\n mut self,\n is_mandate_flow: bool,\n connector_mandate_details: Option<\n hyperswitch_domain_models::mandates::PaymentsMandateReference,\n >,\n ) -> Self {\n if is_mandate_flow {\n self.action_types.extend(\n connector_mandate_details\n .map(|details| ActionType::ConnectorMandate(details.to_owned())),\n );\n }\n self\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::enum::PaymentMethodTypeTokenFilter", + "file": "crates/router/src/configs/settings.rs", + "kind": "enum_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub enum PaymentMethodTypeTokenFilter {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n EnableOnly(HashSet),\n #[serde(deserialize_with = \"deserialize_hashset\")]\n DisableOnly(HashSet),\n #[default]\n AllAccepted,\n}", + "after_code": "pub enum PaymentMethodTypeTokenFilter {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n EnableOnly(HashSet),\n #[serde(deserialize_with = \"deserialize_hashset\")]\n DisableOnly(HashSet),\n #[default]\n AllAccepted,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::PaymentMethod;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use super::deserialize_hashset;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use super::deserialize_hashset;", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::is_payment_flow_allowed_for_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn is_payment_flow_allowed_for_connector(\n mandate_flow_enabled: Option,\n payment_flow: Option,\n) -> bool {\n if payment_flow.is_none() {\n true\n } else {\n matches!(payment_flow, Some(PaymentFlow::Mandates))\n && matches!(\n mandate_flow_enabled,\n Some(storage_enums::FutureUsage::OffSession)\n )\n }\n}", + "after_code": "fn is_payment_flow_allowed_for_connector(\n mandate_flow_enabled: Option,\n payment_flow: Option,\n) -> bool {\n if payment_flow.is_none() {\n true\n } else {\n matches!(payment_flow, Some(PaymentFlow::Mandates))\n && matches!(\n mandate_flow_enabled,\n Some(storage_enums::FutureUsage::OffSession)\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/psync_flow.rs::PaymentData::function::construct_router_data", + "file": "crates/router/src/core/payments/flows/psync_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn construct_router_data<'a>(\n &self,\n state: &SessionState,\n connector_id: &str,\n merchant_context: &domain::MerchantContext,\n customer: &Option,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n merchant_recipient_data: Option,\n header_payload: Option,\n _payment_method: Option,\n _payment_method_type: Option,\n ) -> RouterResult<\n types::RouterData,\n > {\n Box::pin(transformers::construct_payment_router_data::<\n api::PSync,\n types::PaymentsSyncData,\n >(\n state,\n self.clone(),\n connector_id,\n merchant_context,\n customer,\n merchant_connector_account,\n merchant_recipient_data,\n header_payload,\n None,\n None,\n ))\n .await\n }", + "after_code": "async fn construct_router_data<'a>(\n &self,\n state: &SessionState,\n connector_id: &str,\n merchant_context: &domain::MerchantContext,\n customer: &Option,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n merchant_recipient_data: Option,\n header_payload: Option,\n _payment_method: Option,\n _payment_method_type: Option,\n ) -> RouterResult<\n types::RouterData,\n > {\n Box::pin(transformers::construct_payment_router_data::<\n api::PSync,\n types::PaymentsSyncData,\n >(\n state,\n self.clone(),\n connector_id,\n merchant_context,\n customer,\n merchant_connector_account,\n merchant_recipient_data,\n header_payload,\n None,\n None,\n ))\n .await\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n};" + ], + "after_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::{\n api::gateway,\n unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n },\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::ConnectorCustomer", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ConnectorCustomer {\n #[cfg(feature = \"payouts\")]\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub payout_connector_list: HashSet,\n}", + "after_code": "pub struct ConnectorCustomer {\n #[cfg(feature = \"payouts\")]\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub payout_connector_list: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use super::deserialize_hashset;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use api_models::enums;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::AppState", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl AppState {\n /// # Panics\n ///\n /// Panics if Store can't be created or JWE decryption fails\n pub async fn with_storage(\n conf: settings::Settings,\n storage_impl: StorageImpl,\n shut_down_signal: oneshot::Sender<()>,\n api_client: Box,\n ) -> Self {\n #[allow(clippy::expect_used)]\n let secret_management_client = conf\n .secrets_management\n .get_secret_management_client()\n .await\n .expect(\"Failed to create secret management client\");\n\n let conf = Box::pin(secrets_transformers::fetch_raw_secrets(\n conf,\n &*secret_management_client,\n ))\n .await;\n\n #[allow(clippy::expect_used)]\n let encryption_client = conf\n .encryption_management\n .get_encryption_management_client()\n .await\n .expect(\"Failed to create encryption client\");\n\n Box::pin(async move {\n let testable = storage_impl == StorageImpl::PostgresqlTest;\n #[allow(clippy::expect_used)]\n let event_handler = conf\n .events\n .get_event_handler()\n .await\n .expect(\"Failed to create event handler\");\n\n #[allow(clippy::expect_used)]\n #[cfg(feature = \"olap\")]\n let opensearch_client = conf\n .opensearch\n .get_opensearch_client()\n .await\n .expect(\"Failed to initialize OpenSearch client.\")\n .map(Arc::new);\n\n #[allow(clippy::expect_used)]\n let cache_store = get_cache_store(&conf.clone(), shut_down_signal, testable)\n .await\n .expect(\"Failed to create store\");\n let global_store: Box = Self::get_store_interface(\n &storage_impl,\n &event_handler,\n &conf,\n &conf.multitenancy.global_tenant,\n Arc::clone(&cache_store),\n testable,\n )\n .await\n .get_global_storage_interface();\n #[cfg(feature = \"olap\")]\n let pools = conf\n .multitenancy\n .tenants\n .get_pools_map(conf.analytics.get_inner())\n .await;\n let stores = conf\n .multitenancy\n .tenants\n .get_store_interface_map(&storage_impl, &conf, Arc::clone(&cache_store), testable)\n .await;\n let accounts_store = conf\n .multitenancy\n .tenants\n .get_accounts_store_interface_map(\n &storage_impl,\n &conf,\n Arc::clone(&cache_store),\n testable,\n )\n .await;\n\n #[cfg(feature = \"email\")]\n let email_client = Arc::new(create_email_client(&conf).await);\n\n let file_storage_client = conf.file_storage.get_file_storage_client().await;\n let theme_storage_client = conf.theme.storage.get_file_storage_client().await;\n let crm_client = conf.crm.get_crm_client().await;\n\n let grpc_client = conf.grpc_client.get_grpc_client_interface().await;\n let infra_component_values = Self::process_env_mappings(conf.infra_values.clone());\n let enhancement = conf.enhancement.clone();\n let superposition_service = if conf.superposition.get_inner().enabled {\n match SuperpositionClient::new(conf.superposition.get_inner().clone()).await {\n Ok(client) => {\n router_env::logger::info!(\"Superposition client initialized successfully\");\n Some(Arc::new(client))\n }\n Err(err) => {\n router_env::logger::warn!(\n \"Failed to initialize superposition client: {:?}. Continuing without superposition support.\",\n err\n );\n None\n }\n }\n } else {\n None\n };\n Self {\n flow_name: String::from(\"default\"),\n stores,\n global_store,\n accounts_store,\n conf: Arc::new(conf),\n #[cfg(feature = \"email\")]\n email_client,\n api_client,\n event_handler,\n #[cfg(feature = \"olap\")]\n pools,\n #[cfg(feature = \"olap\")]\n opensearch_client,\n request_id: None,\n file_storage_client,\n encryption_client,\n grpc_client,\n theme_storage_client,\n crm_client,\n infra_components: infra_component_values,\n enhancement,\n superposition_service,\n }\n })\n .await\n }\n\n /// # Panics\n ///\n /// Panics if Failed to create store\n pub async fn get_store_interface(\n storage_impl: &StorageImpl,\n event_handler: &EventsHandler,\n conf: &Settings,\n tenant: &dyn TenantConfig,\n cache_store: Arc,\n testable: bool,\n ) -> Box {\n match storage_impl {\n StorageImpl::Postgresql | StorageImpl::PostgresqlTest => match event_handler {\n EventsHandler::Kafka(kafka_client) => Box::new(\n KafkaStore::new(\n #[allow(clippy::expect_used)]\n get_store(&conf.clone(), tenant, Arc::clone(&cache_store), testable)\n .await\n .expect(\"Failed to create store\"),\n kafka_client.clone(),\n TenantID(tenant.get_tenant_id().get_string_repr().to_owned()),\n tenant,\n )\n .await,\n ),\n EventsHandler::Logs(_) => Box::new(\n #[allow(clippy::expect_used)]\n get_store(conf, tenant, Arc::clone(&cache_store), testable)\n .await\n .expect(\"Failed to create store\"),\n ),\n },\n #[allow(clippy::expect_used)]\n StorageImpl::Mock => Box::new(\n MockDb::new(&conf.redis)\n .await\n .expect(\"Failed to create mock store\"),\n ),\n }\n }\n\n pub async fn new(\n conf: settings::Settings,\n shut_down_signal: oneshot::Sender<()>,\n api_client: Box,\n ) -> Self {\n Box::pin(Self::with_storage(\n conf,\n StorageImpl::Postgresql,\n shut_down_signal,\n api_client,\n ))\n .await\n }\n\n pub fn get_session_state(\n self: Arc,\n tenant: &id_type::TenantId,\n locale: Option,\n err: F,\n ) -> Result\n where\n F: FnOnce() -> E + Copy,\n {\n let tenant_conf = self.conf.multitenancy.get_tenant(tenant).ok_or_else(err)?;\n let mut event_handler = self.event_handler.clone();\n event_handler.add_tenant(tenant_conf);\n let store = self.stores.get(tenant).ok_or_else(err)?.clone();\n Ok(SessionState {\n store,\n global_store: self.global_store.clone(),\n accounts_store: self.accounts_store.get(tenant).ok_or_else(err)?.clone(),\n conf: Arc::clone(&self.conf),\n api_client: self.api_client.clone(),\n event_handler,\n #[cfg(feature = \"olap\")]\n pool: self.pools.get(tenant).ok_or_else(err)?.clone(),\n file_storage_client: self.file_storage_client.clone(),\n request_id: self.request_id,\n base_url: tenant_conf.base_url.clone(),\n tenant: tenant_conf.clone(),\n #[cfg(feature = \"email\")]\n email_client: Arc::clone(&self.email_client),\n #[cfg(feature = \"olap\")]\n opensearch_client: self.opensearch_client.clone(),\n grpc_client: Arc::clone(&self.grpc_client),\n theme_storage_client: self.theme_storage_client.clone(),\n locale: locale.unwrap_or(common_utils::consts::DEFAULT_LOCALE.to_string()),\n crm_client: self.crm_client.clone(),\n infra_components: self.infra_components.clone(),\n enhancement: self.enhancement.clone(),\n superposition_service: self.superposition_service.clone(),\n })\n }\n\n pub fn process_env_mappings(\n mappings: Option>,\n ) -> Option {\n let result: HashMap = mappings?\n .into_iter()\n .filter_map(|(key, env_var)| std::env::var(&env_var).ok().map(|value| (key, value)))\n .collect();\n\n if result.is_empty() {\n None\n } else {\n Some(serde_json::Value::Object(\n result\n .into_iter()\n .map(|(k, v)| (k, serde_json::Value::String(v)))\n .collect(),\n ))\n }\n }\n}", + "after_code": "impl AppState {\n /// # Panics\n ///\n /// Panics if Store can't be created or JWE decryption fails\n pub async fn with_storage(\n conf: settings::Settings,\n storage_impl: StorageImpl,\n shut_down_signal: oneshot::Sender<()>,\n api_client: Box,\n ) -> Self {\n #[allow(clippy::expect_used)]\n let secret_management_client = conf\n .secrets_management\n .get_secret_management_client()\n .await\n .expect(\"Failed to create secret management client\");\n\n let conf = Box::pin(secrets_transformers::fetch_raw_secrets(\n conf,\n &*secret_management_client,\n ))\n .await;\n\n #[allow(clippy::expect_used)]\n let encryption_client = conf\n .encryption_management\n .get_encryption_management_client()\n .await\n .expect(\"Failed to create encryption client\");\n\n Box::pin(async move {\n let testable = storage_impl == StorageImpl::PostgresqlTest;\n #[allow(clippy::expect_used)]\n let event_handler = conf\n .events\n .get_event_handler()\n .await\n .expect(\"Failed to create event handler\");\n\n #[allow(clippy::expect_used)]\n #[cfg(feature = \"olap\")]\n let opensearch_client = conf\n .opensearch\n .get_opensearch_client()\n .await\n .expect(\"Failed to initialize OpenSearch client.\")\n .map(Arc::new);\n\n #[allow(clippy::expect_used)]\n let cache_store = get_cache_store(&conf.clone(), shut_down_signal, testable)\n .await\n .expect(\"Failed to create store\");\n let global_store: Box = Self::get_store_interface(\n &storage_impl,\n &event_handler,\n &conf,\n &conf.multitenancy.global_tenant,\n Arc::clone(&cache_store),\n testable,\n )\n .await\n .get_global_storage_interface();\n #[cfg(feature = \"olap\")]\n let pools = conf\n .multitenancy\n .tenants\n .get_pools_map(conf.analytics.get_inner())\n .await;\n let stores = conf\n .multitenancy\n .tenants\n .get_store_interface_map(&storage_impl, &conf, Arc::clone(&cache_store), testable)\n .await;\n let accounts_store = conf\n .multitenancy\n .tenants\n .get_accounts_store_interface_map(\n &storage_impl,\n &conf,\n Arc::clone(&cache_store),\n testable,\n )\n .await;\n\n #[cfg(feature = \"email\")]\n let email_client = Arc::new(create_email_client(&conf).await);\n\n let file_storage_client = conf.file_storage.get_file_storage_client().await;\n let theme_storage_client = conf.theme.storage.get_file_storage_client().await;\n let crm_client = conf.crm.get_crm_client().await;\n\n let grpc_client = conf.grpc_client.get_grpc_client_interface().await;\n let infra_component_values = Self::process_env_mappings(conf.infra_values.clone());\n let enhancement = conf.enhancement.clone();\n let superposition_service = if conf.superposition.get_inner().enabled {\n match SuperpositionClient::new(conf.superposition.get_inner().clone()).await {\n Ok(client) => {\n router_env::logger::info!(\"Superposition client initialized successfully\");\n Some(Arc::new(client))\n }\n Err(err) => {\n router_env::logger::warn!(\n \"Failed to initialize superposition client: {:?}. Continuing without superposition support.\",\n err\n );\n None\n }\n }\n } else {\n None\n };\n Self {\n flow_name: String::from(\"default\"),\n stores,\n global_store,\n accounts_store,\n conf: Arc::new(conf),\n #[cfg(feature = \"email\")]\n email_client,\n api_client,\n event_handler,\n #[cfg(feature = \"olap\")]\n pools,\n #[cfg(feature = \"olap\")]\n opensearch_client,\n request_id: None,\n file_storage_client,\n encryption_client,\n grpc_client,\n theme_storage_client,\n crm_client,\n infra_components: infra_component_values,\n enhancement,\n superposition_service,\n }\n })\n .await\n }\n\n /// # Panics\n ///\n /// Panics if Failed to create store\n pub async fn get_store_interface(\n storage_impl: &StorageImpl,\n event_handler: &EventsHandler,\n conf: &Settings,\n tenant: &dyn TenantConfig,\n cache_store: Arc,\n testable: bool,\n ) -> Box {\n match storage_impl {\n StorageImpl::Postgresql | StorageImpl::PostgresqlTest => match event_handler {\n EventsHandler::Kafka(kafka_client) => Box::new(\n KafkaStore::new(\n #[allow(clippy::expect_used)]\n get_store(&conf.clone(), tenant, Arc::clone(&cache_store), testable)\n .await\n .expect(\"Failed to create store\"),\n kafka_client.clone(),\n TenantID(tenant.get_tenant_id().get_string_repr().to_owned()),\n tenant,\n )\n .await,\n ),\n EventsHandler::Logs(_) => Box::new(\n #[allow(clippy::expect_used)]\n get_store(conf, tenant, Arc::clone(&cache_store), testable)\n .await\n .expect(\"Failed to create store\"),\n ),\n },\n #[allow(clippy::expect_used)]\n StorageImpl::Mock => Box::new(\n MockDb::new(&conf.redis)\n .await\n .expect(\"Failed to create mock store\"),\n ),\n }\n }\n\n pub async fn new(\n conf: settings::Settings,\n shut_down_signal: oneshot::Sender<()>,\n api_client: Box,\n ) -> Self {\n Box::pin(Self::with_storage(\n conf,\n StorageImpl::Postgresql,\n shut_down_signal,\n api_client,\n ))\n .await\n }\n\n pub fn get_session_state(\n self: Arc,\n tenant: &id_type::TenantId,\n locale: Option,\n err: F,\n ) -> Result\n where\n F: FnOnce() -> E + Copy,\n {\n let tenant_conf = self.conf.multitenancy.get_tenant(tenant).ok_or_else(err)?;\n let mut event_handler = self.event_handler.clone();\n event_handler.add_tenant(tenant_conf);\n let store = self.stores.get(tenant).ok_or_else(err)?.clone();\n Ok(SessionState {\n store,\n global_store: self.global_store.clone(),\n accounts_store: self.accounts_store.get(tenant).ok_or_else(err)?.clone(),\n conf: Arc::clone(&self.conf),\n api_client: self.api_client.clone(),\n event_handler,\n #[cfg(feature = \"olap\")]\n pool: self.pools.get(tenant).ok_or_else(err)?.clone(),\n file_storage_client: self.file_storage_client.clone(),\n request_id: self.request_id,\n base_url: tenant_conf.base_url.clone(),\n tenant: tenant_conf.clone(),\n #[cfg(feature = \"email\")]\n email_client: Arc::clone(&self.email_client),\n #[cfg(feature = \"olap\")]\n opensearch_client: self.opensearch_client.clone(),\n grpc_client: Arc::clone(&self.grpc_client),\n theme_storage_client: self.theme_storage_client.clone(),\n locale: locale.unwrap_or(common_utils::consts::DEFAULT_LOCALE.to_string()),\n crm_client: self.crm_client.clone(),\n infra_components: self.infra_components.clone(),\n enhancement: self.enhancement.clone(),\n superposition_service: self.superposition_service.clone(),\n })\n }\n\n pub fn process_env_mappings(\n mappings: Option>,\n ) -> Option {\n let result: HashMap = mappings?\n .into_iter()\n .filter_map(|(key, env_var)| std::env::var(&env_var).ok().map(|value| (key, value)))\n .collect();\n\n if result.is_empty() {\n None\n } else {\n Some(serde_json::Value::Object(\n result\n .into_iter()\n .map(|(k, v)| (k, serde_json::Value::String(v)))\n .collect(),\n ))\n }\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::dummy_connector::*;", + "use super::payout_link::*;", + "use tokio::sync::oneshot;", + "use super::payouts::*;", + "use router_env::logger;", + "use super::admin::*;", + "use super::recovery_webhooks::*;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::webhooks::*;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use self::settings::Tenant;", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use super::ephemeral_key::*;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use super::dummy_connector::*;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use super::payout_link::*;", + "use tokio::sync::oneshot;", + "use super::payouts::*;", + "use router_env::logger;", + "use super::admin::*;", + "use super::recovery_webhooks::*;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::webhooks::*;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use self::settings::Tenant;", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use super::ephemeral_key::*;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::NotAvailableFlows", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct NotAvailableFlows {\n pub capture_method: Option,\n}", + "after_code": "pub struct NotAvailableFlows {\n pub capture_method: Option,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use api_models::enums;", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use api_models::enums;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_merchant_connector_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_merchant_connector_id_in_attempt(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_merchant_connector_id_in_attempt(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_amount", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_amount(&self) -> api::Amount {\n todo!()\n }", + "after_code": "fn get_amount(&self) -> api::Amount {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::mod::hashmap_deserialization_test", + "file": "crates/router/src/configs/settings.rs", + "kind": "mod_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "mod hashmap_deserialization_test {\n #![allow(clippy::unwrap_used)]\n use std::collections::{HashMap, HashSet};\n\n use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };\n\n use super::deserialize_hashmap;\n\n #[test]\n fn test_payment_method_and_payment_method_types() {\n use diesel_models::enums::{PaymentMethod, PaymentMethodType};\n\n let input_map: HashMap = HashMap::from([\n (\"bank_transfer\".to_string(), \"ach,bacs\".to_string()),\n (\"wallet\".to_string(), \"paypal,venmo\".to_string()),\n ]);\n let deserializer: MapDeserializer<\n '_,\n std::collections::hash_map::IntoIter,\n ValueError,\n > = input_map.into_deserializer();\n let result = deserialize_hashmap::<'_, _, PaymentMethod, PaymentMethodType>(deserializer);\n let expected_result = HashMap::from([\n (\n PaymentMethod::BankTransfer,\n HashSet::from([PaymentMethodType::Ach, PaymentMethodType::Bacs]),\n ),\n (\n PaymentMethod::Wallet,\n HashSet::from([PaymentMethodType::Paypal, PaymentMethodType::Venmo]),\n ),\n ]);\n\n assert!(result.is_ok());\n assert_eq!(result.unwrap(), expected_result);\n }\n\n #[test]\n fn test_payment_method_and_payment_method_types_with_spaces() {\n use diesel_models::enums::{PaymentMethod, PaymentMethodType};\n\n let input_map: HashMap = HashMap::from([\n (\" bank_transfer \".to_string(), \" ach , bacs \".to_string()),\n (\"wallet \".to_string(), \" paypal , pix , venmo \".to_string()),\n ]);\n let deserializer: MapDeserializer<\n '_,\n std::collections::hash_map::IntoIter,\n ValueError,\n > = input_map.into_deserializer();\n let result = deserialize_hashmap::<'_, _, PaymentMethod, PaymentMethodType>(deserializer);\n let expected_result = HashMap::from([\n (\n PaymentMethod::BankTransfer,\n HashSet::from([PaymentMethodType::Ach, PaymentMethodType::Bacs]),\n ),\n (\n PaymentMethod::Wallet,\n HashSet::from([\n PaymentMethodType::Paypal,\n PaymentMethodType::Pix,\n PaymentMethodType::Venmo,\n ]),\n ),\n ]);\n\n assert!(result.is_ok());\n assert_eq!(result.unwrap(), expected_result);\n }\n\n #[test]\n fn test_payment_method_deserializer_error() {\n use diesel_models::enums::{PaymentMethod, PaymentMethodType};\n\n let input_map: HashMap = HashMap::from([\n (\"unknown\".to_string(), \"ach,bacs\".to_string()),\n (\"wallet\".to_string(), \"paypal,unknown\".to_string()),\n ]);\n let deserializer: MapDeserializer<\n '_,\n std::collections::hash_map::IntoIter,\n ValueError,\n > = input_map.into_deserializer();\n let result = deserialize_hashmap::<'_, _, PaymentMethod, PaymentMethodType>(deserializer);\n\n assert!(result.is_err());\n }\n}", + "after_code": "mod hashmap_deserialization_test {\n #![allow(clippy::unwrap_used)]\n use std::collections::{HashMap, HashSet};\n\n use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };\n\n use super::deserialize_hashmap;\n\n #[test]\n fn test_payment_method_and_payment_method_types() {\n use diesel_models::enums::{PaymentMethod, PaymentMethodType};\n\n let input_map: HashMap = HashMap::from([\n (\"bank_transfer\".to_string(), \"ach,bacs\".to_string()),\n (\"wallet\".to_string(), \"paypal,venmo\".to_string()),\n ]);\n let deserializer: MapDeserializer<\n '_,\n std::collections::hash_map::IntoIter,\n ValueError,\n > = input_map.into_deserializer();\n let result = deserialize_hashmap::<'_, _, PaymentMethod, PaymentMethodType>(deserializer);\n let expected_result = HashMap::from([\n (\n PaymentMethod::BankTransfer,\n HashSet::from([PaymentMethodType::Ach, PaymentMethodType::Bacs]),\n ),\n (\n PaymentMethod::Wallet,\n HashSet::from([PaymentMethodType::Paypal, PaymentMethodType::Venmo]),\n ),\n ]);\n\n assert!(result.is_ok());\n assert_eq!(result.unwrap(), expected_result);\n }\n\n #[test]\n fn test_payment_method_and_payment_method_types_with_spaces() {\n use diesel_models::enums::{PaymentMethod, PaymentMethodType};\n\n let input_map: HashMap = HashMap::from([\n (\" bank_transfer \".to_string(), \" ach , bacs \".to_string()),\n (\"wallet \".to_string(), \" paypal , pix , venmo \".to_string()),\n ]);\n let deserializer: MapDeserializer<\n '_,\n std::collections::hash_map::IntoIter,\n ValueError,\n > = input_map.into_deserializer();\n let result = deserialize_hashmap::<'_, _, PaymentMethod, PaymentMethodType>(deserializer);\n let expected_result = HashMap::from([\n (\n PaymentMethod::BankTransfer,\n HashSet::from([PaymentMethodType::Ach, PaymentMethodType::Bacs]),\n ),\n (\n PaymentMethod::Wallet,\n HashSet::from([\n PaymentMethodType::Paypal,\n PaymentMethodType::Pix,\n PaymentMethodType::Venmo,\n ]),\n ),\n ]);\n\n assert!(result.is_ok());\n assert_eq!(result.unwrap(), expected_result);\n }\n\n #[test]\n fn test_payment_method_deserializer_error() {\n use diesel_models::enums::{PaymentMethod, PaymentMethodType};\n\n let input_map: HashMap = HashMap::from([\n (\"unknown\".to_string(), \"ach,bacs\".to_string()),\n (\"wallet\".to_string(), \"paypal,unknown\".to_string()),\n ]);\n let deserializer: MapDeserializer<\n '_,\n std::collections::hash_map::IntoIter,\n ValueError,\n > = input_map.into_deserializer();\n let result = deserialize_hashmap::<'_, _, PaymentMethod, PaymentMethodType>(deserializer);\n\n assert!(result.is_err());\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::PaymentMethod;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use super::deserialize_hashmap;", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use serde::de::Error;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "use serde::Deserialize;", + "use super::deserialize_hashmap;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use serde::de::Error;", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_address", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_address(&self) -> &PaymentAddress {\n todo!()\n }", + "after_code": "fn get_address(&self) -> &PaymentAddress {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_frm_message", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }", + "after_code": "fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Cache::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/cache\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/invalidate/{key}\").route(web::post().to(invalidate)))\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/cache\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/invalidate/{key}\").route(web::post().to(invalidate)))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_token(&self) -> Option<&str> {\n todo!()\n }", + "after_code": "fn get_token(&self) -> Option<&str> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::ProcessTrackerDeprecated", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ProcessTrackerDeprecated;", + "after_code": "pub struct ProcessTrackerDeprecated;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::WalletFlow::function::check_predecrypted_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn check_predecrypted_token(\n &self,\n _payment_data: &D,\n ) -> CustomResult, errors::ApiErrorResponse> {\n // Default implementation returns None (no pre-decrypted data)\n Ok(None)\n }", + "after_code": "fn check_predecrypted_token(\n &self,\n _payment_data: &D,\n ) -> CustomResult, errors::ApiErrorResponse> {\n // Default implementation returns None (no pre-decrypted data)\n Ok(None)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_mandate_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_mandate_id(&self) -> Option<&payments_api::MandateIds> {\n todo!()\n }", + "after_code": "fn get_mandate_id(&self) -> Option<&payments_api::MandateIds> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Blocklist", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Blocklist {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/blocklist\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\")\n .route(web::get().to(blocklist::list_blocked_payment_methods))\n .route(web::post().to(blocklist::add_entry_to_blocklist))\n .route(web::delete().to(blocklist::remove_entry_from_blocklist)),\n )\n .service(\n web::resource(\"/toggle\").route(web::post().to(blocklist::toggle_blocklist_guard)),\n )\n }\n}", + "after_code": "impl Blocklist {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/blocklist\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\")\n .route(web::get().to(blocklist::list_blocked_payment_methods))\n .route(web::post().to(blocklist::add_entry_to_blocklist))\n .route(web::delete().to(blocklist::remove_entry_from_blocklist)),\n )\n .service(\n web::resource(\"/toggle\").route(web::post().to(blocklist::toggle_blocklist_guard)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::payment_methods;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use super::payment_methods;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_setup_future_usage_in_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }", + "after_code": "fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use std::future;", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::function::deserialize_hashmap", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn deserialize_hashmap<'a, D, K, V>(deserializer: D) -> Result>, D::Error>\nwhere\n D: serde::Deserializer<'a>,\n K: Eq + std::str::FromStr + std::hash::Hash,\n V: Eq + std::str::FromStr + std::hash::Hash,\n ::Err: std::fmt::Display,\n ::Err: std::fmt::Display,\n{\n use serde::de::Error;\n deserialize_hashmap_inner(>::deserialize(deserializer)?)\n .map_err(D::Error::custom)\n}", + "after_code": "fn deserialize_hashmap<'a, D, K, V>(deserializer: D) -> Result>, D::Error>\nwhere\n D: serde::Deserializer<'a>,\n K: Eq + std::str::FromStr + std::hash::Hash,\n V: Eq + std::str::FromStr + std::hash::Hash,\n ::Err: std::fmt::Display,\n ::Err: std::fmt::Display,\n{\n use serde::de::Error;\n deserialize_hashmap_inner(>::deserialize(deserializer)?)\n .map_err(D::Error::custom)\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use super::deserialize_hashmap;", + "use serde::de::Error;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use super::deserialize_hashmap;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::Error;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_billing_address", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_billing_address(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_billing_address(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::list_payments_attempts", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn list_payments_attempts(&self) -> &Vec {\n todo!()\n }", + "after_code": "fn list_payments_attempts(&self) -> &Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::get_connectors", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_connectors(&self) -> hyperswitch_domain_models::connector_endpoints::Connectors {\n self.conf.connectors.clone()\n }", + "after_code": "fn get_connectors(&self) -> hyperswitch_domain_models::connector_endpoints::Connectors {\n self.conf.connectors.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::MerchantAccount::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n let mut routes = web::scope(\"/accounts\")\n .service(web::resource(\"\").route(web::post().to(admin::merchant_account_create)))\n .service(web::resource(\"/list\").route(web::get().to(admin::merchant_account_list)))\n .service(\n web::resource(\"/{id}/kv\")\n .route(web::post().to(admin::merchant_account_toggle_kv))\n .route(web::get().to(admin::merchant_account_kv_status)),\n )\n .service(\n web::resource(\"/transfer\")\n .route(web::post().to(admin::merchant_account_transfer_keys)),\n )\n .service(\n web::resource(\"/kv\").route(web::post().to(admin::merchant_account_toggle_all_kv)),\n )\n .service(\n web::resource(\"/{id}\")\n .route(web::get().to(admin::retrieve_merchant_account))\n .route(web::post().to(admin::update_merchant_account))\n .route(web::delete().to(admin::delete_merchant_account)),\n );\n if state.conf.platform.enabled {\n routes = routes.service(\n web::resource(\"/{id}/platform\")\n .route(web::post().to(admin::merchant_account_enable_platform_account)),\n )\n }\n routes.app_data(web::Data::new(state))\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n let mut routes = web::scope(\"/accounts\")\n .service(web::resource(\"\").route(web::post().to(admin::merchant_account_create)))\n .service(web::resource(\"/list\").route(web::get().to(admin::merchant_account_list)))\n .service(\n web::resource(\"/{id}/kv\")\n .route(web::post().to(admin::merchant_account_toggle_kv))\n .route(web::get().to(admin::merchant_account_kv_status)),\n )\n .service(\n web::resource(\"/transfer\")\n .route(web::post().to(admin::merchant_account_transfer_keys)),\n )\n .service(\n web::resource(\"/kv\").route(web::post().to(admin::merchant_account_toggle_all_kv)),\n )\n .service(\n web::resource(\"/{id}\")\n .route(web::get().to(admin::retrieve_merchant_account))\n .route(web::post().to(admin::update_merchant_account))\n .route(web::delete().to(admin::delete_merchant_account)),\n );\n if state.conf.platform.enabled {\n routes = routes.service(\n web::resource(\"/{id}/platform\")\n .route(web::post().to(admin::merchant_account_enable_platform_account)),\n )\n }\n routes.app_data(web::Data::new(state))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::PaymentMethods", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl PaymentMethods {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/payment_methods\").app_data(web::Data::new(state));\n #[cfg(feature = \"olap\")]\n {\n route =\n route.service(web::resource(\"/filter\").route(\n web::get().to(\n payment_methods::list_countries_currencies_for_connector_payment_method,\n ),\n ));\n }\n #[cfg(feature = \"oltp\")]\n {\n route = route\n .service(\n web::resource(\"\")\n .route(web::post().to(payment_methods::create_payment_method_api))\n .route(web::get().to(payment_methods::list_payment_method_api)), // TODO : added for sdk compatibility for now, need to deprecate this later\n )\n .service(\n web::resource(\"/migrate\")\n .route(web::post().to(payment_methods::migrate_payment_method_api)),\n )\n .service(\n web::resource(\"/migrate-batch\")\n .route(web::post().to(payment_methods::migrate_payment_methods)),\n )\n .service(\n web::resource(\"/update-batch\")\n .route(web::post().to(payment_methods::update_payment_methods)),\n )\n .service(\n web::resource(\"/tokenize-card\")\n .route(web::post().to(payment_methods::tokenize_card_api)),\n )\n .service(\n web::resource(\"/tokenize-card-batch\")\n .route(web::post().to(payment_methods::tokenize_card_batch_api)),\n )\n .service(\n web::resource(\"/collect\")\n .route(web::post().to(payment_methods::initiate_pm_collect_link_flow)),\n )\n .service(\n web::resource(\"/collect/{merchant_id}/{collect_id}\")\n .route(web::get().to(payment_methods::render_pm_collect_link)),\n )\n .service(\n web::resource(\"/{payment_method_id}\")\n .route(web::get().to(payment_methods::payment_method_retrieve_api))\n .route(web::delete().to(payment_methods::payment_method_delete_api)),\n )\n .service(\n web::resource(\"/{payment_method_id}/tokenize-card\")\n .route(web::post().to(payment_methods::tokenize_card_using_pm_api)),\n )\n .service(\n web::resource(\"/{payment_method_id}/update\")\n .route(web::post().to(payment_methods::payment_method_update_api)),\n )\n .service(\n web::resource(\"/{payment_method_id}/save\")\n .route(web::post().to(payment_methods::save_payment_method_api)),\n )\n .service(\n web::resource(\"/auth/link\").route(web::post().to(pm_auth::link_token_create)),\n )\n .service(\n web::resource(\"/auth/exchange\").route(web::post().to(pm_auth::exchange_token)),\n )\n }\n route\n }\n}", + "after_code": "impl PaymentMethods {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/payment_methods\").app_data(web::Data::new(state));\n #[cfg(feature = \"olap\")]\n {\n route =\n route.service(web::resource(\"/filter\").route(\n web::get().to(\n payment_methods::list_countries_currencies_for_connector_payment_method,\n ),\n ));\n }\n #[cfg(feature = \"oltp\")]\n {\n route = route\n .service(\n web::resource(\"\")\n .route(web::post().to(payment_methods::create_payment_method_api))\n .route(web::get().to(payment_methods::list_payment_method_api)), // TODO : added for sdk compatibility for now, need to deprecate this later\n )\n .service(\n web::resource(\"/migrate\")\n .route(web::post().to(payment_methods::migrate_payment_method_api)),\n )\n .service(\n web::resource(\"/migrate-batch\")\n .route(web::post().to(payment_methods::migrate_payment_methods)),\n )\n .service(\n web::resource(\"/update-batch\")\n .route(web::post().to(payment_methods::update_payment_methods)),\n )\n .service(\n web::resource(\"/tokenize-card\")\n .route(web::post().to(payment_methods::tokenize_card_api)),\n )\n .service(\n web::resource(\"/tokenize-card-batch\")\n .route(web::post().to(payment_methods::tokenize_card_batch_api)),\n )\n .service(\n web::resource(\"/collect\")\n .route(web::post().to(payment_methods::initiate_pm_collect_link_flow)),\n )\n .service(\n web::resource(\"/collect/{merchant_id}/{collect_id}\")\n .route(web::get().to(payment_methods::render_pm_collect_link)),\n )\n .service(\n web::resource(\"/{payment_method_id}\")\n .route(web::get().to(payment_methods::payment_method_retrieve_api))\n .route(web::delete().to(payment_methods::payment_method_delete_api)),\n )\n .service(\n web::resource(\"/{payment_method_id}/tokenize-card\")\n .route(web::post().to(payment_methods::tokenize_card_using_pm_api)),\n )\n .service(\n web::resource(\"/{payment_method_id}/update\")\n .route(web::post().to(payment_methods::payment_method_update_api)),\n )\n .service(\n web::resource(\"/{payment_method_id}/save\")\n .route(web::post().to(payment_methods::save_payment_method_api)),\n )\n .service(\n web::resource(\"/auth/link\").route(web::post().to(pm_auth::link_token_create)),\n )\n .service(\n web::resource(\"/auth/exchange\").route(web::post().to(pm_auth::exchange_token)),\n )\n }\n route\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use super::payment_methods;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::pm_auth;" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use super::payment_methods;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::pm_auth;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Mandates", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Mandates;", + "after_code": "pub struct Mandates;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::route_connector_v1_for_payments", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn route_connector_v1_for_payments(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n business_profile: &domain::Profile,\n payment_data: &mut D,\n transaction_data: core_routing::PaymentsDslInput<'_>,\n routing_data: &mut storage::RoutingData,\n eligible_connectors: Option>,\n mandate_type: Option,\n) -> RouterResult\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let routing_algorithm_id = {\n let routing_algorithm = business_profile.routing_algorithm.clone();\n\n let algorithm_ref = routing_algorithm\n .map(|ra| ra.parse_value::(\"RoutingAlgorithmRef\"))\n .transpose()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Could not decode merchant routing algorithm ref\")?\n .unwrap_or_default();\n algorithm_ref.algorithm_id\n };\n\n let (connectors, routing_approach) = routing::perform_static_routing_v1(\n state,\n merchant_context.get_merchant_account().get_id(),\n routing_algorithm_id.as_ref(),\n business_profile,\n &TransactionData::Payment(transaction_data.clone()),\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)?;\n\n payment_data.set_routing_approach_in_attempt(routing_approach);\n\n #[cfg(all(feature = \"v1\", feature = \"dynamic_routing\"))]\n let payment_attempt = transaction_data.payment_attempt.clone();\n\n let connectors = routing::perform_eligibility_analysis_with_fallback(\n &state.clone(),\n merchant_context.get_merchant_key_store(),\n connectors,\n &TransactionData::Payment(transaction_data),\n eligible_connectors,\n business_profile,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed eligibility analysis and fallback\")?;\n\n // dynamic success based connector selection\n #[cfg(all(feature = \"v1\", feature = \"dynamic_routing\"))]\n let connectors = if let Some(algo) = business_profile.dynamic_routing_algorithm.clone() {\n let dynamic_routing_config: api_models::routing::DynamicRoutingAlgorithmRef = algo\n .parse_value(\"DynamicRoutingAlgorithmRef\")\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"unable to deserialize DynamicRoutingAlgorithmRef from JSON\")?;\n let dynamic_split = api_models::routing::RoutingVolumeSplit {\n routing_type: api_models::routing::RoutingType::Dynamic,\n split: dynamic_routing_config\n .dynamic_routing_volume_split\n .unwrap_or_default(),\n };\n let static_split: api_models::routing::RoutingVolumeSplit =\n api_models::routing::RoutingVolumeSplit {\n routing_type: api_models::routing::RoutingType::Static,\n split: consts::DYNAMIC_ROUTING_MAX_VOLUME\n - dynamic_routing_config\n .dynamic_routing_volume_split\n .unwrap_or_default(),\n };\n let volume_split_vec = vec![dynamic_split, static_split];\n let routing_choice = routing::perform_dynamic_routing_volume_split(volume_split_vec, None)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to perform volume split on routing type\")?;\n\n if routing_choice.routing_type.is_dynamic_routing() {\n if state.conf.open_router.dynamic_routing_enabled {\n routing::perform_dynamic_routing_with_open_router(\n state,\n connectors.clone(),\n business_profile,\n payment_attempt,\n payment_data,\n )\n .await\n .map_err(|e| logger::error!(open_routing_error=?e))\n .unwrap_or(connectors)\n } else {\n let dynamic_routing_config_params_interpolator =\n routing_helpers::DynamicRoutingConfigParamsInterpolator::new(\n payment_data.get_payment_attempt().payment_method,\n payment_data.get_payment_attempt().payment_method_type,\n payment_data.get_payment_attempt().authentication_type,\n payment_data.get_payment_attempt().currency,\n payment_data\n .get_billing_address()\n .and_then(|address| address.address)\n .and_then(|address| address.country),\n payment_data\n .get_payment_attempt()\n .payment_method_data\n .as_ref()\n .and_then(|data| data.as_object())\n .and_then(|card| card.get(\"card\"))\n .and_then(|data| data.as_object())\n .and_then(|card| card.get(\"card_network\"))\n .and_then(|network| network.as_str())\n .map(|network| network.to_string()),\n payment_data\n .get_payment_attempt()\n .payment_method_data\n .as_ref()\n .and_then(|data| data.as_object())\n .and_then(|card| card.get(\"card\"))\n .and_then(|data| data.as_object())\n .and_then(|card| card.get(\"card_isin\"))\n .and_then(|card_isin| card_isin.as_str())\n .map(|card_isin| card_isin.to_string()),\n );\n\n routing::perform_dynamic_routing_with_intelligent_router(\n state,\n connectors.clone(),\n business_profile,\n dynamic_routing_config_params_interpolator,\n payment_data,\n )\n .await\n .map_err(|e| logger::error!(dynamic_routing_error=?e))\n .unwrap_or(connectors)\n }\n } else {\n connectors\n }\n } else {\n connectors\n };\n\n let connector_data = connectors\n .into_iter()\n .map(|conn| {\n api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &conn.connector.to_string(),\n api::GetToken::Connector,\n conn.merchant_connector_id,\n )\n .map(|connector_data| connector_data.into())\n })\n .collect::, _>>()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Invalid connector name received\")?;\n\n decide_multiplex_connector_for_normal_or_recurring_payment(\n state,\n payment_data,\n routing_data,\n connector_data,\n mandate_type,\n business_profile.is_connector_agnostic_mit_enabled,\n business_profile.is_network_tokenization_enabled,\n )\n .await\n}", + "after_code": "pub async fn route_connector_v1_for_payments(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n business_profile: &domain::Profile,\n payment_data: &mut D,\n transaction_data: core_routing::PaymentsDslInput<'_>,\n routing_data: &mut storage::RoutingData,\n eligible_connectors: Option>,\n mandate_type: Option,\n) -> RouterResult\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let routing_algorithm_id = {\n let routing_algorithm = business_profile.routing_algorithm.clone();\n\n let algorithm_ref = routing_algorithm\n .map(|ra| ra.parse_value::(\"RoutingAlgorithmRef\"))\n .transpose()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Could not decode merchant routing algorithm ref\")?\n .unwrap_or_default();\n algorithm_ref.algorithm_id\n };\n\n let (connectors, routing_approach) = routing::perform_static_routing_v1(\n state,\n merchant_context.get_merchant_account().get_id(),\n routing_algorithm_id.as_ref(),\n business_profile,\n &TransactionData::Payment(transaction_data.clone()),\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)?;\n\n payment_data.set_routing_approach_in_attempt(routing_approach);\n\n #[cfg(all(feature = \"v1\", feature = \"dynamic_routing\"))]\n let payment_attempt = transaction_data.payment_attempt.clone();\n\n let connectors = routing::perform_eligibility_analysis_with_fallback(\n &state.clone(),\n merchant_context.get_merchant_key_store(),\n connectors,\n &TransactionData::Payment(transaction_data),\n eligible_connectors,\n business_profile,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed eligibility analysis and fallback\")?;\n\n // dynamic success based connector selection\n #[cfg(all(feature = \"v1\", feature = \"dynamic_routing\"))]\n let connectors = if let Some(algo) = business_profile.dynamic_routing_algorithm.clone() {\n let dynamic_routing_config: api_models::routing::DynamicRoutingAlgorithmRef = algo\n .parse_value(\"DynamicRoutingAlgorithmRef\")\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"unable to deserialize DynamicRoutingAlgorithmRef from JSON\")?;\n let dynamic_split = api_models::routing::RoutingVolumeSplit {\n routing_type: api_models::routing::RoutingType::Dynamic,\n split: dynamic_routing_config\n .dynamic_routing_volume_split\n .unwrap_or_default(),\n };\n let static_split: api_models::routing::RoutingVolumeSplit =\n api_models::routing::RoutingVolumeSplit {\n routing_type: api_models::routing::RoutingType::Static,\n split: consts::DYNAMIC_ROUTING_MAX_VOLUME\n - dynamic_routing_config\n .dynamic_routing_volume_split\n .unwrap_or_default(),\n };\n let volume_split_vec = vec![dynamic_split, static_split];\n let routing_choice = routing::perform_dynamic_routing_volume_split(volume_split_vec, None)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to perform volume split on routing type\")?;\n\n if routing_choice.routing_type.is_dynamic_routing() {\n if state.conf.open_router.dynamic_routing_enabled {\n routing::perform_dynamic_routing_with_open_router(\n state,\n connectors.clone(),\n business_profile,\n payment_attempt,\n payment_data,\n )\n .await\n .map_err(|e| logger::error!(open_routing_error=?e))\n .unwrap_or(connectors)\n } else {\n let dynamic_routing_config_params_interpolator =\n routing_helpers::DynamicRoutingConfigParamsInterpolator::new(\n payment_data.get_payment_attempt().payment_method,\n payment_data.get_payment_attempt().payment_method_type,\n payment_data.get_payment_attempt().authentication_type,\n payment_data.get_payment_attempt().currency,\n payment_data\n .get_billing_address()\n .and_then(|address| address.address)\n .and_then(|address| address.country),\n payment_data\n .get_payment_attempt()\n .payment_method_data\n .as_ref()\n .and_then(|data| data.as_object())\n .and_then(|card| card.get(\"card\"))\n .and_then(|data| data.as_object())\n .and_then(|card| card.get(\"card_network\"))\n .and_then(|network| network.as_str())\n .map(|network| network.to_string()),\n payment_data\n .get_payment_attempt()\n .payment_method_data\n .as_ref()\n .and_then(|data| data.as_object())\n .and_then(|card| card.get(\"card\"))\n .and_then(|data| data.as_object())\n .and_then(|card| card.get(\"card_isin\"))\n .and_then(|card_isin| card_isin.as_str())\n .map(|card_isin| card_isin.to_string()),\n );\n\n routing::perform_dynamic_routing_with_intelligent_router(\n state,\n connectors.clone(),\n business_profile,\n dynamic_routing_config_params_interpolator,\n payment_data,\n )\n .await\n .map_err(|e| logger::error!(dynamic_routing_error=?e))\n .unwrap_or(connectors)\n }\n } else {\n connectors\n }\n } else {\n connectors\n };\n\n let connector_data = connectors\n .into_iter()\n .map(|conn| {\n api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &conn.connector.to_string(),\n api::GetToken::Connector,\n conn.merchant_connector_id,\n )\n .map(|connector_data| connector_data.into())\n })\n .collect::, _>>()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Invalid connector name received\")?;\n\n decide_multiplex_connector_for_normal_or_recurring_payment(\n state,\n payment_data,\n routing_data,\n connector_data,\n mandate_type,\n business_profile.is_connector_agnostic_mit_enabled,\n business_profile.is_network_tokenization_enabled,\n )\n .await\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_merchant_connector_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n self.payment_attempt.merchant_connector_id = merchant_connector_id;\n }", + "after_code": "fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n self.payment_attempt.merchant_connector_id = merchant_connector_id;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::UserSettings", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct UserSettings {\n pub password_validity_in_days: u16,\n pub two_factor_auth_expiry_in_secs: i64,\n pub totp_issuer_name: String,\n pub base_url: String,\n pub force_two_factor_auth: bool,\n pub force_cookies: bool,\n}", + "after_code": "pub struct UserSettings {\n pub password_validity_in_days: u16,\n pub two_factor_auth_expiry_in_secs: i64,\n pub totp_issuer_name: String,\n pub base_url: String,\n pub force_two_factor_auth: bool,\n pub force_cookies: bool,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::mod::session_operation", + "file": "crates/router/src/core/payments.rs", + "kind": "mod_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub mod session_operation;", + "after_code": "pub mod session_operation;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_mandate_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails> {\n todo!()\n }", + "after_code": "fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_payment_intent_status", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }", + "after_code": "fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::decide_connector_for_normal_or_recurring_payment", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn decide_connector_for_normal_or_recurring_payment(\n state: &SessionState,\n payment_data: &mut D,\n routing_data: &mut storage::RoutingData,\n connectors: Vec,\n is_connector_agnostic_mit_enabled: Option,\n payment_method_info: &domain::PaymentMethod,\n) -> RouterResult\nwhere\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let connector_common_mandate_details = payment_method_info\n .get_common_mandate_reference()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get the common mandate reference\")?;\n\n let connector_mandate_details = connector_common_mandate_details.payments.clone();\n\n let mut connector_choice = None;\n\n for connector_info in connectors {\n let connector_data = connector_info.connector_data;\n let merchant_connector_id = connector_data\n .merchant_connector_id\n .as_ref()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to find the merchant connector id\")?;\n if connector_mandate_details\n .clone()\n .map(|connector_mandate_details| {\n connector_mandate_details.contains_key(merchant_connector_id)\n })\n .unwrap_or(false)\n {\n logger::info!(\"euclid_routing: using connector_mandate_id for MIT flow\");\n if let Some(merchant_connector_id) = connector_data.merchant_connector_id.as_ref() {\n if let Some(mandate_reference_record) = connector_mandate_details.clone()\n .get_required_value(\"connector_mandate_details\")\n .change_context(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\"no eligible connector found for token-based MIT flow since there were no connector mandate details\")?\n .get(merchant_connector_id)\n {\n common_utils::fp_utils::when(\n mandate_reference_record\n .original_payment_authorized_currency\n .map(|mandate_currency| mandate_currency != payment_data.get_currency())\n .unwrap_or(false),\n || {\n Err(report!(errors::ApiErrorResponse::MandateValidationFailed {\n reason: \"cross currency mandates not supported\".into()\n }))\n },\n )?;\n let mandate_reference_id = Some(payments_api::MandateReferenceId::ConnectorMandateId(\n api_models::payments::ConnectorMandateReferenceId::new(\n Some(mandate_reference_record.connector_mandate_id.clone()),\n Some(payment_method_info.get_id().clone()),\n // update_history\n None,\n mandate_reference_record.mandate_metadata.clone(),\n mandate_reference_record.connector_mandate_request_reference_id.clone(),\n )\n ));\n payment_data.set_recurring_mandate_payment_data(\n mandate_reference_record.into(),\n );\n connector_choice = Some((connector_data, mandate_reference_id.clone()));\n break;\n }\n }\n } else if is_network_transaction_id_flow(\n state,\n is_connector_agnostic_mit_enabled,\n connector_data.connector_name,\n payment_method_info,\n ) {\n logger::info!(\"using network_transaction_id for MIT flow\");\n let network_transaction_id = payment_method_info\n .network_transaction_id\n .as_ref()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to fetch the network transaction id\")?;\n\n let mandate_reference_id = Some(payments_api::MandateReferenceId::NetworkMandateId(\n network_transaction_id.to_string(),\n ));\n\n connector_choice = Some((connector_data, mandate_reference_id.clone()));\n break;\n } else {\n continue;\n }\n }\n\n let (chosen_connector_data, mandate_reference_id) = connector_choice\n .get_required_value(\"connector_choice\")\n .change_context(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\"no eligible connector found for token-based MIT payment\")?;\n\n routing_data.routed_through = Some(chosen_connector_data.connector_name.to_string());\n\n routing_data\n .merchant_connector_id\n .clone_from(&chosen_connector_data.merchant_connector_id);\n\n payment_data.set_mandate_id(payments_api::MandateIds {\n mandate_id: None,\n mandate_reference_id,\n });\n\n Ok(ConnectorCallType::PreDetermined(\n chosen_connector_data.into(),\n ))\n}", + "after_code": "pub async fn decide_connector_for_normal_or_recurring_payment(\n state: &SessionState,\n payment_data: &mut D,\n routing_data: &mut storage::RoutingData,\n connectors: Vec,\n is_connector_agnostic_mit_enabled: Option,\n payment_method_info: &domain::PaymentMethod,\n) -> RouterResult\nwhere\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let connector_common_mandate_details = payment_method_info\n .get_common_mandate_reference()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get the common mandate reference\")?;\n\n let connector_mandate_details = connector_common_mandate_details.payments.clone();\n\n let mut connector_choice = None;\n\n for connector_info in connectors {\n let connector_data = connector_info.connector_data;\n let merchant_connector_id = connector_data\n .merchant_connector_id\n .as_ref()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to find the merchant connector id\")?;\n if connector_mandate_details\n .clone()\n .map(|connector_mandate_details| {\n connector_mandate_details.contains_key(merchant_connector_id)\n })\n .unwrap_or(false)\n {\n logger::info!(\"euclid_routing: using connector_mandate_id for MIT flow\");\n if let Some(merchant_connector_id) = connector_data.merchant_connector_id.as_ref() {\n if let Some(mandate_reference_record) = connector_mandate_details.clone()\n .get_required_value(\"connector_mandate_details\")\n .change_context(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\"no eligible connector found for token-based MIT flow since there were no connector mandate details\")?\n .get(merchant_connector_id)\n {\n common_utils::fp_utils::when(\n mandate_reference_record\n .original_payment_authorized_currency\n .map(|mandate_currency| mandate_currency != payment_data.get_currency())\n .unwrap_or(false),\n || {\n Err(report!(errors::ApiErrorResponse::MandateValidationFailed {\n reason: \"cross currency mandates not supported\".into()\n }))\n },\n )?;\n let mandate_reference_id = Some(payments_api::MandateReferenceId::ConnectorMandateId(\n api_models::payments::ConnectorMandateReferenceId::new(\n Some(mandate_reference_record.connector_mandate_id.clone()),\n Some(payment_method_info.get_id().clone()),\n // update_history\n None,\n mandate_reference_record.mandate_metadata.clone(),\n mandate_reference_record.connector_mandate_request_reference_id.clone(),\n )\n ));\n payment_data.set_recurring_mandate_payment_data(\n mandate_reference_record.into(),\n );\n connector_choice = Some((connector_data, mandate_reference_id.clone()));\n break;\n }\n }\n } else if is_network_transaction_id_flow(\n state,\n is_connector_agnostic_mit_enabled,\n connector_data.connector_name,\n payment_method_info,\n ) {\n logger::info!(\"using network_transaction_id for MIT flow\");\n let network_transaction_id = payment_method_info\n .network_transaction_id\n .as_ref()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to fetch the network transaction id\")?;\n\n let mandate_reference_id = Some(payments_api::MandateReferenceId::NetworkMandateId(\n network_transaction_id.to_string(),\n ));\n\n connector_choice = Some((connector_data, mandate_reference_id.clone()));\n break;\n } else {\n continue;\n }\n }\n\n let (chosen_connector_data, mandate_reference_id) = connector_choice\n .get_required_value(\"connector_choice\")\n .change_context(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\"no eligible connector found for token-based MIT payment\")?;\n\n routing_data.routed_through = Some(chosen_connector_data.connector_name.to_string());\n\n routing_data\n .merchant_connector_id\n .clone_from(&chosen_connector_data.merchant_connector_id);\n\n payment_data.set_mandate_id(payments_api::MandateIds {\n mandate_id: None,\n mandate_reference_id,\n });\n\n Ok(ConnectorCallType::PreDetermined(\n chosen_connector_data.into(),\n ))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use error_stack::{report, ResultExt};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use error_stack::{report, ResultExt};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_payment_method_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }", + "after_code": "fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::update_straight_through_routing", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn update_straight_through_routing(\n payment_data: &mut D,\n request_straight_through: serde_json::Value,\n) -> CustomResult<(), errors::ParsingError>\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let _: api_models::routing::StaticRoutingAlgorithm = request_straight_through\n .clone()\n .parse_value(\"RoutingAlgorithm\")\n .attach_printable(\"Invalid straight through routing rules format\")?;\n\n payment_data.set_straight_through_algorithm_in_payment_attempt(request_straight_through);\n\n Ok(())\n}", + "after_code": "pub fn update_straight_through_routing(\n payment_data: &mut D,\n request_straight_through: serde_json::Value,\n) -> CustomResult<(), errors::ParsingError>\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let _: api_models::routing::StaticRoutingAlgorithm = request_straight_through\n .clone()\n .parse_value(\"RoutingAlgorithm\")\n .attach_printable(\"Invalid straight through routing rules format\")?;\n\n payment_data.set_straight_through_algorithm_in_payment_attempt(request_straight_through);\n\n Ok(())\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAuthenticateCompleteAuthorize::function::get_payment_action", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_action(&self) -> services::PaymentAction {\n services::PaymentAction::PaymentAuthenticateCompleteAuthorize\n }", + "after_code": "fn get_payment_action(&self) -> services::PaymentAction {\n services::PaymentAction::PaymentAuthenticateCompleteAuthorize\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_prerouting_algorithm_in_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(straight_through_algorithm);\n }", + "after_code": "fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(straight_through_algorithm);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/capture_flow.rs::impl::types::RouterData", + "file": "crates/router/src/core/payments/flows/capture_flow.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "impl Feature\n for types::RouterData\n{\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::Capture,\n types::PaymentsCaptureData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let mut new_router_data = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n // Initiating Integrity check\n let integrity_result = helpers::check_integrity_based_on_flow(\n &new_router_data.request,\n &new_router_data.response,\n );\n new_router_data.integrity_check = integrity_result;\n\n Ok(new_router_data)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::Capture,\n types::PaymentsCaptureData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n\n async fn call_unified_connector_service<'a>(\n &mut self,\n state: &SessionState,\n header_payload: &domain_payments::HeaderPayload,\n lineage_ids: grpc_client::LineageIds,\n #[cfg(feature = \"v1\")] merchant_connector_account: helpers::MerchantConnectorAccountType,\n #[cfg(feature = \"v2\")]\n merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n merchant_context: &domain::MerchantContext,\n _connector_data: &api::ConnectorData,\n unified_connector_service_execution_mode: common_enums::ExecutionMode,\n merchant_order_reference_id: Option,\n _call_connector_action: common_enums::CallConnectorAction,\n _creds_identifier: Option,\n ) -> RouterResult<()> {\n let client = state\n .grpc_client\n .unified_connector_service_client\n .clone()\n .ok_or(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to fetch Unified Connector Service client\")?;\n\n let payment_capture_request =\n payments_grpc::PaymentServiceCaptureRequest::foreign_try_from(&*self)\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct Payment Capture Request\")?;\n\n let connector_auth_metadata = build_unified_connector_service_auth_metadata(\n merchant_connector_account,\n merchant_context,\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct request metadata\")?;\n let merchant_reference_id = header_payload\n .x_reference_id\n .clone()\n .or(merchant_order_reference_id)\n .map(|id| id_type::PaymentReferenceId::from_str(id.as_str()))\n .transpose()\n .inspect_err(|err| logger::warn!(error=?err, \"Invalid Merchant ReferenceId found\"))\n .ok()\n .flatten()\n .map(ucs_types::UcsReferenceId::Payment);\n let header_payload = state\n .get_grpc_headers_ucs(unified_connector_service_execution_mode)\n .external_vault_proxy_metadata(None)\n .merchant_reference_id(merchant_reference_id)\n .lineage_ids(lineage_ids);\n let updated_router_data = Box::pin(ucs_logging_wrapper(\n self.clone(),\n state,\n payment_capture_request,\n header_payload,\n |mut router_data, payment_capture_request, grpc_headers| async move {\n let response = client\n .payment_capture(\n payment_capture_request,\n connector_auth_metadata,\n grpc_headers,\n )\n .await\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to capture payment\")?;\n\n let payment_capture_response = response.into_inner();\n\n let (router_data_response, status_code) =\n handle_unified_connector_service_response_for_payment_capture(\n payment_capture_response.clone(),\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to deserialize UCS response\")?;\n\n let router_data_response = router_data_response.map(|(response, status)| {\n router_data.status = status;\n response\n });\n router_data.response = router_data_response;\n router_data.amount_captured = payment_capture_response.captured_amount;\n router_data.minor_amount_captured = payment_capture_response\n .minor_captured_amount\n .map(MinorUnit::new);\n router_data.connector_http_status_code = Some(status_code);\n\n Ok((router_data, payment_capture_response))\n },\n ))\n .await?;\n\n // Copy back the updated data\n *self = updated_router_data;\n Ok(())\n }\n}", + "after_code": "impl Feature\n for types::RouterData\n{\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::Capture,\n types::PaymentsCaptureData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let mut new_router_data = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n // Initiating Integrity check\n let integrity_result = helpers::check_integrity_based_on_flow(\n &new_router_data.request,\n &new_router_data.response,\n );\n new_router_data.integrity_check = integrity_result;\n\n Ok(new_router_data)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::Capture,\n types::PaymentsCaptureData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n\n async fn call_unified_connector_service<'a>(\n &mut self,\n state: &SessionState,\n header_payload: &domain_payments::HeaderPayload,\n lineage_ids: grpc_client::LineageIds,\n #[cfg(feature = \"v1\")] merchant_connector_account: helpers::MerchantConnectorAccountType,\n #[cfg(feature = \"v2\")]\n merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n merchant_context: &domain::MerchantContext,\n _connector_data: &api::ConnectorData,\n unified_connector_service_execution_mode: common_enums::ExecutionMode,\n merchant_order_reference_id: Option,\n _call_connector_action: common_enums::CallConnectorAction,\n _creds_identifier: Option,\n ) -> RouterResult<()> {\n let client = state\n .grpc_client\n .unified_connector_service_client\n .clone()\n .ok_or(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to fetch Unified Connector Service client\")?;\n\n let payment_capture_request =\n payments_grpc::PaymentServiceCaptureRequest::foreign_try_from(&*self)\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct Payment Capture Request\")?;\n\n let connector_auth_metadata = build_unified_connector_service_auth_metadata(\n merchant_connector_account,\n merchant_context,\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct request metadata\")?;\n let merchant_reference_id = header_payload\n .x_reference_id\n .clone()\n .or(merchant_order_reference_id)\n .map(|id| id_type::PaymentReferenceId::from_str(id.as_str()))\n .transpose()\n .inspect_err(|err| logger::warn!(error=?err, \"Invalid Merchant ReferenceId found\"))\n .ok()\n .flatten()\n .map(ucs_types::UcsReferenceId::Payment);\n let header_payload = state\n .get_grpc_headers_ucs(unified_connector_service_execution_mode)\n .external_vault_proxy_metadata(None)\n .merchant_reference_id(merchant_reference_id)\n .lineage_ids(lineage_ids);\n let updated_router_data = Box::pin(ucs_logging_wrapper(\n self.clone(),\n state,\n payment_capture_request,\n header_payload,\n |mut router_data, payment_capture_request, grpc_headers| async move {\n let response = client\n .payment_capture(\n payment_capture_request,\n connector_auth_metadata,\n grpc_headers,\n )\n .await\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to capture payment\")?;\n\n let payment_capture_response = response.into_inner();\n\n let (router_data_response, status_code) =\n handle_unified_connector_service_response_for_payment_capture(\n payment_capture_response.clone(),\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to deserialize UCS response\")?;\n\n let router_data_response = router_data_response.map(|(response, status)| {\n router_data.status = status;\n response\n });\n router_data.response = router_data_response;\n router_data.amount_captured = payment_capture_response.captured_amount;\n router_data.minor_amount_captured = payment_capture_response\n .minor_captured_amount\n .map(MinorUnit::new);\n router_data.connector_http_status_code = Some(status_code);\n\n Ok((router_data, payment_capture_response))\n },\n ))\n .await?;\n\n // Copy back the updated data\n *self = updated_router_data;\n Ok(())\n }\n}", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/routes/app.rs::impl::Gsm", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Gsm {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/gsm\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(gsm::create_gsm_rule)))\n .service(web::resource(\"/get\").route(web::post().to(gsm::get_gsm_rule)))\n .service(web::resource(\"/update\").route(web::post().to(gsm::update_gsm_rule)))\n .service(web::resource(\"/delete\").route(web::post().to(gsm::delete_gsm_rule)))\n }\n}", + "after_code": "impl Gsm {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/gsm\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(gsm::create_gsm_rule)))\n .service(web::resource(\"/get\").route(web::post().to(gsm::get_gsm_rule)))\n .service(web::resource(\"/update\").route(web::post().to(gsm::update_gsm_rule)))\n .service(web::resource(\"/delete\").route(web::post().to(gsm::delete_gsm_rule)))\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_client_secret", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_client_secret(&mut self, _client_secret: Option>) {\n todo!()\n }", + "after_code": "fn set_client_secret(&mut self, _client_secret: Option>) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_email_if_not_present", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }", + "after_code": "fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_email_if_not_present", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }", + "after_code": "fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Relay::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/relay\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(relay::relay)))\n .service(web::resource(\"/{relay_id}\").route(web::get().to(relay::relay_retrieve)))\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/relay\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(relay::relay)))\n .service(web::resource(\"/{relay_id}\").route(web::get().to(relay::relay_retrieve)))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Cards", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Cards {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/cards\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/create\").route(web::post().to(create_cards_info)))\n .service(web::resource(\"/update\").route(web::post().to(update_cards_info)))\n .service(web::resource(\"/update-batch\").route(web::post().to(migrate_cards_info)))\n .service(web::resource(\"/{bin}\").route(web::get().to(card_iin_info)))\n }\n}", + "after_code": "impl Cards {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/cards\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/create\").route(web::post().to(create_cards_info)))\n .service(web::resource(\"/update\").route(web::post().to(update_cards_info)))\n .service(web::resource(\"/update-batch\").route(web::post().to(migrate_cards_info)))\n .service(web::resource(\"/{bin}\").route(web::get().to(card_iin_info)))\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::decide_authorize_or_setup_intent_flow", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn decide_authorize_or_setup_intent_flow(\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n create_intent_response: &payments_api::PaymentsIntentResponse,\n confirm_intent_request: payments_api::PaymentsConfirmIntentRequest,\n payment_id: id_type::GlobalPaymentId,\n header_payload: HeaderPayload,\n) -> RouterResponse {\n use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };\n\n if create_intent_response.amount_details.order_amount == MinorUnit::zero() {\n Box::pin(payments_core::<\n SetupMandate,\n api_models::payments::PaymentsResponse,\n _,\n _,\n _,\n PaymentConfirmData,\n >(\n state,\n req_state,\n merchant_context,\n profile,\n operations::PaymentIntentConfirm,\n confirm_intent_request,\n payment_id,\n CallConnectorAction::Trigger,\n header_payload,\n ))\n .await\n } else {\n Box::pin(payments_core::<\n Authorize,\n api_models::payments::PaymentsResponse,\n _,\n _,\n _,\n PaymentConfirmData,\n >(\n state,\n req_state,\n merchant_context,\n profile,\n operations::PaymentIntentConfirm,\n confirm_intent_request,\n payment_id,\n CallConnectorAction::Trigger,\n header_payload,\n ))\n .await\n }\n}", + "after_code": "async fn decide_authorize_or_setup_intent_flow(\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n create_intent_response: &payments_api::PaymentsIntentResponse,\n confirm_intent_request: payments_api::PaymentsConfirmIntentRequest,\n payment_id: id_type::GlobalPaymentId,\n header_payload: HeaderPayload,\n) -> RouterResponse {\n use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };\n\n if create_intent_response.amount_details.order_amount == MinorUnit::zero() {\n Box::pin(payments_core::<\n SetupMandate,\n api_models::payments::PaymentsResponse,\n _,\n _,\n _,\n PaymentConfirmData,\n >(\n state,\n req_state,\n merchant_context,\n profile,\n operations::PaymentIntentConfirm,\n confirm_intent_request,\n payment_id,\n CallConnectorAction::Trigger,\n header_payload,\n ))\n .await\n } else {\n Box::pin(payments_core::<\n Authorize,\n api_models::payments::PaymentsResponse,\n _,\n _,\n _,\n PaymentConfirmData,\n >(\n state,\n req_state,\n merchant_context,\n profile,\n operations::PaymentIntentConfirm,\n confirm_intent_request,\n payment_id,\n CallConnectorAction::Trigger,\n header_payload,\n ))\n .await\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/reject_flow.rs::types::RouterData::function::decide_flows", + "file": "crates/router/src/core/payments/flows/reject_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "async fn decide_flows<'a>(\n self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _call_connector_action: payments::CallConnectorAction,\n _connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n Err(ApiErrorResponse::NotImplemented {\n message: NotImplementedMessage::Reason(\"Flow not supported\".to_string()),\n }\n .into())\n }", + "after_code": "async fn decide_flows<'a>(\n self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _call_connector_action: payments::CallConnectorAction,\n _connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n Err(ApiErrorResponse::NotImplemented {\n message: NotImplementedMessage::Reason(\"Flow not supported\".to_string()),\n }\n .into())\n }", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n Err(ApiErrorResponse::NotImplemented {" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments.rs::struct::PaymentEligibilityData", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PaymentEligibilityData {\n pub payment_method_data: Option,\n pub payment_intent: storage::PaymentIntent,\n pub browser_info: Option,\n}", + "after_code": "pub struct PaymentEligibilityData {\n pub payment_method_data: Option,\n pub payment_intent: storage::PaymentIntent,\n pub browser_info: Option,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_merchant_bank_data_for_open_banking_connectors", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn get_merchant_bank_data_for_open_banking_connectors(\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n merchant_context: &domain::MerchantContext,\n connector: &api::ConnectorData,\n state: &SessionState,\n) -> RouterResult> {\n let merchant_data = merchant_connector_account\n .get_additional_merchant_data()\n .get_required_value(\"additional_merchant_data\")?\n .into_inner()\n .peek()\n .clone();\n\n let merchant_recipient_data = merchant_data\n .parse_value::(\"AdditionalMerchantData\")\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to decode MerchantRecipientData\")?;\n\n let connector_name = enums::Connector::to_string(&connector.connector_name);\n let locker_based_connector_list = state.conf.locker_based_open_banking_connectors.clone();\n let contains = locker_based_connector_list\n .connector_list\n .contains(connector_name.as_str());\n\n let recipient_id = helpers::get_recipient_id_for_open_banking(&merchant_recipient_data)?;\n let final_recipient_data = if let Some(id) = recipient_id {\n if contains {\n // Customer Id for OpenBanking connectors will be merchant_id as the account data stored at locker belongs to the merchant\n let merchant_id_str = merchant_context\n .get_merchant_account()\n .get_id()\n .get_string_repr()\n .to_owned();\n let cust_id = id_type::CustomerId::try_from(std::borrow::Cow::from(merchant_id_str))\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to convert to CustomerId\")?;\n let locker_resp = cards::get_payment_method_from_hs_locker(\n state,\n merchant_context.get_merchant_key_store(),\n &cust_id,\n merchant_context.get_merchant_account().get_id(),\n id.as_str(),\n Some(enums::LockerChoice::HyperswitchCardVault),\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Merchant bank account data could not be fetched from locker\")?;\n\n let parsed: router_types::MerchantAccountData = locker_resp\n .peek()\n .to_string()\n .parse_struct(\"MerchantAccountData\")\n .change_context(errors::ApiErrorResponse::InternalServerError)?;\n\n Some(router_types::MerchantRecipientData::AccountData(parsed))\n } else {\n Some(router_types::MerchantRecipientData::ConnectorRecipientId(\n Secret::new(id),\n ))\n }\n } else {\n None\n };\n Ok(final_recipient_data)\n}", + "after_code": "pub async fn get_merchant_bank_data_for_open_banking_connectors(\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n merchant_context: &domain::MerchantContext,\n connector: &api::ConnectorData,\n state: &SessionState,\n) -> RouterResult> {\n let merchant_data = merchant_connector_account\n .get_additional_merchant_data()\n .get_required_value(\"additional_merchant_data\")?\n .into_inner()\n .peek()\n .clone();\n\n let merchant_recipient_data = merchant_data\n .parse_value::(\"AdditionalMerchantData\")\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to decode MerchantRecipientData\")?;\n\n let connector_name = enums::Connector::to_string(&connector.connector_name);\n let locker_based_connector_list = state.conf.locker_based_open_banking_connectors.clone();\n let contains = locker_based_connector_list\n .connector_list\n .contains(connector_name.as_str());\n\n let recipient_id = helpers::get_recipient_id_for_open_banking(&merchant_recipient_data)?;\n let final_recipient_data = if let Some(id) = recipient_id {\n if contains {\n // Customer Id for OpenBanking connectors will be merchant_id as the account data stored at locker belongs to the merchant\n let merchant_id_str = merchant_context\n .get_merchant_account()\n .get_id()\n .get_string_repr()\n .to_owned();\n let cust_id = id_type::CustomerId::try_from(std::borrow::Cow::from(merchant_id_str))\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to convert to CustomerId\")?;\n let locker_resp = cards::get_payment_method_from_hs_locker(\n state,\n merchant_context.get_merchant_key_store(),\n &cust_id,\n merchant_context.get_merchant_account().get_id(),\n id.as_str(),\n Some(enums::LockerChoice::HyperswitchCardVault),\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Merchant bank account data could not be fetched from locker\")?;\n\n let parsed: router_types::MerchantAccountData = locker_resp\n .peek()\n .to_string()\n .parse_struct(\"MerchantAccountData\")\n .change_context(errors::ApiErrorResponse::InternalServerError)?;\n\n Some(router_types::MerchantRecipientData::AccountData(parsed))\n } else {\n Some(router_types::MerchantRecipientData::ConnectorRecipientId(\n Secret::new(id),\n ))\n }\n } else {\n None\n };\n Ok(final_recipient_data)\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_address", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_address(&self) -> &PaymentAddress {\n todo!()\n }", + "after_code": "fn get_address(&self) -> &PaymentAddress {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Disputes::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/disputes\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/list\").route(web::get().to(disputes::retrieve_disputes_list)))\n .service(\n web::resource(\"/profile/list\")\n .route(web::get().to(disputes::retrieve_disputes_list_profile)),\n )\n .service(web::resource(\"/filter\").route(web::get().to(disputes::get_disputes_filters)))\n .service(\n web::resource(\"/profile/filter\")\n .route(web::get().to(disputes::get_disputes_filters_profile)),\n )\n .service(\n web::resource(\"/accept/{dispute_id}\")\n .route(web::post().to(disputes::accept_dispute)),\n )\n .service(\n web::resource(\"/aggregate\").route(web::get().to(disputes::get_disputes_aggregate)),\n )\n .service(\n web::resource(\"/profile/aggregate\")\n .route(web::get().to(disputes::get_disputes_aggregate_profile)),\n )\n .service(\n web::resource(\"/evidence\")\n .route(web::post().to(disputes::submit_dispute_evidence))\n .route(web::put().to(disputes::attach_dispute_evidence))\n .route(web::delete().to(disputes::delete_dispute_evidence)),\n )\n .service(\n web::resource(\"/evidence/{dispute_id}\")\n .route(web::get().to(disputes::retrieve_dispute_evidence)),\n )\n .service(\n web::resource(\"/{dispute_id}\").route(web::get().to(disputes::retrieve_dispute)),\n )\n .service(\n web::resource(\"/{connector_id}/fetch\")\n .route(web::get().to(disputes::fetch_disputes)),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/disputes\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/list\").route(web::get().to(disputes::retrieve_disputes_list)))\n .service(\n web::resource(\"/profile/list\")\n .route(web::get().to(disputes::retrieve_disputes_list_profile)),\n )\n .service(web::resource(\"/filter\").route(web::get().to(disputes::get_disputes_filters)))\n .service(\n web::resource(\"/profile/filter\")\n .route(web::get().to(disputes::get_disputes_filters_profile)),\n )\n .service(\n web::resource(\"/accept/{dispute_id}\")\n .route(web::post().to(disputes::accept_dispute)),\n )\n .service(\n web::resource(\"/aggregate\").route(web::get().to(disputes::get_disputes_aggregate)),\n )\n .service(\n web::resource(\"/profile/aggregate\")\n .route(web::get().to(disputes::get_disputes_aggregate_profile)),\n )\n .service(\n web::resource(\"/evidence\")\n .route(web::post().to(disputes::submit_dispute_evidence))\n .route(web::put().to(disputes::attach_dispute_evidence))\n .route(web::delete().to(disputes::delete_dispute_evidence)),\n )\n .service(\n web::resource(\"/evidence/{dispute_id}\")\n .route(web::get().to(disputes::retrieve_dispute_evidence)),\n )\n .service(\n web::resource(\"/{dispute_id}\").route(web::get().to(disputes::retrieve_dispute)),\n )\n .service(\n web::resource(\"/{connector_id}/fetch\")\n .route(web::get().to(disputes::fetch_disputes)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::hashmap_deserialization_test::function::test_payment_method_and_payment_method_types_with_spaces", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn test_payment_method_and_payment_method_types_with_spaces() {\n use diesel_models::enums::{PaymentMethod, PaymentMethodType};\n\n let input_map: HashMap = HashMap::from([\n (\" bank_transfer \".to_string(), \" ach , bacs \".to_string()),\n (\"wallet \".to_string(), \" paypal , pix , venmo \".to_string()),\n ]);\n let deserializer: MapDeserializer<\n '_,\n std::collections::hash_map::IntoIter,\n ValueError,\n > = input_map.into_deserializer();\n let result = deserialize_hashmap::<'_, _, PaymentMethod, PaymentMethodType>(deserializer);\n let expected_result = HashMap::from([\n (\n PaymentMethod::BankTransfer,\n HashSet::from([PaymentMethodType::Ach, PaymentMethodType::Bacs]),\n ),\n (\n PaymentMethod::Wallet,\n HashSet::from([\n PaymentMethodType::Paypal,\n PaymentMethodType::Pix,\n PaymentMethodType::Venmo,\n ]),\n ),\n ]);\n\n assert!(result.is_ok());\n assert_eq!(result.unwrap(), expected_result);\n }", + "after_code": "fn test_payment_method_and_payment_method_types_with_spaces() {\n use diesel_models::enums::{PaymentMethod, PaymentMethodType};\n\n let input_map: HashMap = HashMap::from([\n (\" bank_transfer \".to_string(), \" ach , bacs \".to_string()),\n (\"wallet \".to_string(), \" paypal , pix , venmo \".to_string()),\n ]);\n let deserializer: MapDeserializer<\n '_,\n std::collections::hash_map::IntoIter,\n ValueError,\n > = input_map.into_deserializer();\n let result = deserialize_hashmap::<'_, _, PaymentMethod, PaymentMethodType>(deserializer);\n let expected_result = HashMap::from([\n (\n PaymentMethod::BankTransfer,\n HashSet::from([PaymentMethodType::Ach, PaymentMethodType::Bacs]),\n ),\n (\n PaymentMethod::Wallet,\n HashSet::from([\n PaymentMethodType::Paypal,\n PaymentMethodType::Pix,\n PaymentMethodType::Venmo,\n ]),\n ),\n ]);\n\n assert!(result.is_ok());\n assert_eq!(result.unwrap(), expected_result);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::PaymentMethod;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use super::deserialize_hashmap;", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use serde::de::Error;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "use serde::Deserialize;", + "use super::deserialize_hashmap;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use serde::de::Error;", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentRedirectSync::function::call_payment_flow", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn call_payment_flow(\n &self,\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n req: PaymentsRedirectResponseData,\n ) -> RouterResult {\n let payment_id = req.payment_id.clone();\n\n let payment_sync_request = api::PaymentsRetrieveRequest {\n param: Some(req.query_params.clone()),\n force_sync: true,\n expand_attempts: false,\n return_raw_connector_response: None,\n merchant_connector_details: None, // TODO: Implement for connectors requiring 3DS or redirection-based authentication flows.\n };\n\n let operation = operations::PaymentGet;\n let boxed_operation: BoxedOperation<\n '_,\n api::PSync,\n api::PaymentsRetrieveRequest,\n PaymentStatusData,\n > = Box::new(operation);\n\n let get_tracker_response = boxed_operation\n .to_get_tracker()?\n .get_trackers(\n state,\n &payment_id,\n &payment_sync_request,\n &merchant_context,\n &profile,\n &HeaderPayload::default(),\n )\n .await?;\n\n let payment_data = &get_tracker_response.payment_data;\n self.validate_status_for_operation(payment_data.payment_intent.status)?;\n\n let payment_attempt = payment_data.payment_attempt.clone();\n\n let connector = payment_attempt\n .connector\n .as_ref()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\n \"connector is not set in payment attempt in finish redirection flow\",\n )?;\n\n // This connector data is ephemeral, the call payment flow will get new connector data\n // with merchant account details, so the connector_id can be safely set to None here\n let connector_data = api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n connector,\n api::GetToken::Connector,\n None,\n )?;\n\n let call_connector_action = connector_data\n .connector\n .get_flow_type(\n &req.query_params,\n req.json_payload.clone(),\n self.get_payment_action(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to decide the response flow\")?;\n\n let (payment_data, _, _, _, _, _) =\n Box::pin(payments_operation_core::(\n state,\n req_state,\n merchant_context,\n &profile,\n operation,\n payment_sync_request,\n get_tracker_response,\n call_connector_action,\n HeaderPayload::default(),\n ))\n .await?;\n\n Ok(router_types::RedirectPaymentFlowResponse {\n payment_data,\n profile,\n })\n }", + "after_code": "async fn call_payment_flow(\n &self,\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n req: PaymentsRedirectResponseData,\n ) -> RouterResult {\n let payment_id = req.payment_id.clone();\n\n let payment_sync_request = api::PaymentsRetrieveRequest {\n param: Some(req.query_params.clone()),\n force_sync: true,\n expand_attempts: false,\n return_raw_connector_response: None,\n merchant_connector_details: None, // TODO: Implement for connectors requiring 3DS or redirection-based authentication flows.\n };\n\n let operation = operations::PaymentGet;\n let boxed_operation: BoxedOperation<\n '_,\n api::PSync,\n api::PaymentsRetrieveRequest,\n PaymentStatusData,\n > = Box::new(operation);\n\n let get_tracker_response = boxed_operation\n .to_get_tracker()?\n .get_trackers(\n state,\n &payment_id,\n &payment_sync_request,\n &merchant_context,\n &profile,\n &HeaderPayload::default(),\n )\n .await?;\n\n let payment_data = &get_tracker_response.payment_data;\n self.validate_status_for_operation(payment_data.payment_intent.status)?;\n\n let payment_attempt = payment_data.payment_attempt.clone();\n\n let connector = payment_attempt\n .connector\n .as_ref()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\n \"connector is not set in payment attempt in finish redirection flow\",\n )?;\n\n // This connector data is ephemeral, the call payment flow will get new connector data\n // with merchant account details, so the connector_id can be safely set to None here\n let connector_data = api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n connector,\n api::GetToken::Connector,\n None,\n )?;\n\n let call_connector_action = connector_data\n .connector\n .get_flow_type(\n &req.query_params,\n req.json_payload.clone(),\n self.get_payment_action(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to decide the response flow\")?;\n\n let (payment_data, _, _, _, _, _) =\n Box::pin(payments_operation_core::(\n state,\n req_state,\n merchant_context,\n &profile,\n operation,\n payment_sync_request,\n get_tracker_response,\n call_connector_action,\n HeaderPayload::default(),\n ))\n .await?;\n\n Ok(router_types::RedirectPaymentFlowResponse {\n payment_data,\n profile,\n })\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::AppState::function::add_flow_name", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn add_flow_name(&mut self, flow_name: String) {\n self.api_client.add_flow_name(flow_name);\n }", + "after_code": "fn add_flow_name(&mut self, flow_name: String) {\n self.api_client.add_flow_name(flow_name);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_mandate_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }", + "after_code": "fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_force_sync", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_force_sync(&self) -> Option {\n self.force_sync\n }", + "after_code": "fn get_force_sync(&self) -> Option {\n self.force_sync\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::ConnectorFilters", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ConnectorFilters(pub HashMap);", + "after_code": "pub struct ConnectorFilters(pub HashMap);", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use diesel_models::enums::PaymentMethod;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use diesel_models::enums::PaymentMethod;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Configs::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(config: AppState) -> Scope {\n web::scope(\"/v2/configs\")\n .app_data(web::Data::new(config))\n .service(web::resource(\"/\").route(web::post().to(config_key_create)))\n .service(\n web::resource(\"/{key}\")\n .route(web::get().to(config_key_retrieve))\n .route(web::post().to(config_key_update))\n .route(web::delete().to(config_key_delete)),\n )\n }", + "after_code": "pub fn server(config: AppState) -> Scope {\n web::scope(\"/v2/configs\")\n .app_data(web::Data::new(config))\n .service(web::resource(\"/\").route(web::post().to(config_key_create)))\n .service(\n web::resource(\"/{key}\")\n .route(web::get().to(config_key_retrieve))\n .route(web::post().to(config_key_update))\n .route(web::delete().to(config_key_delete)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_merchant_connector_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_merchant_connector_id_in_attempt(\n &mut self,\n _merchant_connector_id: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_merchant_connector_id_in_attempt(\n &mut self,\n _merchant_connector_id: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_recurring_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_recurring_details(&self) -> Option<&RecurringDetails> {\n todo!()\n }", + "after_code": "fn get_recurring_details(&self) -> Option<&RecurringDetails> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_mandate_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }", + "after_code": "fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::GenericLinkEnvUiConfig::function::default", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn default() -> Self {\n Self {\n #[allow(clippy::expect_used)]\n logo: url::Url::parse(\"https://hyperswitch.io/favicon.ico\")\n .expect(\"Failed to parse default logo URL\"),\n merchant_name: Secret::new(\"HyperSwitch\".to_string()),\n theme: \"#4285F4\".to_string(),\n }\n }", + "after_code": "fn default() -> Self {\n Self {\n #[allow(clippy::expect_used)]\n logo: url::Url::parse(\"https://hyperswitch.io/favicon.ico\")\n .expect(\"Failed to parse default logo URL\"),\n merchant_name: Secret::new(\"HyperSwitch\".to_string()),\n theme: \"#4285F4\".to_string(),\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::validate_customer_details_for_click_to_pay", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn validate_customer_details_for_click_to_pay(customer_details: &CustomerData) -> RouterResult<()> {\n match (\n customer_details.phone.as_ref(),\n customer_details.phone_country_code.as_ref(),\n customer_details.email.as_ref()\n ) {\n (None, None, Some(_)) => Ok(()),\n (Some(_), Some(_), Some(_)) => Ok(()),\n (Some(_), Some(_), None) => Ok(()),\n (Some(_), None, Some(_)) => Ok(()),\n (None, Some(_), None) => Err(errors::ApiErrorResponse::MissingRequiredField {\n field_name: \"phone\",\n })\n .attach_printable(\"phone number is not present in payment_intent.customer_details\"),\n (Some(_), None, None) => Err(errors::ApiErrorResponse::MissingRequiredField {\n field_name: \"phone_country_code\",\n })\n .attach_printable(\"phone_country_code is not present in payment_intent.customer_details\"),\n (_, _, _) => Err(errors::ApiErrorResponse::MissingRequiredFields {\n field_names: vec![\"phone\", \"phone_country_code\", \"email\"],\n })\n .attach_printable(\"either of phone, phone_country_code or email is not present in payment_intent.customer_details\"),\n }\n}", + "after_code": "fn validate_customer_details_for_click_to_pay(customer_details: &CustomerData) -> RouterResult<()> {\n match (\n customer_details.phone.as_ref(),\n customer_details.phone_country_code.as_ref(),\n customer_details.email.as_ref()\n ) {\n (None, None, Some(_)) => Ok(()),\n (Some(_), Some(_), Some(_)) => Ok(()),\n (Some(_), Some(_), None) => Ok(()),\n (Some(_), None, Some(_)) => Ok(()),\n (None, Some(_), None) => Err(errors::ApiErrorResponse::MissingRequiredField {\n field_name: \"phone\",\n })\n .attach_printable(\"phone number is not present in payment_intent.customer_details\"),\n (Some(_), None, None) => Err(errors::ApiErrorResponse::MissingRequiredField {\n field_name: \"phone_country_code\",\n })\n .attach_printable(\"phone_country_code is not present in payment_intent.customer_details\"),\n (_, _, _) => Err(errors::ApiErrorResponse::MissingRequiredFields {\n field_names: vec![\"phone\", \"phone_country_code\", \"email\"],\n })\n .attach_printable(\"either of phone, phone_country_code or email is not present in payment_intent.customer_details\"),\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::PazeWallet", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "struct PazeWallet;", + "after_code": "struct PazeWallet;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_mandate_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails> {\n todo!()\n }", + "after_code": "fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_authentication_type_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Profile::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/account/{account_id}/business_profile\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\")\n .route(web::post().to(profiles::profile_create))\n .route(web::get().to(profiles::profiles_list)),\n );\n\n #[cfg(feature = \"dynamic_routing\")]\n {\n route = route.service(\n web::scope(\"/{profile_id}/dynamic_routing\")\n .service(\n web::scope(\"/success_based\")\n .service(\n web::resource(\"/toggle\")\n .route(web::post().to(routing::toggle_success_based_routing)),\n )\n .service(\n web::resource(\"/create\")\n .route(web::post().to(routing::create_success_based_routing)),\n )\n .service(web::resource(\"/config/{algorithm_id}\").route(\n web::patch().to(|state, req, path, payload| {\n routing::success_based_routing_update_configs(\n state, req, path, payload,\n )\n }),\n )),\n )\n .service(\n web::resource(\"/set_volume_split\")\n .route(web::post().to(routing::set_dynamic_routing_volume_split)),\n )\n .service(\n web::resource(\"/get_volume_split\")\n .route(web::get().to(routing::get_dynamic_routing_volume_split)),\n )\n .service(\n web::scope(\"/elimination\")\n .service(\n web::resource(\"/toggle\")\n .route(web::post().to(routing::toggle_elimination_routing)),\n )\n .service(\n web::resource(\"/create\")\n .route(web::post().to(routing::create_elimination_routing)),\n )\n .service(web::resource(\"config/{algorithm_id}\").route(\n web::patch().to(|state, req, path, payload| {\n routing::elimination_routing_update_configs(\n state, req, path, payload,\n )\n }),\n )),\n )\n .service(\n web::scope(\"/contracts\")\n .service(web::resource(\"/toggle\").route(\n web::post().to(routing::contract_based_routing_setup_config),\n ))\n .service(web::resource(\"/config/{algorithm_id}\").route(\n web::patch().to(|state, req, path, payload| {\n routing::contract_based_routing_update_configs(\n state, req, path, payload,\n )\n }),\n )),\n ),\n );\n }\n\n route = route.service(\n web::scope(\"/{profile_id}\")\n .service(\n web::resource(\"\")\n .route(web::get().to(profiles::profile_retrieve))\n .route(web::post().to(profiles::profile_update))\n .route(web::delete().to(profiles::profile_delete)),\n )\n .service(\n web::resource(\"/toggle_extended_card_info\")\n .route(web::post().to(profiles::toggle_extended_card_info)),\n )\n .service(\n web::resource(\"/toggle_connector_agnostic_mit\")\n .route(web::post().to(profiles::toggle_connector_agnostic_mit)),\n ),\n );\n\n route\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/account/{account_id}/business_profile\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\")\n .route(web::post().to(profiles::profile_create))\n .route(web::get().to(profiles::profiles_list)),\n );\n\n #[cfg(feature = \"dynamic_routing\")]\n {\n route = route.service(\n web::scope(\"/{profile_id}/dynamic_routing\")\n .service(\n web::scope(\"/success_based\")\n .service(\n web::resource(\"/toggle\")\n .route(web::post().to(routing::toggle_success_based_routing)),\n )\n .service(\n web::resource(\"/create\")\n .route(web::post().to(routing::create_success_based_routing)),\n )\n .service(web::resource(\"/config/{algorithm_id}\").route(\n web::patch().to(|state, req, path, payload| {\n routing::success_based_routing_update_configs(\n state, req, path, payload,\n )\n }),\n )),\n )\n .service(\n web::resource(\"/set_volume_split\")\n .route(web::post().to(routing::set_dynamic_routing_volume_split)),\n )\n .service(\n web::resource(\"/get_volume_split\")\n .route(web::get().to(routing::get_dynamic_routing_volume_split)),\n )\n .service(\n web::scope(\"/elimination\")\n .service(\n web::resource(\"/toggle\")\n .route(web::post().to(routing::toggle_elimination_routing)),\n )\n .service(\n web::resource(\"/create\")\n .route(web::post().to(routing::create_elimination_routing)),\n )\n .service(web::resource(\"config/{algorithm_id}\").route(\n web::patch().to(|state, req, path, payload| {\n routing::elimination_routing_update_configs(\n state, req, path, payload,\n )\n }),\n )),\n )\n .service(\n web::scope(\"/contracts\")\n .service(web::resource(\"/toggle\").route(\n web::post().to(routing::contract_based_routing_setup_config),\n ))\n .service(web::resource(\"/config/{algorithm_id}\").route(\n web::patch().to(|state, req, path, payload| {\n routing::contract_based_routing_update_configs(\n state, req, path, payload,\n )\n }),\n )),\n ),\n );\n }\n\n route = route.service(\n web::scope(\"/{profile_id}\")\n .service(\n web::resource(\"\")\n .route(web::get().to(profiles::profile_retrieve))\n .route(web::post().to(profiles::profile_update))\n .route(web::delete().to(profiles::profile_delete)),\n )\n .service(\n web::resource(\"/toggle_extended_card_info\")\n .route(web::post().to(profiles::toggle_extended_card_info)),\n )\n .service(\n web::resource(\"/toggle_connector_agnostic_mit\")\n .route(web::post().to(profiles::toggle_connector_agnostic_mit)),\n ),\n );\n\n route\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::routing;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use super::routing;" + ] + }, + { + "id": "crates/router/src/core/payments/flows/post_session_tokens_flow.rs::types::RouterData<\n api::PostSessionTokens,\n types::PaymentsPostSessionTokensData,\n types::PaymentsResponseData,\n >::function::decide_flows", + "file": "crates/router/src/core/payments/flows/post_session_tokens_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PostSessionTokens,\n types::PaymentsPostSessionTokensData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n }", + "after_code": "async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PostSessionTokens,\n types::PaymentsPostSessionTokensData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n }", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/configs/settings.rs::struct::OpenRouter", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct OpenRouter {\n pub dynamic_routing_enabled: bool,\n pub static_routing_enabled: bool,\n pub url: String,\n}", + "after_code": "pub struct OpenRouter {\n pub dynamic_routing_enabled: bool,\n pub static_routing_enabled: bool,\n pub url: String,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::call_connector_service_for_external_vault_proxy", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": true, + "before_code": "pub async fn call_connector_service_for_external_vault_proxy(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n business_profile: &domain::Profile,\n return_raw_connector_response: Option,\n) -> RouterResult>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n let stime_connector = Instant::now();\n\n let merchant_connector_account =\n domain::MerchantConnectorAccountTypeDetails::MerchantConnectorAccount(Box::new(\n helpers::get_merchant_connector_account_v2(\n state,\n merchant_context.get_merchant_key_store(),\n connector.merchant_connector_id.as_ref(),\n )\n .await?,\n ));\n operation\n .to_domain()?\n .populate_payment_data(\n state,\n payment_data,\n merchant_context,\n business_profile,\n &connector,\n )\n .await?;\n\n let mut router_data = payment_data\n .construct_router_data(\n state,\n connector.connector.id(),\n merchant_context,\n &None,\n &merchant_connector_account,\n None,\n Some(header_payload.clone()),\n )\n .await?;\n\n // let add_access_token_result = router_data\n // .add_access_token(\n // state,\n // &connector,\n // merchant_context,\n // payment_data.get_creds_identifier(),\n // )\n // .await?;\n\n // router_data = router_data.add_session_token(state, &connector).await?;\n\n // let mut should_continue_further = access_token::update_router_data_with_access_token_result(\n // &add_access_token_result,\n // &mut router_data,\n // &call_connector_action,\n // );\n let should_continue_further = true;\n\n let (connector_request, should_continue_further) = if should_continue_further {\n router_data\n .build_flow_specific_connector_request(state, &connector, call_connector_action.clone())\n .await?\n } else {\n (None, false)\n };\n\n (_, *payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data.clone(),\n None,\n merchant_context.get_merchant_account().storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n None,\n header_payload.clone(),\n )\n .await?;\n\n let router_data = if should_continue_further {\n router_data\n .decide_flows(\n state,\n &connector,\n call_connector_action,\n connector_request,\n business_profile,\n header_payload.clone(),\n return_raw_connector_response,\n )\n .await\n } else {\n Ok(router_data)\n }?;\n\n let etime_connector = Instant::now();\n let duration_connector = etime_connector.saturating_duration_since(stime_connector);\n tracing::info!(duration = format!(\"Duration taken: {}\", duration_connector.as_millis()));\n\n Ok(router_data)\n}", + "after_code": "pub async fn call_connector_service_for_external_vault_proxy(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n business_profile: &domain::Profile,\n return_raw_connector_response: Option,\n) -> RouterResult>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n let stime_connector = Instant::now();\n\n let merchant_connector_account =\n domain::MerchantConnectorAccountTypeDetails::MerchantConnectorAccount(Box::new(\n helpers::get_merchant_connector_account_v2(\n state,\n merchant_context.get_merchant_key_store(),\n connector.merchant_connector_id.as_ref(),\n )\n .await?,\n ));\n operation\n .to_domain()?\n .populate_payment_data(\n state,\n payment_data,\n merchant_context,\n business_profile,\n &connector,\n )\n .await?;\n\n let mut router_data = payment_data\n .construct_router_data(\n state,\n connector.connector.id(),\n merchant_context,\n &None,\n &merchant_connector_account,\n None,\n Some(header_payload.clone()),\n )\n .await?;\n\n // let add_access_token_result = router_data\n // .add_access_token(\n // state,\n // &connector,\n // merchant_context,\n // payment_data.get_creds_identifier(),\n // )\n // .await?;\n\n // router_data = router_data.add_session_token(state, &connector).await?;\n\n // let mut should_continue_further = access_token::update_router_data_with_access_token_result(\n // &add_access_token_result,\n // &mut router_data,\n // &call_connector_action,\n // );\n let should_continue_further = true;\n\n let (connector_request, should_continue_further) = if should_continue_further {\n router_data\n .build_flow_specific_connector_request(state, &connector, call_connector_action.clone())\n .await?\n } else {\n (None, false)\n };\n\n (_, *payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data.clone(),\n None,\n merchant_context.get_merchant_account().storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n None,\n header_payload.clone(),\n )\n .await?;\n\n let router_data = if should_continue_further {\n router_data\n .decide_flows(\n state,\n &connector,\n call_connector_action,\n connector_request,\n business_profile,\n header_payload.clone(),\n return_raw_connector_response,\n None,\n )\n .await\n } else {\n Ok(router_data)\n }?;\n\n let etime_connector = Instant::now();\n let duration_connector = etime_connector.saturating_duration_since(stime_connector);\n tracing::info!(duration = format!(\"Duration taken: {}\", duration_connector.as_millis()));\n\n Ok(router_data)\n}", + "diff_span": { + "before": "", + "after": " header_payload.clone(),\n return_raw_connector_response,\n None,\n )\n .await" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use router_env::{instrument, tracing};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use router_env::{instrument, tracing};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_amount", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_amount(&self) -> api::Amount {\n todo!()\n }", + "after_code": "fn get_amount(&self) -> api::Amount {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/psync_flow.rs::types::RouterData::function::add_access_token", + "file": "crates/router/src/core/payments/flows/psync_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }", + "after_code": "async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n};" + ], + "after_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::{\n api::gateway,\n unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n },\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Hypersense::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/hypersense\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/token\")\n .route(web::get().to(hypersense_routes::get_hypersense_token)),\n )\n .service(\n web::resource(\"/verify_token\")\n .route(web::post().to(hypersense_routes::verify_hypersense_token)),\n )\n .service(\n web::resource(\"/signout\")\n .route(web::post().to(hypersense_routes::signout_hypersense_token)),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/hypersense\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/token\")\n .route(web::get().to(hypersense_routes::get_hypersense_token)),\n )\n .service(\n web::resource(\"/verify_token\")\n .route(web::post().to(hypersense_routes::verify_hypersense_token)),\n )\n .service(\n web::resource(\"/signout\")\n .route(web::post().to(hypersense_routes::signout_hypersense_token)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::MerchantConnectorAccount::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/account\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n use super::admin::*;\n\n route = route\n .service(\n web::resource(\"/connectors/verify\")\n .route(web::post().to(super::verify_connector::payment_connector_verify)),\n )\n .service(\n web::resource(\"/{merchant_id}/connectors\")\n .route(web::post().to(connector_create))\n .route(web::get().to(connector_list)),\n )\n .service(\n web::resource(\"/{merchant_id}/connectors/{merchant_connector_id}\")\n .route(web::get().to(connector_retrieve))\n .route(web::post().to(connector_update))\n .route(web::delete().to(connector_delete)),\n );\n }\n #[cfg(feature = \"oltp\")]\n {\n route = route.service(\n web::resource(\"/payment_methods\")\n .route(web::get().to(payment_methods::list_payment_method_api)),\n );\n }\n route\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/account\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n use super::admin::*;\n\n route = route\n .service(\n web::resource(\"/connectors/verify\")\n .route(web::post().to(super::verify_connector::payment_connector_verify)),\n )\n .service(\n web::resource(\"/{merchant_id}/connectors\")\n .route(web::post().to(connector_create))\n .route(web::get().to(connector_list)),\n )\n .service(\n web::resource(\"/{merchant_id}/connectors/{merchant_connector_id}\")\n .route(web::get().to(connector_retrieve))\n .route(web::post().to(connector_update))\n .route(web::delete().to(connector_delete)),\n );\n }\n #[cfg(feature = \"oltp\")]\n {\n route = route.service(\n web::resource(\"/payment_methods\")\n .route(web::get().to(payment_methods::list_payment_method_api)),\n );\n }\n route\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::dummy_connector::*;", + "use super::payout_link::*;", + "use super::payouts::*;", + "use super::admin::*;", + "use actix_web::{web, Scope};", + "use super::recovery_webhooks::*;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::webhooks::*;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use super::payment_methods;", + "use super::ephemeral_key::*;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use super::dummy_connector::*;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use super::payout_link::*;", + "use super::payouts::*;", + "use super::admin::*;", + "use actix_web::{web, Scope};", + "use super::recovery_webhooks::*;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::webhooks::*;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use super::payment_methods;", + "use super::ephemeral_key::*;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_capture_method_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_capture_method_in_attempt(&mut self, capture_method: enums::CaptureMethod) {\n self.payment_attempt.capture_method = Some(capture_method);\n }", + "after_code": "fn set_capture_method_in_attempt(&mut self, capture_method: enums::CaptureMethod) {\n self.payment_attempt.capture_method = Some(capture_method);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::Jwekey", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Jwekey {\n pub vault_encryption_key: Secret,\n pub rust_locker_encryption_key: Secret,\n pub vault_private_key: Secret,\n pub tunnel_private_key: Secret,\n}", + "after_code": "pub struct Jwekey {\n pub vault_encryption_key: Secret,\n pub rust_locker_encryption_key: Secret,\n pub vault_private_key: Secret,\n pub tunnel_private_key: Secret,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_payment_method_info", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod> {\n self.payment_method_info.as_ref()\n }", + "after_code": "fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod> {\n self.payment_method_info.as_ref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::function::deserialize_merchant_ids_inner", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn deserialize_merchant_ids_inner(\n value: impl AsRef,\n) -> Result, String> {\n let (values, errors) = value\n .as_ref()\n .trim()\n .split(',')\n .map(|s| {\n let trimmed = s.trim();\n id_type::MerchantId::wrap(trimmed.to_owned()).map_err(|error| {\n format!(\"Unable to deserialize `{trimmed}` as `MerchantId`: {error}\")\n })\n })\n .fold(\n (HashSet::new(), Vec::new()),\n |(mut values, mut errors), result| match result {\n Ok(t) => {\n values.insert(t);\n (values, errors)\n }\n Err(error) => {\n errors.push(error);\n (values, errors)\n }\n },\n );\n\n if !errors.is_empty() {\n Err(format!(\"Some errors occurred:\\n{}\", errors.join(\"\\n\")))\n } else {\n Ok(values)\n }\n}", + "after_code": "fn deserialize_merchant_ids_inner(\n value: impl AsRef,\n) -> Result, String> {\n let (values, errors) = value\n .as_ref()\n .trim()\n .split(',')\n .map(|s| {\n let trimmed = s.trim();\n id_type::MerchantId::wrap(trimmed.to_owned()).map_err(|error| {\n format!(\"Unable to deserialize `{trimmed}` as `MerchantId`: {error}\")\n })\n })\n .fold(\n (HashSet::new(), Vec::new()),\n |(mut values, mut errors), result| match result {\n Ok(t) => {\n values.insert(t);\n (values, errors)\n }\n Err(error) => {\n errors.push(error);\n (values, errors)\n }\n },\n );\n\n if !errors.is_empty() {\n Err(format!(\"Some errors occurred:\\n{}\", errors.join(\"\\n\")))\n } else {\n Ok(values)\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::{HashMap, HashSet};", + "use std::collections::HashSet;" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_connector_in_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_in_payment_attempt(&mut self, connector: Option) {\n self.payment_attempt.connector = connector;\n }", + "after_code": "fn set_connector_in_payment_attempt(&mut self, connector: Option) {\n self.payment_attempt.connector = connector;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_recurring_mandate_payment_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }", + "after_code": "fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_merchant_connector_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_merchant_connector_id_in_attempt(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_merchant_connector_id_in_attempt(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_payment_method_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData> {\n todo!()\n }", + "after_code": "fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_connector_in_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_in_payment_attempt(&mut self, connector: Option) {\n self.payment_attempt.connector = connector;\n }", + "after_code": "fn set_connector_in_payment_attempt(&mut self, connector: Option) {\n self.payment_attempt.connector = connector;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_connector_data_with_routing_decision", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_connector_data_with_routing_decision(\n connectors: &mut IntoIter,\n business_profile: &domain::Profile,\n debit_routing_output_optional: Option,\n) -> RouterResult<(\n api::ConnectorData,\n Option,\n)> {\n if business_profile.is_debit_routing_enabled && debit_routing_output_optional.is_some() {\n if let Some((data, card_network)) = get_connector_with_networks(connectors) {\n let debit_routing_output =\n debit_routing_output_optional.get_required_value(\"debit routing output\")?;\n let routing_decision =\n routing_helpers::RoutingDecisionData::get_debit_routing_decision_data(\n card_network,\n Some(debit_routing_output),\n );\n return Ok((data, Some(routing_decision)));\n }\n }\n\n Ok((get_connector_data(connectors)?.connector_data, None))\n}", + "after_code": "fn get_connector_data_with_routing_decision(\n connectors: &mut IntoIter,\n business_profile: &domain::Profile,\n debit_routing_output_optional: Option,\n) -> RouterResult<(\n api::ConnectorData,\n Option,\n)> {\n if business_profile.is_debit_routing_enabled && debit_routing_output_optional.is_some() {\n if let Some((data, card_network)) = get_connector_with_networks(connectors) {\n let debit_routing_output =\n debit_routing_output_optional.get_required_value(\"debit routing output\")?;\n let routing_decision =\n routing_helpers::RoutingDecisionData::get_debit_routing_decision_data(\n card_network,\n Some(debit_routing_output),\n );\n return Ok((data, Some(routing_decision)));\n }\n }\n\n Ok((get_connector_data(connectors)?.connector_data, None))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::PaymentAuthenticateCompleteAuthorize", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PaymentAuthenticateCompleteAuthorize;", + "after_code": "pub struct PaymentAuthenticateCompleteAuthorize;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_connector_customer_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_customer_id(&mut self, customer_id: Option) {\n self.connector_customer_id = customer_id;\n }", + "after_code": "fn set_connector_customer_id(&mut self, customer_id: Option) {\n self.connector_customer_id = customer_id;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Proxy::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/proxy\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(proxy::proxy)))\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/proxy\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(proxy::proxy)))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::proxy;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::proxy;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_intent(&self) -> &storage::PaymentIntent {\n &self.payment_intent\n }", + "after_code": "fn get_payment_intent(&self) -> &storage::PaymentIntent {\n &self.payment_intent\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Authentication", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Authentication;", + "after_code": "pub struct Authentication;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_address", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_address(&self) -> &PaymentAddress {\n todo!()\n }", + "after_code": "fn get_address(&self) -> &PaymentAddress {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::mod::retry", + "file": "crates/router/src/core/payments.rs", + "kind": "mod_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub mod retry;", + "after_code": "pub mod retry;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::CorsSettings", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct CorsSettings {\n #[serde(default, deserialize_with = \"deserialize_hashset\")]\n pub origins: HashSet,\n #[serde(default)]\n pub wildcard_origin: bool,\n pub max_age: usize,\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub allowed_methods: HashSet,\n}", + "after_code": "pub struct CorsSettings {\n #[serde(default, deserialize_with = \"deserialize_hashset\")]\n pub origins: HashSet,\n #[serde(default)]\n pub wildcard_origin: bool,\n pub max_age: usize,\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub allowed_methods: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use super::deserialize_hashset;", + "use std::collections::{HashMap, HashSet};", + "use std::collections::HashSet;" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::TenantConfig::function::get_pools_map", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn get_pools_map(\n &self,\n analytics_config: &AnalyticsConfig,\n ) -> HashMap {\n futures::future::join_all(self.0.iter().map(|(tenant_name, tenant)| async {\n (\n tenant_name.clone(),\n AnalyticsProvider::from_conf(analytics_config, tenant).await,\n )\n }))\n .await\n .into_iter()\n .collect()\n }", + "after_code": "pub async fn get_pools_map(\n &self,\n analytics_config: &AnalyticsConfig,\n ) -> HashMap {\n futures::future::join_all(self.0.iter().map(|(tenant_name, tenant)| async {\n (\n tenant_name.clone(),\n AnalyticsProvider::from_conf(analytics_config, tenant).await,\n )\n }))\n .await\n .into_iter()\n .collect()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use crate::analytics::{AnalyticsConfig, AnalyticsProvider};", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "use crate::analytics::{AnalyticsConfig, AnalyticsProvider};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::reset_process_sync_task", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn reset_process_sync_task(\n db: &dyn StorageInterface,\n payment_attempt: &storage::PaymentAttempt,\n schedule_time: time::PrimitiveDateTime,\n) -> Result<(), errors::ProcessTrackerError> {\n let runner = storage::ProcessTrackerRunner::PaymentsSyncWorkflow;\n let task = \"PAYMENTS_SYNC\";\n let process_tracker_id = pt_utils::get_process_tracker_id(\n runner,\n task,\n payment_attempt.get_id(),\n &payment_attempt.merchant_id,\n );\n let psync_process = db\n .find_process_by_id(&process_tracker_id)\n .await?\n .ok_or(errors::ProcessTrackerError::ProcessFetchingFailed)?;\n db.as_scheduler()\n .reset_process(psync_process, schedule_time)\n .await?;\n Ok(())\n}", + "after_code": "pub async fn reset_process_sync_task(\n db: &dyn StorageInterface,\n payment_attempt: &storage::PaymentAttempt,\n schedule_time: time::PrimitiveDateTime,\n) -> Result<(), errors::ProcessTrackerError> {\n let runner = storage::ProcessTrackerRunner::PaymentsSyncWorkflow;\n let task = \"PAYMENTS_SYNC\";\n let process_tracker_id = pt_utils::get_process_tracker_id(\n runner,\n task,\n payment_attempt.get_id(),\n &payment_attempt.merchant_id,\n );\n let psync_process = db\n .find_process_by_id(&process_tracker_id)\n .await?\n .ok_or(errors::ProcessTrackerError::ProcessFetchingFailed)?;\n db.as_scheduler()\n .reset_process(psync_process, schedule_time)\n .await?;\n Ok(())\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::Settings::function::new", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn new() -> ApplicationResult {\n Self::with_config_path(None)\n }", + "after_code": "pub fn new() -> ApplicationResult {\n Self::with_config_path(None)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Hypersense", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Hypersense;", + "after_code": "pub struct Hypersense;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_recurring_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_recurring_details(&self) -> Option<&RecurringDetails> {\n todo!()\n }", + "after_code": "fn get_recurring_details(&self) -> Option<&RecurringDetails> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_pre_routing_result", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_pre_routing_result(\n &self,\n ) -> Option> {\n None\n }", + "after_code": "fn get_pre_routing_result(\n &self,\n ) -> Option> {\n None\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::PaymentMethodSession", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PaymentMethodSession;", + "after_code": "pub struct PaymentMethodSession;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::PaymentLink::function::default", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn default() -> Self {\n Self {\n #[allow(clippy::expect_used)]\n sdk_url: url::Url::parse(\"https://beta.hyperswitch.io/v0/HyperLoader.js\")\n .expect(\"Failed to parse default SDK URL\"),\n }\n }", + "after_code": "fn default() -> Self {\n Self {\n #[allow(clippy::expect_used)]\n sdk_url: url::Url::parse(\"https://beta.hyperswitch.io/v0/HyperLoader.js\")\n .expect(\"Failed to parse default SDK URL\"),\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_token(&self) -> Option<&str> {\n todo!()\n }", + "after_code": "fn get_token(&self) -> Option<&str> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_connector_request_reference_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_request_reference_id(&mut self, reference_id: Option) {\n todo!()\n }", + "after_code": "fn set_connector_request_reference_id(&mut self, reference_id: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::PayoutLink::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/payout_link\").app_data(web::Data::new(state));\n route = route.service(\n web::resource(\"/{merchant_id}/{payout_id}\").route(web::get().to(render_payout_link)),\n );\n route\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/payout_link\").app_data(web::Data::new(state));\n route = route.service(\n web::resource(\"/{merchant_id}/{payout_id}\").route(web::get().to(render_payout_link)),\n );\n route\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::ProcessTrackerDeprecated", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl ProcessTrackerDeprecated {\n pub fn server(state: AppState) -> Scope {\n use super::process_tracker::revenue_recovery;\n // TODO: Deprecated. Remove this in favour of /v2/process-trackers\n web::scope(\"/v2/process_tracker/revenue_recovery_workflow\")\n .app_data(web::Data::new(state.clone()))\n .service(\n web::resource(\"/{revenue_recovery_id}\")\n .route(web::get().to(revenue_recovery::revenue_recovery_pt_retrieve_api)),\n )\n }\n}", + "after_code": "impl ProcessTrackerDeprecated {\n pub fn server(state: AppState) -> Scope {\n use super::process_tracker::revenue_recovery;\n // TODO: Deprecated. Remove this in favour of /v2/process-trackers\n web::scope(\"/v2/process_tracker/revenue_recovery_workflow\")\n .app_data(web::Data::new(state.clone()))\n .service(\n web::resource(\"/{revenue_recovery_id}\")\n .route(web::get().to(revenue_recovery::revenue_recovery_pt_retrieve_api)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::process_tracker::revenue_recovery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::process_tracker::revenue_recovery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_disputes", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_disputes(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_disputes(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_force_sync", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_force_sync(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_force_sync(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::enum::IsNtWithNtiFlow", + "file": "crates/router/src/core/payments.rs", + "kind": "enum_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub enum IsNtWithNtiFlow {\n NtWithNtiSupported(String), //Network token with Network transaction id supported flow\n NTWithNTINotSupported, //Network token with Network transaction id not supported\n}", + "after_code": "pub enum IsNtWithNtiFlow {\n NtWithNtiSupported(String), //Network token with Network transaction id supported flow\n NTWithNTINotSupported, //Network token with Network transaction id not supported\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_prerouting_algorithm_in_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n prerouting_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(prerouting_algorithm);\n }", + "after_code": "fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n prerouting_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(prerouting_algorithm);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::RecoveryDataBackfill::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/recovery/data-backfill\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\").route(\n web::post()\n .to(super::revenue_recovery_data_backfill::revenue_recovery_data_backfill),\n ),\n )\n .service(web::resource(\"/status/{token_id}\").route(\n web::post().to(\n super::revenue_recovery_data_backfill::revenue_recovery_data_backfill_status,\n ),\n ))\n .service(web::resource(\"/redis-data/{token_id}\").route(\n web::get().to(\n super::revenue_recovery_redis::get_revenue_recovery_redis_data,\n ),\n ))\n .service(web::resource(\"/update-token\").route(\n web::put().to(\n super::revenue_recovery_data_backfill::update_revenue_recovery_additional_redis_data,\n ),\n ))\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/recovery/data-backfill\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\").route(\n web::post()\n .to(super::revenue_recovery_data_backfill::revenue_recovery_data_backfill),\n ),\n )\n .service(web::resource(\"/status/{token_id}\").route(\n web::post().to(\n super::revenue_recovery_data_backfill::revenue_recovery_data_backfill_status,\n ),\n ))\n .service(web::resource(\"/redis-data/{token_id}\").route(\n web::get().to(\n super::revenue_recovery_redis::get_revenue_recovery_redis_data,\n ),\n ))\n .service(web::resource(\"/update-token\").route(\n web::put().to(\n super::revenue_recovery_data_backfill::update_revenue_recovery_additional_redis_data,\n ),\n ))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::process_tracker::revenue_recovery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::process_tracker::revenue_recovery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::&PaymentRedirectSync::function::validate_status_for_operation", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn validate_status_for_operation(\n &self,\n intent_status: common_enums::IntentStatus,\n ) -> Result<(), errors::ApiErrorResponse> {\n match intent_status {\n common_enums::IntentStatus::RequiresCustomerAction => Ok(()),\n common_enums::IntentStatus::Succeeded\n | common_enums::IntentStatus::Conflicted\n | common_enums::IntentStatus::Failed\n | common_enums::IntentStatus::Cancelled\n | common_enums::IntentStatus::CancelledPostCapture\n | common_enums::IntentStatus::Processing\n | common_enums::IntentStatus::RequiresPaymentMethod\n | common_enums::IntentStatus::RequiresMerchantAction\n | common_enums::IntentStatus::RequiresCapture\n | common_enums::IntentStatus::PartiallyAuthorizedAndRequiresCapture\n | common_enums::IntentStatus::PartiallyCaptured\n | common_enums::IntentStatus::RequiresConfirmation\n | common_enums::IntentStatus::PartiallyCapturedAndCapturable\n | common_enums::IntentStatus::Expired => {\n Err(errors::ApiErrorResponse::PaymentUnexpectedState {\n current_flow: format!(\"{self:?}\"),\n field_name: \"status\".to_string(),\n current_value: intent_status.to_string(),\n states: [\"requires_customer_action\".to_string()].join(\", \"),\n })\n }\n }\n }", + "after_code": "fn validate_status_for_operation(\n &self,\n intent_status: common_enums::IntentStatus,\n ) -> Result<(), errors::ApiErrorResponse> {\n match intent_status {\n common_enums::IntentStatus::RequiresCustomerAction => Ok(()),\n common_enums::IntentStatus::Succeeded\n | common_enums::IntentStatus::Conflicted\n | common_enums::IntentStatus::Failed\n | common_enums::IntentStatus::Cancelled\n | common_enums::IntentStatus::CancelledPostCapture\n | common_enums::IntentStatus::Processing\n | common_enums::IntentStatus::RequiresPaymentMethod\n | common_enums::IntentStatus::RequiresMerchantAction\n | common_enums::IntentStatus::RequiresCapture\n | common_enums::IntentStatus::PartiallyAuthorizedAndRequiresCapture\n | common_enums::IntentStatus::PartiallyCaptured\n | common_enums::IntentStatus::RequiresConfirmation\n | common_enums::IntentStatus::PartiallyCapturedAndCapturable\n | common_enums::IntentStatus::Expired => {\n Err(errors::ApiErrorResponse::PaymentUnexpectedState {\n current_flow: format!(\"{self:?}\"),\n field_name: \"status\".to_string(),\n current_value: intent_status.to_string(),\n states: [\"requires_customer_action\".to_string()].join(\", \"),\n })\n }\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::ActionTypesBuilder::function::with_network_tokenization", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn with_network_tokenization(\n mut self,\n state: &SessionState,\n is_network_token_with_ntid_flow: IsNtWithNtiFlow,\n is_nt_with_ntid_supported_connector: bool,\n payment_method_info: &domain::PaymentMethod,\n ) -> Self {\n match is_network_token_with_ntid_flow {\n IsNtWithNtiFlow::NtWithNtiSupported(network_transaction_id)\n if is_nt_with_ntid_supported_connector =>\n {\n self.action_types.extend(\n network_tokenization::do_status_check_for_network_token(\n state,\n payment_method_info,\n )\n .await\n .inspect_err(|e| {\n logger::error!(\"Status check for network token failed: {:?}\", e)\n })\n .ok()\n .map(|(token_exp_month, token_exp_year)| {\n ActionType::NetworkTokenWithNetworkTransactionId(NTWithNTIRef {\n token_exp_month,\n token_exp_year,\n network_transaction_id,\n })\n }),\n );\n }\n _ => (),\n }\n self\n }", + "after_code": "pub async fn with_network_tokenization(\n mut self,\n state: &SessionState,\n is_network_token_with_ntid_flow: IsNtWithNtiFlow,\n is_nt_with_ntid_supported_connector: bool,\n payment_method_info: &domain::PaymentMethod,\n ) -> Self {\n match is_network_token_with_ntid_flow {\n IsNtWithNtiFlow::NtWithNtiSupported(network_transaction_id)\n if is_nt_with_ntid_supported_connector =>\n {\n self.action_types.extend(\n network_tokenization::do_status_check_for_network_token(\n state,\n payment_method_info,\n )\n .await\n .inspect_err(|e| {\n logger::error!(\"Status check for network token failed: {:?}\", e)\n })\n .ok()\n .map(|(token_exp_month, token_exp_year)| {\n ActionType::NetworkTokenWithNetworkTransactionId(NTWithNTIRef {\n token_exp_month,\n token_exp_year,\n network_transaction_id,\n })\n }),\n );\n }\n _ => (),\n }\n self\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Routing::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n #[allow(unused_mut)]\n let mut route = web::scope(\"/routing\")\n .app_data(web::Data::new(state.clone()))\n .service(\n web::resource(\"/active\").route(web::get().to(|state, req, query_params| {\n routing::routing_retrieve_linked_config(state, req, query_params, None)\n })),\n )\n .service(\n web::resource(\"\")\n .route(\n web::get().to(|state, req, path: web::Query| {\n routing::list_routing_configs(state, req, path, None)\n }),\n )\n .route(web::post().to(|state, req, payload| {\n routing::routing_create_config(state, req, payload, None)\n })),\n )\n .service(web::resource(\"/list/profile\").route(web::get().to(\n |state, req, query: web::Query| {\n routing::list_routing_configs_for_profile(state, req, query, None)\n },\n )))\n .service(\n web::resource(\"/default\").route(web::post().to(|state, req, payload| {\n routing::routing_update_default_config(\n state,\n req,\n payload,\n &TransactionType::Payment,\n )\n })),\n )\n .service(web::resource(\"/rule/migrate\").route(web::post().to(\n |state, req, query: web::Query| {\n routing::migrate_routing_rules_for_profile(state, req, query)\n },\n )))\n .service(\n web::resource(\"/deactivate\").route(web::post().to(|state, req, payload| {\n routing::routing_unlink_config(state, req, payload, None)\n })),\n )\n .service(\n web::resource(\"/decision\")\n .route(web::put().to(routing::upsert_decision_manager_config))\n .route(web::get().to(routing::retrieve_decision_manager_config))\n .route(web::delete().to(routing::delete_decision_manager_config)),\n )\n .service(\n web::resource(\"/decision/surcharge\")\n .route(web::put().to(routing::upsert_surcharge_decision_manager_config))\n .route(web::get().to(routing::retrieve_surcharge_decision_manager_config))\n .route(web::delete().to(routing::delete_surcharge_decision_manager_config)),\n )\n .service(\n web::resource(\"/default/profile/{profile_id}\").route(web::post().to(\n |state, req, path, payload| {\n routing::routing_update_default_config_for_profile(\n state,\n req,\n path,\n payload,\n &TransactionType::Payment,\n )\n },\n )),\n )\n .service(\n web::resource(\"/default/profile\").route(web::get().to(|state, req| {\n routing::routing_retrieve_default_config(state, req, &TransactionType::Payment)\n })),\n );\n\n #[cfg(feature = \"dynamic_routing\")]\n {\n route = route\n .service(\n web::resource(\"/evaluate\")\n .route(web::post().to(routing::call_decide_gateway_open_router)),\n )\n .service(\n web::resource(\"/feedback\")\n .route(web::post().to(routing::call_update_gateway_score_open_router)),\n )\n }\n\n #[cfg(feature = \"payouts\")]\n {\n route = route\n .service(\n web::resource(\"/payouts\")\n .route(web::get().to(\n |state, req, path: web::Query| {\n routing::list_routing_configs(\n state,\n req,\n path,\n Some(TransactionType::Payout),\n )\n },\n ))\n .route(web::post().to(|state, req, payload| {\n routing::routing_create_config(\n state,\n req,\n payload,\n Some(TransactionType::Payout),\n )\n })),\n )\n .service(web::resource(\"/payouts/list/profile\").route(web::get().to(\n |state, req, query: web::Query| {\n routing::list_routing_configs_for_profile(\n state,\n req,\n query,\n Some(TransactionType::Payout),\n )\n },\n )))\n .service(web::resource(\"/payouts/active\").route(web::get().to(\n |state, req, query_params| {\n routing::routing_retrieve_linked_config(\n state,\n req,\n query_params,\n Some(TransactionType::Payout),\n )\n },\n )))\n .service(\n web::resource(\"/payouts/default\")\n .route(web::get().to(|state, req| {\n routing::routing_retrieve_default_config(\n state,\n req,\n &TransactionType::Payout,\n )\n }))\n .route(web::post().to(|state, req, payload| {\n routing::routing_update_default_config(\n state,\n req,\n payload,\n &TransactionType::Payout,\n )\n })),\n )\n .service(\n web::resource(\"/payouts/{algorithm_id}/activate\").route(web::post().to(\n |state, req, path, payload| {\n routing::routing_link_config(\n state,\n req,\n path,\n payload,\n Some(TransactionType::Payout),\n )\n },\n )),\n )\n .service(web::resource(\"/payouts/deactivate\").route(web::post().to(\n |state, req, payload| {\n routing::routing_unlink_config(\n state,\n req,\n payload,\n Some(TransactionType::Payout),\n )\n },\n )))\n .service(\n web::resource(\"/payouts/default/profile/{profile_id}\").route(web::post().to(\n |state, req, path, payload| {\n routing::routing_update_default_config_for_profile(\n state,\n req,\n path,\n payload,\n &TransactionType::Payout,\n )\n },\n )),\n )\n .service(\n web::resource(\"/payouts/default/profile\").route(web::get().to(|state, req| {\n routing::routing_retrieve_default_config_for_profiles(\n state,\n req,\n &TransactionType::Payout,\n )\n })),\n );\n }\n\n route = route\n .service(\n web::resource(\"/{algorithm_id}\")\n .route(web::get().to(routing::routing_retrieve_config)),\n )\n .service(\n web::resource(\"/{algorithm_id}/activate\").route(web::post().to(\n |state, req, payload, path| {\n routing::routing_link_config(state, req, path, payload, None)\n },\n )),\n )\n .service(\n web::resource(\"/rule/evaluate\")\n .route(web::post().to(routing::evaluate_routing_rule)),\n );\n route\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n #[allow(unused_mut)]\n let mut route = web::scope(\"/routing\")\n .app_data(web::Data::new(state.clone()))\n .service(\n web::resource(\"/active\").route(web::get().to(|state, req, query_params| {\n routing::routing_retrieve_linked_config(state, req, query_params, None)\n })),\n )\n .service(\n web::resource(\"\")\n .route(\n web::get().to(|state, req, path: web::Query| {\n routing::list_routing_configs(state, req, path, None)\n }),\n )\n .route(web::post().to(|state, req, payload| {\n routing::routing_create_config(state, req, payload, None)\n })),\n )\n .service(web::resource(\"/list/profile\").route(web::get().to(\n |state, req, query: web::Query| {\n routing::list_routing_configs_for_profile(state, req, query, None)\n },\n )))\n .service(\n web::resource(\"/default\").route(web::post().to(|state, req, payload| {\n routing::routing_update_default_config(\n state,\n req,\n payload,\n &TransactionType::Payment,\n )\n })),\n )\n .service(web::resource(\"/rule/migrate\").route(web::post().to(\n |state, req, query: web::Query| {\n routing::migrate_routing_rules_for_profile(state, req, query)\n },\n )))\n .service(\n web::resource(\"/deactivate\").route(web::post().to(|state, req, payload| {\n routing::routing_unlink_config(state, req, payload, None)\n })),\n )\n .service(\n web::resource(\"/decision\")\n .route(web::put().to(routing::upsert_decision_manager_config))\n .route(web::get().to(routing::retrieve_decision_manager_config))\n .route(web::delete().to(routing::delete_decision_manager_config)),\n )\n .service(\n web::resource(\"/decision/surcharge\")\n .route(web::put().to(routing::upsert_surcharge_decision_manager_config))\n .route(web::get().to(routing::retrieve_surcharge_decision_manager_config))\n .route(web::delete().to(routing::delete_surcharge_decision_manager_config)),\n )\n .service(\n web::resource(\"/default/profile/{profile_id}\").route(web::post().to(\n |state, req, path, payload| {\n routing::routing_update_default_config_for_profile(\n state,\n req,\n path,\n payload,\n &TransactionType::Payment,\n )\n },\n )),\n )\n .service(\n web::resource(\"/default/profile\").route(web::get().to(|state, req| {\n routing::routing_retrieve_default_config(state, req, &TransactionType::Payment)\n })),\n );\n\n #[cfg(feature = \"dynamic_routing\")]\n {\n route = route\n .service(\n web::resource(\"/evaluate\")\n .route(web::post().to(routing::call_decide_gateway_open_router)),\n )\n .service(\n web::resource(\"/feedback\")\n .route(web::post().to(routing::call_update_gateway_score_open_router)),\n )\n }\n\n #[cfg(feature = \"payouts\")]\n {\n route = route\n .service(\n web::resource(\"/payouts\")\n .route(web::get().to(\n |state, req, path: web::Query| {\n routing::list_routing_configs(\n state,\n req,\n path,\n Some(TransactionType::Payout),\n )\n },\n ))\n .route(web::post().to(|state, req, payload| {\n routing::routing_create_config(\n state,\n req,\n payload,\n Some(TransactionType::Payout),\n )\n })),\n )\n .service(web::resource(\"/payouts/list/profile\").route(web::get().to(\n |state, req, query: web::Query| {\n routing::list_routing_configs_for_profile(\n state,\n req,\n query,\n Some(TransactionType::Payout),\n )\n },\n )))\n .service(web::resource(\"/payouts/active\").route(web::get().to(\n |state, req, query_params| {\n routing::routing_retrieve_linked_config(\n state,\n req,\n query_params,\n Some(TransactionType::Payout),\n )\n },\n )))\n .service(\n web::resource(\"/payouts/default\")\n .route(web::get().to(|state, req| {\n routing::routing_retrieve_default_config(\n state,\n req,\n &TransactionType::Payout,\n )\n }))\n .route(web::post().to(|state, req, payload| {\n routing::routing_update_default_config(\n state,\n req,\n payload,\n &TransactionType::Payout,\n )\n })),\n )\n .service(\n web::resource(\"/payouts/{algorithm_id}/activate\").route(web::post().to(\n |state, req, path, payload| {\n routing::routing_link_config(\n state,\n req,\n path,\n payload,\n Some(TransactionType::Payout),\n )\n },\n )),\n )\n .service(web::resource(\"/payouts/deactivate\").route(web::post().to(\n |state, req, payload| {\n routing::routing_unlink_config(\n state,\n req,\n payload,\n Some(TransactionType::Payout),\n )\n },\n )))\n .service(\n web::resource(\"/payouts/default/profile/{profile_id}\").route(web::post().to(\n |state, req, path, payload| {\n routing::routing_update_default_config_for_profile(\n state,\n req,\n path,\n payload,\n &TransactionType::Payout,\n )\n },\n )),\n )\n .service(\n web::resource(\"/payouts/default/profile\").route(web::get().to(|state, req| {\n routing::routing_retrieve_default_config_for_profiles(\n state,\n req,\n &TransactionType::Payout,\n )\n })),\n );\n }\n\n route = route\n .service(\n web::resource(\"/{algorithm_id}\")\n .route(web::get().to(routing::routing_retrieve_config)),\n )\n .service(\n web::resource(\"/{algorithm_id}/activate\").route(web::post().to(\n |state, req, payload, path| {\n routing::routing_link_config(state, req, path, payload, None)\n },\n )),\n )\n .service(\n web::resource(\"/rule/evaluate\")\n .route(web::post().to(routing::evaluate_routing_rule)),\n );\n route\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use api_models::routing::RoutingRetrieveQuery;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use api_models::routing::RuleMigrationQuery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::routing;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};", + "use common_enums::{ExecutionMode, TransactionType};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use api_models::routing::RoutingRetrieveQuery;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use api_models::routing::RuleMigrationQuery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::routing;", + "use common_enums::{ExecutionMode, TransactionType};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_poll_config", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_poll_config(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_poll_config(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_pm_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_pm_token(&mut self, _token: String) {\n todo!()\n }", + "after_code": "fn set_pm_token(&mut self, _token: String) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::ActionTypesBuilder", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ActionTypesBuilder {\n action_types: Vec,\n}", + "after_code": "pub struct ActionTypesBuilder {\n action_types: Vec,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_payment_intent_status", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }", + "after_code": "fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::impl::LockSettings", + "file": "crates/router/src/configs/settings.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl<'de> Deserialize<'de> for LockSettings {\n fn deserialize>(deserializer: D) -> Result {\n #[derive(Deserialize)]\n #[serde(deny_unknown_fields)]\n struct Inner {\n redis_lock_expiry_seconds: u32,\n delay_between_retries_in_milliseconds: u32,\n }\n\n let Inner {\n redis_lock_expiry_seconds,\n delay_between_retries_in_milliseconds,\n } = Inner::deserialize(deserializer)?;\n let redis_lock_expiry_milliseconds = redis_lock_expiry_seconds * 1000;\n Ok(Self {\n redis_lock_expiry_seconds,\n delay_between_retries_in_milliseconds,\n lock_retries: redis_lock_expiry_milliseconds / delay_between_retries_in_milliseconds,\n })\n }\n}", + "after_code": "impl<'de> Deserialize<'de> for LockSettings {\n fn deserialize>(deserializer: D) -> Result {\n #[derive(Deserialize)]\n #[serde(deny_unknown_fields)]\n struct Inner {\n redis_lock_expiry_seconds: u32,\n delay_between_retries_in_milliseconds: u32,\n }\n\n let Inner {\n redis_lock_expiry_seconds,\n delay_between_retries_in_milliseconds,\n } = Inner::deserialize(deserializer)?;\n let redis_lock_expiry_milliseconds = redis_lock_expiry_seconds * 1000;\n Ok(Self {\n redis_lock_expiry_seconds,\n delay_between_retries_in_milliseconds,\n lock_retries: redis_lock_expiry_milliseconds / delay_between_retries_in_milliseconds,\n })\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use serde::de::Error;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::Error;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_refunds", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_refunds(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_refunds(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::ApiKeys", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ApiKeys;", + "after_code": "pub struct ApiKeys;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_merchant_connector_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_merchant_connector_details(\n &self,\n ) -> Option {\n todo!()\n }", + "after_code": "fn get_merchant_connector_details(\n &self,\n ) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::call_multiple_connectors_service", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": true, + "before_code": "pub async fn call_multiple_connectors_service(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n connectors: api::SessionConnectorDatas,\n _operation: &Op,\n mut payment_data: D,\n customer: &Option,\n session_surcharge_details: Option,\n business_profile: &domain::Profile,\n header_payload: HeaderPayload,\n return_raw_connector_response: Option,\n) -> RouterResult\nwhere\n Op: Debug,\n F: Send + Clone,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature,\n\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n let call_connectors_start_time = Instant::now();\n let mut join_handlers = Vec::with_capacity(connectors.len());\n for session_connector_data in connectors.iter() {\n let connector_id = session_connector_data.connector.connector.id();\n\n let merchant_connector_account = construct_profile_id_and_get_mca(\n state,\n merchant_context,\n &payment_data,\n &session_connector_data.connector.connector_name.to_string(),\n session_connector_data\n .connector\n .merchant_connector_id\n .as_ref(),\n false,\n )\n .await?;\n\n payment_data.set_surcharge_details(session_surcharge_details.as_ref().and_then(\n |session_surcharge_details| {\n session_surcharge_details.fetch_surcharge_details(\n session_connector_data.payment_method_sub_type.into(),\n session_connector_data.payment_method_sub_type,\n None,\n )\n },\n ));\n\n let router_data = payment_data\n .construct_router_data(\n state,\n connector_id,\n merchant_context,\n customer,\n &merchant_connector_account,\n None,\n Some(header_payload.clone()),\n Some(session_connector_data.payment_method_type),\n Some(session_connector_data.payment_method_sub_type),\n )\n .await?;\n\n let res = router_data.decide_flows(\n state,\n &session_connector_data.connector,\n CallConnectorAction::Trigger,\n None,\n business_profile,\n header_payload.clone(),\n return_raw_connector_response,\n );\n\n join_handlers.push(res);\n }\n\n let result = join_all(join_handlers).await;\n\n for (connector_res, session_connector) in result.into_iter().zip(connectors) {\n let connector_name = session_connector.connector.connector_name.to_string();\n match connector_res {\n Ok(connector_response) => {\n if let Ok(router_types::PaymentsResponseData::SessionResponse {\n session_token,\n ..\n }) = connector_response.response.clone()\n {\n // If session token is NoSessionTokenReceived, it is not pushed into the sessions_token as there is no response or there can be some error\n // In case of error, that error is already logged\n if !matches!(\n session_token,\n api_models::payments::SessionToken::NoSessionTokenReceived,\n ) {\n payment_data.push_sessions_token(session_token);\n }\n }\n if let Err(connector_error_response) = connector_response.response {\n logger::error!(\n \"sessions_connector_error {} {:?}\",\n connector_name,\n connector_error_response\n );\n }\n }\n Err(api_error) => {\n logger::error!(\"sessions_api_error {} {:?}\", connector_name, api_error);\n }\n }\n }\n\n // If click_to_pay is enabled and authentication_product_ids is configured in profile, we need to attach click_to_pay block in the session response for invoking click_to_pay SDK\n if business_profile.is_click_to_pay_enabled {\n if let Some(value) = business_profile.authentication_product_ids.clone() {\n let session_token = get_session_token_for_click_to_pay(\n state,\n merchant_context.get_merchant_account().get_id(),\n merchant_context,\n value,\n payment_data.get_payment_intent(),\n business_profile.get_id(),\n )\n .await?;\n payment_data.push_sessions_token(session_token);\n }\n }\n\n let call_connectors_end_time = Instant::now();\n let call_connectors_duration =\n call_connectors_end_time.saturating_duration_since(call_connectors_start_time);\n tracing::info!(duration = format!(\"Duration taken: {}\", call_connectors_duration.as_millis()));\n\n Ok(payment_data)\n}", + "after_code": "pub async fn call_multiple_connectors_service(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n connectors: api::SessionConnectorDatas,\n _operation: &Op,\n mut payment_data: D,\n customer: &Option,\n session_surcharge_details: Option,\n business_profile: &domain::Profile,\n header_payload: HeaderPayload,\n return_raw_connector_response: Option,\n) -> RouterResult\nwhere\n Op: Debug,\n F: Send + Clone,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature,\n\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n let call_connectors_start_time = Instant::now();\n let mut join_handlers = Vec::with_capacity(connectors.len());\n for session_connector_data in connectors.iter() {\n let connector_id = session_connector_data.connector.connector.id();\n\n let merchant_connector_account = construct_profile_id_and_get_mca(\n state,\n merchant_context,\n &payment_data,\n &session_connector_data.connector.connector_name.to_string(),\n session_connector_data\n .connector\n .merchant_connector_id\n .as_ref(),\n false,\n )\n .await?;\n\n payment_data.set_surcharge_details(session_surcharge_details.as_ref().and_then(\n |session_surcharge_details| {\n session_surcharge_details.fetch_surcharge_details(\n session_connector_data.payment_method_sub_type.into(),\n session_connector_data.payment_method_sub_type,\n None,\n )\n },\n ));\n\n let router_data = payment_data\n .construct_router_data(\n state,\n connector_id,\n merchant_context,\n customer,\n &merchant_connector_account,\n None,\n Some(header_payload.clone()),\n Some(session_connector_data.payment_method_type),\n Some(session_connector_data.payment_method_sub_type),\n )\n .await?;\n\n let res = router_data.decide_flows(\n state,\n &session_connector_data.connector,\n CallConnectorAction::Trigger,\n None,\n business_profile,\n header_payload.clone(),\n return_raw_connector_response,\n None,\n );\n\n join_handlers.push(res);\n }\n\n let result = join_all(join_handlers).await;\n\n for (connector_res, session_connector) in result.into_iter().zip(connectors) {\n let connector_name = session_connector.connector.connector_name.to_string();\n match connector_res {\n Ok(connector_response) => {\n if let Ok(router_types::PaymentsResponseData::SessionResponse {\n session_token,\n ..\n }) = connector_response.response.clone()\n {\n // If session token is NoSessionTokenReceived, it is not pushed into the sessions_token as there is no response or there can be some error\n // In case of error, that error is already logged\n if !matches!(\n session_token,\n api_models::payments::SessionToken::NoSessionTokenReceived,\n ) {\n payment_data.push_sessions_token(session_token);\n }\n }\n if let Err(connector_error_response) = connector_response.response {\n logger::error!(\n \"sessions_connector_error {} {:?}\",\n connector_name,\n connector_error_response\n );\n }\n }\n Err(api_error) => {\n logger::error!(\"sessions_api_error {} {:?}\", connector_name, api_error);\n }\n }\n }\n\n // If click_to_pay is enabled and authentication_product_ids is configured in profile, we need to attach click_to_pay block in the session response for invoking click_to_pay SDK\n if business_profile.is_click_to_pay_enabled {\n if let Some(value) = business_profile.authentication_product_ids.clone() {\n let session_token = get_session_token_for_click_to_pay(\n state,\n merchant_context.get_merchant_account().get_id(),\n merchant_context,\n value,\n payment_data.get_payment_intent(),\n business_profile.get_id(),\n )\n .await?;\n payment_data.push_sessions_token(session_token);\n }\n }\n\n let call_connectors_end_time = Instant::now();\n let call_connectors_duration =\n call_connectors_end_time.saturating_duration_since(call_connectors_start_time);\n tracing::info!(duration = format!(\"Duration taken: {}\", call_connectors_duration.as_millis()));\n\n Ok(payment_data)\n}", + "diff_span": { + "before": "", + "after": " header_payload.clone(),\n return_raw_connector_response,\n None,\n );\n" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use futures::future::join_all;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use router_env::{instrument, tracing};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use futures::future::join_all;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use router_env::{instrument, tracing};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_optional_external_vault_session_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_optional_external_vault_session_details(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_optional_external_vault_session_details(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentRedirectCompleteAuthorize::type::PaymentFlowResponse", + "file": "crates/router/src/core/payments.rs", + "kind": "type_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "type PaymentFlowResponse = router_types::RedirectPaymentFlowResponse;", + "after_code": "type PaymentFlowResponse = router_types::RedirectPaymentFlowResponse;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::push_sessions_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn push_sessions_token(&mut self, _token: api::SessionToken) {\n todo!()\n }", + "after_code": "fn push_sessions_token(&mut self, _token: api::SessionToken) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_payment_intent_status", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }", + "after_code": "fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_connector_customer_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_connector_customer_id(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_connector_customer_id(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Forex", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Forex {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/forex\")\n .app_data(web::Data::new(state.clone()))\n .app_data(web::Data::new(state.clone()))\n .service(web::resource(\"/rates\").route(web::get().to(currency::retrieve_forex)))\n .service(\n web::resource(\"/convert_from_minor\").route(web::get().to(currency::convert_forex)),\n )\n }\n}", + "after_code": "impl Forex {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/forex\")\n .app_data(web::Data::new(state.clone()))\n .app_data(web::Data::new(state.clone()))\n .service(web::resource(\"/rates\").route(web::get().to(currency::retrieve_forex)))\n .service(\n web::resource(\"/convert_from_minor\").route(web::get().to(currency::convert_forex)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};", + "use super::currency;" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::currency;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::ProfileNew", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl ProfileNew {\n #[cfg(feature = \"v1\")]\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/account/{account_id}/profile\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\").route(web::get().to(profiles::profiles_list_at_profile_level)),\n )\n .service(\n web::resource(\"/connectors\").route(web::get().to(admin::connector_list_profile)),\n )\n }\n #[cfg(feature = \"v2\")]\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/account/{account_id}/profile\").app_data(web::Data::new(state))\n }\n}", + "after_code": "impl ProfileNew {\n #[cfg(feature = \"v1\")]\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/account/{account_id}/profile\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\").route(web::get().to(profiles::profiles_list_at_profile_level)),\n )\n .service(\n web::resource(\"/connectors\").route(web::get().to(admin::connector_list_profile)),\n )\n }\n #[cfg(feature = \"v2\")]\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/account/{account_id}/profile\").app_data(web::Data::new(state))\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentRedirectCompleteAuthorize::function::generate_response", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn generate_response(\n &self,\n payment_flow_response: &Self::PaymentFlowResponse,\n payment_id: id_type::PaymentId,\n connector: String,\n ) -> RouterResult> {\n let payments_response = &payment_flow_response.payments_response;\n // There might be multiple redirections needed for some flows\n // If the status is requires customer action, then send the startpay url again\n // The redirection data must have been provided and updated by the connector\n let redirection_response = match payments_response.status {\n enums::IntentStatus::RequiresCustomerAction => {\n let startpay_url = payments_response\n .next_action\n .clone()\n .and_then(|next_action_data| match next_action_data {\n api_models::payments::NextActionData::RedirectToUrl { redirect_to_url } => Some(redirect_to_url),\n api_models::payments::NextActionData::RedirectInsidePopup{popup_url, ..} => Some(popup_url),\n api_models::payments::NextActionData::DisplayBankTransferInformation { .. } => None,\n api_models::payments::NextActionData::ThirdPartySdkSessionToken { .. } => None,\n api_models::payments::NextActionData::QrCodeInformation{..} => None,\n api_models::payments::NextActionData::FetchQrCodeInformation{..} => None,\n api_models::payments::NextActionData::DisplayVoucherInformation{ .. } => None,\n api_models::payments::NextActionData::WaitScreenInformation{..} => None,\n api_models::payments::NextActionData::ThreeDsInvoke{..} => None,\n api_models::payments::NextActionData::InvokeSdkClient{..} => None,\n api_models::payments::NextActionData::CollectOtp{ .. } => None,\n api_models::payments::NextActionData::InvokeHiddenIframe{ .. } => None,\n api_models::payments::NextActionData::SdkUpiIntentInformation{ .. } => None,\n })\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n\n .attach_printable(\n \"did not receive redirect to url when status is requires customer action\",\n )?;\n Ok(api::RedirectionResponse {\n return_url: String::new(),\n params: vec![],\n return_url_with_query_params: startpay_url,\n http_method: \"GET\".to_string(),\n headers: vec![],\n })\n }\n // If the status is terminal status, then redirect to merchant return url to provide status\n enums::IntentStatus::Succeeded\n | enums::IntentStatus::Failed\n | enums::IntentStatus::Cancelled | enums::IntentStatus::RequiresCapture| enums::IntentStatus::Processing=> helpers::get_handle_response_url(\n payment_id,\n &payment_flow_response.business_profile,\n payments_response,\n connector,\n ),\n _ => Err(errors::ApiErrorResponse::InternalServerError).attach_printable_lazy(|| format!(\"Could not proceed with payment as payment status {} cannot be handled during redirection\",payments_response.status))?\n }?;\n if payments_response\n .is_iframe_redirection_enabled\n .unwrap_or(false)\n {\n // html script to check if inside iframe, then send post message to parent for redirection else redirect self to return_url\n let html = core_utils::get_html_redirect_response_popup(\n redirection_response.return_url_with_query_params,\n )?;\n Ok(services::ApplicationResponse::Form(Box::new(\n services::RedirectionFormData {\n redirect_form: services::RedirectForm::Html { html_data: html },\n payment_method_data: None,\n amount: payments_response.amount.to_string(),\n currency: payments_response.currency.clone(),\n },\n )))\n } else {\n Ok(services::ApplicationResponse::JsonForRedirection(\n redirection_response,\n ))\n }\n }", + "after_code": "fn generate_response(\n &self,\n payment_flow_response: &Self::PaymentFlowResponse,\n payment_id: id_type::PaymentId,\n connector: String,\n ) -> RouterResult> {\n let payments_response = &payment_flow_response.payments_response;\n // There might be multiple redirections needed for some flows\n // If the status is requires customer action, then send the startpay url again\n // The redirection data must have been provided and updated by the connector\n let redirection_response = match payments_response.status {\n enums::IntentStatus::RequiresCustomerAction => {\n let startpay_url = payments_response\n .next_action\n .clone()\n .and_then(|next_action_data| match next_action_data {\n api_models::payments::NextActionData::RedirectToUrl { redirect_to_url } => Some(redirect_to_url),\n api_models::payments::NextActionData::RedirectInsidePopup{popup_url, ..} => Some(popup_url),\n api_models::payments::NextActionData::DisplayBankTransferInformation { .. } => None,\n api_models::payments::NextActionData::ThirdPartySdkSessionToken { .. } => None,\n api_models::payments::NextActionData::QrCodeInformation{..} => None,\n api_models::payments::NextActionData::FetchQrCodeInformation{..} => None,\n api_models::payments::NextActionData::DisplayVoucherInformation{ .. } => None,\n api_models::payments::NextActionData::WaitScreenInformation{..} => None,\n api_models::payments::NextActionData::ThreeDsInvoke{..} => None,\n api_models::payments::NextActionData::InvokeSdkClient{..} => None,\n api_models::payments::NextActionData::CollectOtp{ .. } => None,\n api_models::payments::NextActionData::InvokeHiddenIframe{ .. } => None,\n api_models::payments::NextActionData::SdkUpiIntentInformation{ .. } => None,\n })\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n\n .attach_printable(\n \"did not receive redirect to url when status is requires customer action\",\n )?;\n Ok(api::RedirectionResponse {\n return_url: String::new(),\n params: vec![],\n return_url_with_query_params: startpay_url,\n http_method: \"GET\".to_string(),\n headers: vec![],\n })\n }\n // If the status is terminal status, then redirect to merchant return url to provide status\n enums::IntentStatus::Succeeded\n | enums::IntentStatus::Failed\n | enums::IntentStatus::Cancelled | enums::IntentStatus::RequiresCapture| enums::IntentStatus::Processing=> helpers::get_handle_response_url(\n payment_id,\n &payment_flow_response.business_profile,\n payments_response,\n connector,\n ),\n _ => Err(errors::ApiErrorResponse::InternalServerError).attach_printable_lazy(|| format!(\"Could not proceed with payment as payment status {} cannot be handled during redirection\",payments_response.status))?\n }?;\n if payments_response\n .is_iframe_redirection_enabled\n .unwrap_or(false)\n {\n // html script to check if inside iframe, then send post message to parent for redirection else redirect self to return_url\n let html = core_utils::get_html_redirect_response_popup(\n redirection_response.return_url_with_query_params,\n )?;\n Ok(services::ApplicationResponse::Form(Box::new(\n services::RedirectionFormData {\n redirect_form: services::RedirectForm::Html { html_data: html },\n payment_method_data: None,\n amount: payments_response.amount.to_string(),\n currency: payments_response.currency.clone(),\n },\n )))\n } else {\n Ok(services::ApplicationResponse::JsonForRedirection(\n redirection_response,\n ))\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use hyperswitch_domain_models::router_response_types::RedirectForm;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use hyperswitch_domain_models::router_response_types::RedirectForm;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::impl::GenericLinkEnvConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Default for GenericLinkEnvConfig {\n fn default() -> Self {\n Self {\n #[allow(clippy::expect_used)]\n sdk_url: url::Url::parse(\"http://localhost:9050/HyperLoader.js\")\n .expect(\"Failed to parse default SDK URL\"),\n expiry: 900,\n ui_config: GenericLinkEnvUiConfig::default(),\n enabled_payment_methods: HashMap::default(),\n }\n }\n}", + "after_code": "impl Default for GenericLinkEnvConfig {\n fn default() -> Self {\n Self {\n #[allow(clippy::expect_used)]\n sdk_url: url::Url::parse(\"http://localhost:9050/HyperLoader.js\")\n .expect(\"Failed to parse default SDK URL\"),\n expiry: 900,\n ui_config: GenericLinkEnvUiConfig::default(),\n enabled_payment_methods: HashMap::default(),\n }\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::collections::{HashMap, HashSet};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::enum::PaymentMethodFilterKey", + "file": "crates/router/src/configs/settings.rs", + "kind": "enum_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub enum PaymentMethodFilterKey {\n PaymentMethodType(enums::PaymentMethodType),\n CardNetwork(enums::CardNetwork),\n}", + "after_code": "pub enum PaymentMethodFilterKey {\n PaymentMethodType(enums::PaymentMethodType),\n CardNetwork(enums::CardNetwork),\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::trait::WalletFlow", + "file": "crates/router/src/core/payments.rs", + "kind": "trait_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub trait WalletFlow: Send + Sync\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n /// Check if wallet data is already decrypted and return token if so\n fn check_predecrypted_token(\n &self,\n _payment_data: &D,\n ) -> CustomResult, errors::ApiErrorResponse> {\n // Default implementation returns None (no pre-decrypted data)\n Ok(None)\n }\n\n fn decide_wallet_flow(\n &self,\n state: &SessionState,\n payment_data: &D,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n ) -> CustomResult, errors::ApiErrorResponse>;\n\n async fn decrypt_wallet_token(\n &self,\n wallet_flow: &DecideWalletFlow,\n payment_data: &D,\n ) -> CustomResult;\n}", + "after_code": "pub trait WalletFlow: Send + Sync\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n /// Check if wallet data is already decrypted and return token if so\n fn check_predecrypted_token(\n &self,\n _payment_data: &D,\n ) -> CustomResult, errors::ApiErrorResponse> {\n // Default implementation returns None (no pre-decrypted data)\n Ok(None)\n }\n\n fn decide_wallet_flow(\n &self,\n state: &SessionState,\n payment_data: &D,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n ) -> CustomResult, errors::ApiErrorResponse>;\n\n async fn decrypt_wallet_token(\n &self,\n wallet_flow: &DecideWalletFlow,\n payment_data: &D,\n ) -> CustomResult;\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::AppState::function::add_request_id", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn add_request_id(&mut self, request_id: RequestId) {\n self.api_client.add_request_id(request_id);\n self.request_id.replace(request_id);\n }", + "after_code": "fn add_request_id(&mut self, request_id: RequestId) {\n self.api_client.add_request_id(request_id);\n self.request_id.replace(request_id);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};", + "use router_env::tracing_actix_web::RequestId;" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use router_env::tracing_actix_web::RequestId;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::mod::routing", + "file": "crates/router/src/core/payments.rs", + "kind": "mod_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub mod routing;", + "after_code": "pub mod routing;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_creds_identifier", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_creds_identifier(&self) -> Option<&str> {\n None\n }", + "after_code": "fn get_creds_identifier(&self) -> Option<&str> {\n None\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_sessions_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_sessions_token(&self) -> Vec {\n self.sessions_token.clone()\n }", + "after_code": "fn get_sessions_token(&self) -> Vec {\n self.sessions_token.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_payment_method_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData> {\n todo!()\n }", + "after_code": "fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::impl::storage_impl::config::Database", + "file": "crates/router/src/configs/settings.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl From for storage_impl::config::Database {\n fn from(val: Database) -> Self {\n Self {\n username: val.username,\n password: val.password,\n host: val.host,\n port: val.port,\n dbname: val.dbname,\n pool_size: val.pool_size,\n connection_timeout: val.connection_timeout,\n queue_strategy: val.queue_strategy,\n min_idle: val.min_idle,\n max_lifetime: val.max_lifetime,\n }\n }\n}", + "after_code": "impl From for storage_impl::config::Database {\n fn from(val: Database) -> Self {\n Self {\n username: val.username,\n password: val.password,\n host: val.host,\n port: val.port,\n dbname: val.dbname,\n pool_size: val.pool_size,\n connection_timeout: val.connection_timeout,\n queue_strategy: val.queue_strategy,\n min_idle: val.min_idle,\n max_lifetime: val.max_lifetime,\n }\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::get_recovery_grpc_headers", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn get_recovery_grpc_headers(&self) -> GrpcRecoveryHeaders {\n GrpcRecoveryHeaders {\n request_id: self.request_id.map(|req_id| (*req_id).to_string()),\n }\n }", + "after_code": "pub fn get_recovery_grpc_headers(&self) -> GrpcRecoveryHeaders {\n GrpcRecoveryHeaders {\n request_id: self.request_id.map(|req_id| (*req_id).to_string()),\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::dummy_connector::*;", + "use super::payout_link::*;", + "use super::payouts::*;", + "use super::admin::*;", + "use super::recovery_webhooks::*;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use external_services::grpc_client::revenue_recovery::GrpcRecoveryHeaders;", + "use super::webhooks::*;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::ephemeral_key::*;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use super::dummy_connector::*;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use super::payout_link::*;", + "use super::payouts::*;", + "use super::admin::*;", + "use super::recovery_webhooks::*;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use external_services::grpc_client::revenue_recovery::GrpcRecoveryHeaders;", + "use super::webhooks::*;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::ephemeral_key::*;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_payment_method_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_data(&mut self, payment_method_data: Option) {\n self.payment_method_data = payment_method_data;\n }", + "after_code": "fn set_payment_method_data(&mut self, payment_method_data: Option) {\n self.payment_method_data = payment_method_data;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::ApplePayWallet::function::check_predecrypted_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn check_predecrypted_token(\n &self,\n payment_data: &D,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let apple_pay_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_apple_pay_wallet_data());\n\n let result = if let Some(data) = apple_pay_wallet_data {\n match &data.payment_data {\n common_payments_types::ApplePayPaymentData::Encrypted(_) => None,\n common_payments_types::ApplePayPaymentData::Decrypted(\n apple_pay_predecrypt_data,\n ) => {\n helpers::validate_card_expiry(\n &apple_pay_predecrypt_data.application_expiration_month,\n &apple_pay_predecrypt_data.application_expiration_year,\n )?;\n Some(PaymentMethodToken::ApplePayDecrypt(Box::new(\n apple_pay_predecrypt_data.clone(),\n )))\n }\n }\n } else {\n None\n };\n Ok(result)\n }", + "after_code": "fn check_predecrypted_token(\n &self,\n payment_data: &D,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let apple_pay_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_apple_pay_wallet_data());\n\n let result = if let Some(data) = apple_pay_wallet_data {\n match &data.payment_data {\n common_payments_types::ApplePayPaymentData::Encrypted(_) => None,\n common_payments_types::ApplePayPaymentData::Decrypted(\n apple_pay_predecrypt_data,\n ) => {\n helpers::validate_card_expiry(\n &apple_pay_predecrypt_data.application_expiration_month,\n &apple_pay_predecrypt_data.application_expiration_year,\n )?;\n Some(PaymentMethodToken::ApplePayDecrypt(Box::new(\n apple_pay_predecrypt_data.clone(),\n )))\n }\n }\n } else {\n None\n };\n Ok(result)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_merchant_connector_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n self.payment_attempt.merchant_connector_id = merchant_connector_id;\n }", + "after_code": "fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n self.payment_attempt.merchant_connector_id = merchant_connector_id;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_attempts", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_attempts(&self) -> Option> {\n todo!()\n }", + "after_code": "fn get_attempts(&self) -> Option> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::proxy_for_payments_operation_core", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn proxy_for_payments_operation_core(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n get_tracker_response: operations::GetTrackerResponse,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n return_raw_connector_response: Option,\n) -> RouterResult<(D, Req, Option, Option)>\nwhere\n F: Send + Clone + Sync,\n Req: Send + Sync + Authenticate,\n Op: Operation + Send + Sync,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n\n // To create connector flow specific interface data\n D: ConstructFlowSpecificData,\n RouterData: Feature,\n\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n\n RouterData:\n hyperswitch_domain_models::router_data::TrackerPostUpdateObjects,\n\n // To perform router related operation for PaymentResponse\n PaymentResponse: Operation,\n FData: Send + Sync + Clone,\n{\n let operation: BoxedOperation<'_, F, Req, D> = Box::new(operation);\n\n // Get the trackers related to track the state of the payment\n let operations::GetTrackerResponse { mut payment_data } = get_tracker_response;\n // consume the req merchant_connector_id and set it in the payment_data\n let connector = operation\n .to_domain()?\n .perform_routing(&merchant_context, &profile, state, &mut payment_data)\n .await?;\n\n let payment_data = match connector {\n ConnectorCallType::PreDetermined(connector_data) => {\n let router_data = proxy_for_call_connector_service(\n state,\n req_state.clone(),\n &merchant_context,\n connector_data.connector_data.clone(),\n &operation,\n &mut payment_data,\n call_connector_action.clone(),\n header_payload.clone(),\n &profile,\n return_raw_connector_response,\n )\n .await?;\n\n let payments_response_operation = Box::new(PaymentResponse);\n\n payments_response_operation\n .to_post_update_tracker()?\n .update_tracker(\n state,\n payment_data,\n router_data,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await?\n }\n ConnectorCallType::Retryable(vec) => todo!(),\n ConnectorCallType::SessionMultiple(vec) => todo!(),\n ConnectorCallType::Skip => payment_data,\n };\n\n Ok((payment_data, req, None, None))\n}", + "after_code": "pub async fn proxy_for_payments_operation_core(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n get_tracker_response: operations::GetTrackerResponse,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n return_raw_connector_response: Option,\n) -> RouterResult<(D, Req, Option, Option)>\nwhere\n F: Send + Clone + Sync,\n Req: Send + Sync + Authenticate,\n Op: Operation + Send + Sync,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n\n // To create connector flow specific interface data\n D: ConstructFlowSpecificData,\n RouterData: Feature,\n\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n\n RouterData:\n hyperswitch_domain_models::router_data::TrackerPostUpdateObjects,\n\n // To perform router related operation for PaymentResponse\n PaymentResponse: Operation,\n FData: Send + Sync + Clone,\n{\n let operation: BoxedOperation<'_, F, Req, D> = Box::new(operation);\n\n // Get the trackers related to track the state of the payment\n let operations::GetTrackerResponse { mut payment_data } = get_tracker_response;\n // consume the req merchant_connector_id and set it in the payment_data\n let connector = operation\n .to_domain()?\n .perform_routing(&merchant_context, &profile, state, &mut payment_data)\n .await?;\n\n let payment_data = match connector {\n ConnectorCallType::PreDetermined(connector_data) => {\n let router_data = proxy_for_call_connector_service(\n state,\n req_state.clone(),\n &merchant_context,\n connector_data.connector_data.clone(),\n &operation,\n &mut payment_data,\n call_connector_action.clone(),\n header_payload.clone(),\n &profile,\n return_raw_connector_response,\n )\n .await?;\n\n let payments_response_operation = Box::new(PaymentResponse);\n\n payments_response_operation\n .to_post_update_tracker()?\n .update_tracker(\n state,\n payment_data,\n router_data,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await?\n }\n ConnectorCallType::Retryable(vec) => todo!(),\n ConnectorCallType::SessionMultiple(vec) => todo!(),\n ConnectorCallType::Skip => payment_data,\n };\n\n Ok((payment_data, req, None, None))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_authorizations", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_authorizations(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_authorizations(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::AppState", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct AppState {\n pub flow_name: String,\n pub global_store: Box,\n // TODO: use a separate schema for accounts_store\n pub accounts_store: HashMap>,\n pub stores: HashMap>,\n pub conf: Arc>,\n pub event_handler: EventsHandler,\n #[cfg(feature = \"email\")]\n pub email_client: Arc>,\n pub api_client: Box,\n #[cfg(feature = \"olap\")]\n pub pools: HashMap,\n #[cfg(feature = \"olap\")]\n pub opensearch_client: Option>,\n pub request_id: Option,\n pub file_storage_client: Arc,\n pub encryption_client: Arc,\n pub grpc_client: Arc,\n pub theme_storage_client: Arc,\n pub crm_client: Arc,\n pub infra_components: Option,\n pub enhancement: Option>,\n pub superposition_service: Option>,\n}", + "after_code": "pub struct AppState {\n pub flow_name: String,\n pub global_store: Box,\n // TODO: use a separate schema for accounts_store\n pub accounts_store: HashMap>,\n pub stores: HashMap>,\n pub conf: Arc>,\n pub event_handler: EventsHandler,\n #[cfg(feature = \"email\")]\n pub email_client: Arc>,\n pub api_client: Box,\n #[cfg(feature = \"olap\")]\n pub pools: HashMap,\n #[cfg(feature = \"olap\")]\n pub opensearch_client: Option>,\n pub request_id: Option,\n pub file_storage_client: Arc,\n pub encryption_client: Arc,\n pub grpc_client: Arc,\n pub theme_storage_client: Arc,\n pub crm_client: Arc,\n pub infra_components: Option,\n pub enhancement: Option>,\n pub superposition_service: Option>,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use crate::analytics::AnalyticsProvider;", + "pub use crate::analytics::opensearch::OpenSearchClient;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use self::settings::Tenant;", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};", + "use router_env::tracing_actix_web::RequestId;" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::analytics::opensearch::OpenSearchClient;", + "use crate::analytics::AnalyticsProvider;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use self::settings::Tenant;", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use router_env::tracing_actix_web::RequestId;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_intent(&self) -> &storage::PaymentIntent {\n &self.payment_intent\n }", + "after_code": "fn get_payment_intent(&self) -> &storage::PaymentIntent {\n &self.payment_intent\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::mod::operations", + "file": "crates/router/src/core/payments.rs", + "kind": "mod_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub mod operations;", + "after_code": "pub mod operations;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_co_badged_card_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_co_badged_card_data(\n &mut self,\n _debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }", + "after_code": "fn set_co_badged_card_data(\n &mut self,\n _debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::CellInformation::function::default", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn default() -> Self {\n // We provide a static default cell id for constructing application settings.\n // This will only panic at application startup if we're unable to construct the default,\n // around the time of deserializing application settings.\n // And a panic at application startup is considered acceptable.\n #[allow(clippy::expect_used)]\n let cell_id =\n id_type::CellId::from_string(\"defid\").expect(\"Failed to create a default for Cell Id\");\n Self { id: cell_id }\n }", + "after_code": "fn default() -> Self {\n // We provide a static default cell id for constructing application settings.\n // This will only panic at application startup if we're unable to construct the default,\n // around the time of deserializing application settings.\n // And a panic at application startup is considered acceptable.\n #[allow(clippy::expect_used)]\n let cell_id =\n id_type::CellId::from_string(\"defid\").expect(\"Failed to create a default for Cell Id\");\n Self { id: cell_id }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAuthenticateCompleteAuthorize::function::generate_response", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn generate_response(\n &self,\n payment_flow_response: &Self::PaymentFlowResponse,\n payment_id: id_type::PaymentId,\n connector: String,\n ) -> RouterResult> {\n let payments_response = &payment_flow_response.payments_response;\n let redirect_response = helpers::get_handle_response_url(\n payment_id.clone(),\n &payment_flow_response.business_profile,\n payments_response,\n connector.clone(),\n )?;\n // html script to check if inside iframe, then send post message to parent for redirection else redirect self to return_url\n let html = core_utils::get_html_redirect_response_for_external_authentication(\n redirect_response.return_url_with_query_params,\n payments_response,\n payment_id,\n &payment_flow_response.poll_config,\n )?;\n Ok(services::ApplicationResponse::Form(Box::new(\n services::RedirectionFormData {\n redirect_form: services::RedirectForm::Html { html_data: html },\n payment_method_data: None,\n amount: payments_response.amount.to_string(),\n currency: payments_response.currency.clone(),\n },\n )))\n }", + "after_code": "fn generate_response(\n &self,\n payment_flow_response: &Self::PaymentFlowResponse,\n payment_id: id_type::PaymentId,\n connector: String,\n ) -> RouterResult> {\n let payments_response = &payment_flow_response.payments_response;\n let redirect_response = helpers::get_handle_response_url(\n payment_id.clone(),\n &payment_flow_response.business_profile,\n payments_response,\n connector.clone(),\n )?;\n // html script to check if inside iframe, then send post message to parent for redirection else redirect self to return_url\n let html = core_utils::get_html_redirect_response_for_external_authentication(\n redirect_response.return_url_with_query_params,\n payments_response,\n payment_id,\n &payment_flow_response.poll_config,\n )?;\n Ok(services::ApplicationResponse::Form(Box::new(\n services::RedirectionFormData {\n redirect_form: services::RedirectForm::Html { html_data: html },\n payment_method_data: None,\n amount: payments_response.amount.to_string(),\n currency: payments_response.currency.clone(),\n },\n )))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use hyperswitch_domain_models::router_response_types::RedirectForm;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use hyperswitch_domain_models::router_response_types::RedirectForm;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::PaymentData", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl OperationSessionSetters for PaymentData {\n // Setters Implementation\n fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }\n\n fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }\n\n fn set_payment_method_data(&mut self, payment_method_data: Option) {\n self.payment_method_data = payment_method_data;\n }\n\n fn set_payment_method_token(&mut self, payment_method_token: Option) {\n self.payment_method_token = payment_method_token;\n }\n\n fn set_payment_method_id_in_attempt(&mut self, payment_method_id: Option) {\n self.payment_attempt.payment_method_id = payment_method_id;\n }\n\n fn set_email_if_not_present(&mut self, email: pii::Email) {\n self.email = self.email.clone().or(Some(email));\n }\n\n fn set_pm_token(&mut self, token: String) {\n self.pm_token = Some(token);\n }\n\n fn set_connector_customer_id(&mut self, customer_id: Option) {\n self.connector_customer_id = customer_id;\n }\n\n fn push_sessions_token(&mut self, token: api::SessionToken) {\n self.sessions_token.push(token);\n }\n\n fn set_surcharge_details(&mut self, surcharge_details: Option) {\n self.surcharge_details = surcharge_details;\n }\n\n fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n self.payment_attempt.merchant_connector_id = merchant_connector_id;\n }\n\n fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n match &mut self.payment_method_data {\n Some(domain::PaymentMethodData::Card(card)) => {\n logger::debug!(\"Setting card network: {:?}\", card_network);\n card.card_network = Some(card_network);\n }\n Some(domain::PaymentMethodData::Wallet(wallet_data)) => match wallet_data {\n hyperswitch_domain_models::payment_method_data::WalletData::ApplePay(wallet) => {\n logger::debug!(\"Setting Apple Pay card network: {:?}\", card_network);\n wallet.payment_method.network = card_network.to_string();\n }\n _ => {\n logger::debug!(\"Wallet type does not support setting card network.\");\n }\n },\n _ => {\n logger::warn!(\"Payment method data does not support setting card network.\");\n }\n }\n }\n\n fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n let co_badged_card_data =\n api_models::payment_methods::CoBadgedCardData::from(debit_routing_output);\n let card_type = debit_routing_output\n .card_type\n .clone()\n .to_string()\n .to_uppercase();\n if let Some(domain::PaymentMethodData::Card(card)) = &mut self.payment_method_data {\n card.co_badged_card_data = Some(co_badged_card_data);\n card.card_type = Some(card_type);\n logger::debug!(\"set co-badged card data in payment method data\");\n };\n }\n\n #[cfg(feature = \"v1\")]\n fn set_capture_method_in_attempt(&mut self, capture_method: enums::CaptureMethod) {\n self.payment_attempt.capture_method = Some(capture_method);\n }\n\n fn set_frm_message(&mut self, frm_message: FraudCheck) {\n self.frm_message = Some(frm_message);\n }\n\n fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }\n\n fn set_authentication_type_in_attempt(\n &mut self,\n authentication_type: Option,\n ) {\n self.payment_attempt.authentication_type = authentication_type;\n }\n\n fn set_recurring_mandate_payment_data(\n &mut self,\n recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n self.recurring_mandate_payment_data = Some(recurring_mandate_payment_data);\n }\n\n fn set_mandate_id(&mut self, mandate_id: api_models::payments::MandateIds) {\n self.mandate_id = Some(mandate_id);\n }\n\n #[cfg(feature = \"v1\")]\n fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = Some(setup_future_usage);\n }\n\n #[cfg(feature = \"v2\")]\n fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }\n\n #[cfg(feature = \"v1\")]\n fn set_straight_through_algorithm_in_payment_attempt(\n &mut self,\n straight_through_algorithm: serde_json::Value,\n ) {\n self.payment_attempt.straight_through_algorithm = Some(straight_through_algorithm);\n }\n\n fn set_connector_in_payment_attempt(&mut self, connector: Option) {\n self.payment_attempt.connector = connector;\n }\n\n fn set_vault_operation(&mut self, vault_operation: domain_payments::VaultOperation) {\n self.vault_operation = Some(vault_operation);\n }\n\n fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n self.payment_attempt.routing_approach = routing_approach;\n }\n\n fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n self.payment_attempt.connector_response_reference_id = reference_id;\n }\n\n fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n self.payment_attempt.connector_request_reference_id = Some(connector_request_reference_id);\n }\n}", + "after_code": "impl OperationSessionSetters for PaymentData {\n // Setters Implementation\n fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }\n\n fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }\n\n fn set_payment_method_data(&mut self, payment_method_data: Option) {\n self.payment_method_data = payment_method_data;\n }\n\n fn set_payment_method_token(&mut self, payment_method_token: Option) {\n self.payment_method_token = payment_method_token;\n }\n\n fn set_payment_method_id_in_attempt(&mut self, payment_method_id: Option) {\n self.payment_attempt.payment_method_id = payment_method_id;\n }\n\n fn set_email_if_not_present(&mut self, email: pii::Email) {\n self.email = self.email.clone().or(Some(email));\n }\n\n fn set_pm_token(&mut self, token: String) {\n self.pm_token = Some(token);\n }\n\n fn set_connector_customer_id(&mut self, customer_id: Option) {\n self.connector_customer_id = customer_id;\n }\n\n fn push_sessions_token(&mut self, token: api::SessionToken) {\n self.sessions_token.push(token);\n }\n\n fn set_surcharge_details(&mut self, surcharge_details: Option) {\n self.surcharge_details = surcharge_details;\n }\n\n fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n self.payment_attempt.merchant_connector_id = merchant_connector_id;\n }\n\n fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n match &mut self.payment_method_data {\n Some(domain::PaymentMethodData::Card(card)) => {\n logger::debug!(\"Setting card network: {:?}\", card_network);\n card.card_network = Some(card_network);\n }\n Some(domain::PaymentMethodData::Wallet(wallet_data)) => match wallet_data {\n hyperswitch_domain_models::payment_method_data::WalletData::ApplePay(wallet) => {\n logger::debug!(\"Setting Apple Pay card network: {:?}\", card_network);\n wallet.payment_method.network = card_network.to_string();\n }\n _ => {\n logger::debug!(\"Wallet type does not support setting card network.\");\n }\n },\n _ => {\n logger::warn!(\"Payment method data does not support setting card network.\");\n }\n }\n }\n\n fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n let co_badged_card_data =\n api_models::payment_methods::CoBadgedCardData::from(debit_routing_output);\n let card_type = debit_routing_output\n .card_type\n .clone()\n .to_string()\n .to_uppercase();\n if let Some(domain::PaymentMethodData::Card(card)) = &mut self.payment_method_data {\n card.co_badged_card_data = Some(co_badged_card_data);\n card.card_type = Some(card_type);\n logger::debug!(\"set co-badged card data in payment method data\");\n };\n }\n\n #[cfg(feature = \"v1\")]\n fn set_capture_method_in_attempt(&mut self, capture_method: enums::CaptureMethod) {\n self.payment_attempt.capture_method = Some(capture_method);\n }\n\n fn set_frm_message(&mut self, frm_message: FraudCheck) {\n self.frm_message = Some(frm_message);\n }\n\n fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }\n\n fn set_authentication_type_in_attempt(\n &mut self,\n authentication_type: Option,\n ) {\n self.payment_attempt.authentication_type = authentication_type;\n }\n\n fn set_recurring_mandate_payment_data(\n &mut self,\n recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n self.recurring_mandate_payment_data = Some(recurring_mandate_payment_data);\n }\n\n fn set_mandate_id(&mut self, mandate_id: api_models::payments::MandateIds) {\n self.mandate_id = Some(mandate_id);\n }\n\n #[cfg(feature = \"v1\")]\n fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = Some(setup_future_usage);\n }\n\n #[cfg(feature = \"v2\")]\n fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }\n\n #[cfg(feature = \"v1\")]\n fn set_straight_through_algorithm_in_payment_attempt(\n &mut self,\n straight_through_algorithm: serde_json::Value,\n ) {\n self.payment_attempt.straight_through_algorithm = Some(straight_through_algorithm);\n }\n\n fn set_connector_in_payment_attempt(&mut self, connector: Option) {\n self.payment_attempt.connector = connector;\n }\n\n fn set_vault_operation(&mut self, vault_operation: domain_payments::VaultOperation) {\n self.vault_operation = Some(vault_operation);\n }\n\n fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n self.payment_attempt.routing_approach = routing_approach;\n }\n\n fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n self.payment_attempt.connector_response_reference_id = reference_id;\n }\n\n fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n self.payment_attempt.connector_request_reference_id = Some(connector_request_reference_id);\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ], + "after_imports": [ + "use std::future;", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_token_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_token_data(&self) -> Option<&storage::PaymentTokenData> {\n todo!()\n }", + "after_code": "fn get_token_data(&self) -> Option<&storage::PaymentTokenData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::TenantConfig::struct::Inner", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "struct Inner {\n base_url: String,\n schema: String,\n accounts_schema: String,\n redis_key_prefix: String,\n clickhouse_database: String,\n user: TenantUserConfig,\n }", + "after_code": "struct Inner {\n base_url: String,\n schema: String,\n accounts_schema: String,\n redis_key_prefix: String,\n clickhouse_database: String,\n user: TenantUserConfig,\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_setup_future_usage_in_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }", + "after_code": "fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use std::future;", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::PaymentLink", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl PaymentLink {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/payment_link\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/list\").route(web::post().to(payment_link::payments_link_list)))\n .service(\n web::resource(\"/{payment_link_id}\")\n .route(web::get().to(payment_link::payment_link_retrieve)),\n )\n .service(\n web::resource(\"{merchant_id}/{payment_id}\")\n .route(web::get().to(payment_link::initiate_payment_link)),\n )\n .service(\n web::resource(\"s/{merchant_id}/{payment_id}\")\n .route(web::get().to(payment_link::initiate_secure_payment_link)),\n )\n .service(\n web::resource(\"status/{merchant_id}/{payment_id}\")\n .route(web::get().to(payment_link::payment_link_status)),\n )\n }\n}", + "after_code": "impl PaymentLink {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/payment_link\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/list\").route(web::post().to(payment_link::payments_link_list)))\n .service(\n web::resource(\"/{payment_link_id}\")\n .route(web::get().to(payment_link::payment_link_retrieve)),\n )\n .service(\n web::resource(\"{merchant_id}/{payment_id}\")\n .route(web::get().to(payment_link::initiate_payment_link)),\n )\n .service(\n web::resource(\"s/{merchant_id}/{payment_id}\")\n .route(web::get().to(payment_link::initiate_secure_payment_link)),\n )\n .service(\n web::resource(\"status/{merchant_id}/{payment_id}\")\n .route(web::get().to(payment_link::payment_link_status)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_connector_tokenization_action_when_confirm_true", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn get_connector_tokenization_action_when_confirm_true(\n state: &SessionState,\n operation: &BoxedOperation<'_, F, Req, D>,\n payment_data: &mut D,\n validate_result: &operations::ValidateResult,\n merchant_key_store: &domain::MerchantKeyStore,\n customer: &Option,\n business_profile: &domain::Profile,\n should_retry_with_pan: bool,\n) -> RouterResult<(D, TokenizationAction)>\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let connector = payment_data.get_payment_attempt().connector.to_owned();\n\n let is_mandate = payment_data\n .get_mandate_id()\n .as_ref()\n .and_then(|inner| inner.mandate_reference_id.as_ref())\n .map(|mandate_reference| match mandate_reference {\n api_models::payments::MandateReferenceId::ConnectorMandateId(_) => true,\n api_models::payments::MandateReferenceId::NetworkMandateId(_)\n | api_models::payments::MandateReferenceId::NetworkTokenWithNTI(_) => false,\n })\n .unwrap_or(false);\n\n let payment_data_and_tokenization_action = match connector {\n Some(_) if is_mandate => (\n payment_data.to_owned(),\n TokenizationAction::SkipConnectorTokenization,\n ),\n Some(connector) if is_operation_confirm(&operation) => {\n let payment_method = payment_data\n .get_payment_attempt()\n .payment_method\n .get_required_value(\"payment_method\")?;\n let payment_method_type = payment_data.get_payment_attempt().payment_method_type;\n\n let mandate_flow_enabled = payment_data\n .get_payment_attempt()\n .setup_future_usage_applied;\n\n let is_connector_tokenization_enabled =\n is_payment_method_tokenization_enabled_for_connector(\n state,\n &connector,\n payment_method,\n payment_method_type,\n payment_data.get_payment_method_token(),\n mandate_flow_enabled,\n )?;\n\n let payment_method_action = decide_payment_method_tokenize_action(\n state,\n &connector,\n payment_method,\n payment_data.get_payment_intent().clone(),\n payment_data.get_token(),\n is_connector_tokenization_enabled,\n )\n .await?;\n\n let connector_tokenization_action = match payment_method_action {\n TokenizationAction::TokenizeInRouter => {\n let (_operation, payment_method_data, pm_id) = operation\n .to_domain()?\n .make_pm_data(\n state,\n payment_data,\n validate_result.storage_scheme,\n merchant_key_store,\n customer,\n business_profile,\n should_retry_with_pan,\n )\n .await?;\n payment_data.set_payment_method_data(payment_method_data);\n payment_data.set_payment_method_id_in_attempt(pm_id);\n\n TokenizationAction::SkipConnectorTokenization\n }\n TokenizationAction::TokenizeInConnector => TokenizationAction::TokenizeInConnector,\n TokenizationAction::TokenizeInConnectorAndRouter => {\n let (_operation, payment_method_data, pm_id) = operation\n .to_domain()?\n .make_pm_data(\n state,\n payment_data,\n validate_result.storage_scheme,\n merchant_key_store,\n customer,\n business_profile,\n should_retry_with_pan,\n )\n .await?;\n\n payment_data.set_payment_method_data(payment_method_data);\n payment_data.set_payment_method_id_in_attempt(pm_id);\n TokenizationAction::TokenizeInConnector\n }\n TokenizationAction::ConnectorToken(token) => {\n payment_data.set_pm_token(token);\n TokenizationAction::SkipConnectorTokenization\n }\n TokenizationAction::SkipConnectorTokenization => {\n TokenizationAction::SkipConnectorTokenization\n }\n };\n (payment_data.to_owned(), connector_tokenization_action)\n }\n _ => (\n payment_data.to_owned(),\n TokenizationAction::SkipConnectorTokenization,\n ),\n };\n\n Ok(payment_data_and_tokenization_action)\n}", + "after_code": "pub async fn get_connector_tokenization_action_when_confirm_true(\n state: &SessionState,\n operation: &BoxedOperation<'_, F, Req, D>,\n payment_data: &mut D,\n validate_result: &operations::ValidateResult,\n merchant_key_store: &domain::MerchantKeyStore,\n customer: &Option,\n business_profile: &domain::Profile,\n should_retry_with_pan: bool,\n) -> RouterResult<(D, TokenizationAction)>\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let connector = payment_data.get_payment_attempt().connector.to_owned();\n\n let is_mandate = payment_data\n .get_mandate_id()\n .as_ref()\n .and_then(|inner| inner.mandate_reference_id.as_ref())\n .map(|mandate_reference| match mandate_reference {\n api_models::payments::MandateReferenceId::ConnectorMandateId(_) => true,\n api_models::payments::MandateReferenceId::NetworkMandateId(_)\n | api_models::payments::MandateReferenceId::NetworkTokenWithNTI(_) => false,\n })\n .unwrap_or(false);\n\n let payment_data_and_tokenization_action = match connector {\n Some(_) if is_mandate => (\n payment_data.to_owned(),\n TokenizationAction::SkipConnectorTokenization,\n ),\n Some(connector) if is_operation_confirm(&operation) => {\n let payment_method = payment_data\n .get_payment_attempt()\n .payment_method\n .get_required_value(\"payment_method\")?;\n let payment_method_type = payment_data.get_payment_attempt().payment_method_type;\n\n let mandate_flow_enabled = payment_data\n .get_payment_attempt()\n .setup_future_usage_applied;\n\n let is_connector_tokenization_enabled =\n is_payment_method_tokenization_enabled_for_connector(\n state,\n &connector,\n payment_method,\n payment_method_type,\n payment_data.get_payment_method_token(),\n mandate_flow_enabled,\n )?;\n\n let payment_method_action = decide_payment_method_tokenize_action(\n state,\n &connector,\n payment_method,\n payment_data.get_payment_intent().clone(),\n payment_data.get_token(),\n is_connector_tokenization_enabled,\n )\n .await?;\n\n let connector_tokenization_action = match payment_method_action {\n TokenizationAction::TokenizeInRouter => {\n let (_operation, payment_method_data, pm_id) = operation\n .to_domain()?\n .make_pm_data(\n state,\n payment_data,\n validate_result.storage_scheme,\n merchant_key_store,\n customer,\n business_profile,\n should_retry_with_pan,\n )\n .await?;\n payment_data.set_payment_method_data(payment_method_data);\n payment_data.set_payment_method_id_in_attempt(pm_id);\n\n TokenizationAction::SkipConnectorTokenization\n }\n TokenizationAction::TokenizeInConnector => TokenizationAction::TokenizeInConnector,\n TokenizationAction::TokenizeInConnectorAndRouter => {\n let (_operation, payment_method_data, pm_id) = operation\n .to_domain()?\n .make_pm_data(\n state,\n payment_data,\n validate_result.storage_scheme,\n merchant_key_store,\n customer,\n business_profile,\n should_retry_with_pan,\n )\n .await?;\n\n payment_data.set_payment_method_data(payment_method_data);\n payment_data.set_payment_method_id_in_attempt(pm_id);\n TokenizationAction::TokenizeInConnector\n }\n TokenizationAction::ConnectorToken(token) => {\n payment_data.set_pm_token(token);\n TokenizationAction::SkipConnectorTokenization\n }\n TokenizationAction::SkipConnectorTokenization => {\n TokenizationAction::SkipConnectorTokenization\n }\n };\n (payment_data.to_owned(), connector_tokenization_action)\n }\n _ => (\n payment_data.to_owned(),\n TokenizationAction::SkipConnectorTokenization,\n ),\n };\n\n Ok(payment_data_and_tokenization_action)\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use std::future;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::list_payments", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn list_payments(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n constraints: api::PaymentListConstraints,\n) -> RouterResponse {\n common_utils::metrics::utils::record_operation_time(\n async {\n let limit = &constraints.limit;\n helpers::validate_payment_list_request_for_joins(*limit)?;\n let db: &dyn StorageInterface = state.store.as_ref();\n let fetch_constraints = constraints.clone().into();\n let list: Vec<(storage::PaymentIntent, Option)> = db\n .get_filtered_payment_intents_attempt(\n &(&state).into(),\n merchant_context.get_merchant_account().get_id(),\n &fetch_constraints,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n let data: Vec =\n list.into_iter().map(ForeignFrom::foreign_from).collect();\n\n let active_attempt_ids = db\n .get_filtered_active_attempt_ids_for_total_count(\n merchant_context.get_merchant_account().get_id(),\n &fetch_constraints,\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while retrieving active_attempt_ids for merchant\")?;\n\n let total_count = if constraints.has_no_attempt_filters() {\n i64::try_from(active_attempt_ids.len())\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while converting from usize to i64\")\n } else {\n let active_attempt_ids = active_attempt_ids\n .into_iter()\n .flatten()\n .collect::>();\n\n db.get_total_count_of_filtered_payment_attempts(\n merchant_context.get_merchant_account().get_id(),\n &active_attempt_ids,\n constraints.connector,\n constraints.payment_method_type,\n constraints.payment_method_subtype,\n constraints.authentication_type,\n constraints.merchant_connector_id,\n constraints.card_network,\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while retrieving total count of payment attempts\")\n }?;\n\n Ok(services::ApplicationResponse::Json(\n api_models::payments::PaymentListResponse {\n count: data.len(),\n total_count,\n data,\n },\n ))\n },\n &metrics::PAYMENT_LIST_LATENCY,\n router_env::metric_attributes!((\n \"merchant_id\",\n merchant_context.get_merchant_account().get_id().clone()\n )),\n )\n .await\n}", + "after_code": "pub async fn list_payments(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n constraints: api::PaymentListConstraints,\n) -> RouterResponse {\n common_utils::metrics::utils::record_operation_time(\n async {\n let limit = &constraints.limit;\n helpers::validate_payment_list_request_for_joins(*limit)?;\n let db: &dyn StorageInterface = state.store.as_ref();\n let fetch_constraints = constraints.clone().into();\n let list: Vec<(storage::PaymentIntent, Option)> = db\n .get_filtered_payment_intents_attempt(\n &(&state).into(),\n merchant_context.get_merchant_account().get_id(),\n &fetch_constraints,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n let data: Vec =\n list.into_iter().map(ForeignFrom::foreign_from).collect();\n\n let active_attempt_ids = db\n .get_filtered_active_attempt_ids_for_total_count(\n merchant_context.get_merchant_account().get_id(),\n &fetch_constraints,\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while retrieving active_attempt_ids for merchant\")?;\n\n let total_count = if constraints.has_no_attempt_filters() {\n i64::try_from(active_attempt_ids.len())\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while converting from usize to i64\")\n } else {\n let active_attempt_ids = active_attempt_ids\n .into_iter()\n .flatten()\n .collect::>();\n\n db.get_total_count_of_filtered_payment_attempts(\n merchant_context.get_merchant_account().get_id(),\n &active_attempt_ids,\n constraints.connector,\n constraints.payment_method_type,\n constraints.payment_method_subtype,\n constraints.authentication_type,\n constraints.merchant_connector_id,\n constraints.card_network,\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while retrieving total count of payment attempts\")\n }?;\n\n Ok(services::ApplicationResponse::Json(\n api_models::payments::PaymentListResponse {\n count: data.len(),\n total_count,\n data,\n },\n ))\n },\n &metrics::PAYMENT_LIST_LATENCY,\n router_env::metric_attributes!((\n \"merchant_id\",\n merchant_context.get_merchant_account().get_id().clone()\n )),\n )\n .await\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use router_types::transformers::ForeignFrom;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use router_types::transformers::ForeignFrom;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_connector_customer_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_customer_id(&mut self, customer_id: Option) {\n self.connector_customer_id = customer_id;\n }", + "after_code": "fn set_connector_customer_id(&mut self, customer_id: Option) {\n self.connector_customer_id = customer_id;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_poll_config", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_poll_config(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_poll_config(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::RelayWebhooks", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl RelayWebhooks {\n pub fn server(state: AppState) -> Scope {\n use api_models::webhooks as webhook_type;\n web::scope(\"/webhooks/relay\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/{merchant_id}/{connector_id}\").route(\n web::post().to(receive_incoming_relay_webhook::),\n ))\n }\n}", + "after_code": "impl RelayWebhooks {\n pub fn server(state: AppState) -> Scope {\n use api_models::webhooks as webhook_type;\n web::scope(\"/webhooks/relay\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/{merchant_id}/{connector_id}\").route(\n web::post().to(receive_incoming_relay_webhook::),\n ))\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use api_models::webhooks as webhook_type;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use api_models::webhooks as webhook_type;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Files", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Files;", + "after_code": "pub struct Files;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_token(&self) -> Option<&str> {\n todo!()\n }", + "after_code": "fn get_token(&self) -> Option<&str> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_force_sync", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_force_sync(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_force_sync(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_recurring_mandate_payment_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }", + "after_code": "fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::function::deserialize_hashset", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn deserialize_hashset<'a, D, T>(deserializer: D) -> Result, D::Error>\nwhere\n D: serde::Deserializer<'a>,\n T: Eq + std::str::FromStr + std::hash::Hash,\n ::Err: std::fmt::Display,\n{\n use serde::de::Error;\n\n deserialize_hashset_inner(::deserialize(deserializer)?).map_err(D::Error::custom)\n}", + "after_code": "fn deserialize_hashset<'a, D, T>(deserializer: D) -> Result, D::Error>\nwhere\n D: serde::Deserializer<'a>,\n T: Eq + std::str::FromStr + std::hash::Hash,\n ::Err: std::fmt::Display,\n{\n use serde::de::Error;\n\n deserialize_hashset_inner(::deserialize(deserializer)?).map_err(D::Error::custom)\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use super::deserialize_hashset;", + "use serde::de::Error;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use serde::de::Error;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::Multitenancy::function::get_tenant", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn get_tenant(&self, tenant_id: &id_type::TenantId) -> Option<&Tenant> {\n self.tenants.0.get(tenant_id)\n }", + "after_code": "pub fn get_tenant(&self, tenant_id: &id_type::TenantId) -> Option<&Tenant> {\n self.tenants.0.get(tenant_id)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments/flows/external_proxy_flow.rs::types::ExternalVaultProxyPaymentsRouterData::function::decide_flows", + "file": "crates/router/src/core/payments/flows/external_proxy_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "async fn decide_flows<'a>(\n mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n business_profile: &domain::Profile,\n header_payload: domain_payments::HeaderPayload,\n return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::ExternalVaultProxy,\n types::ExternalVaultProxyPaymentsData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n logger::debug!(auth_type=?self.auth_type);\n let mut auth_router_data = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action.clone(),\n connector_request,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n\n // External vault proxy doesn't use integrity checks\n auth_router_data.integrity_check = Ok(());\n metrics::PAYMENT_COUNT.add(1, &[]);\n\n Ok(auth_router_data)\n }", + "after_code": "async fn decide_flows<'a>(\n mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n business_profile: &domain::Profile,\n header_payload: domain_payments::HeaderPayload,\n return_raw_connector_response: Option,\n gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::ExternalVaultProxy,\n types::ExternalVaultProxyPaymentsData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n logger::debug!(auth_type=?self.auth_type);\n let mut auth_router_data = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action.clone(),\n connector_request,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n\n // External vault proxy doesn't use integrity checks\n auth_router_data.integrity_check = Ok(());\n metrics::PAYMENT_COUNT.add(1, &[]);\n\n Ok(auth_router_data)\n }", + "diff_span": { + "before": "", + "after": " header_payload: domain_payments::HeaderPayload,\n return_raw_connector_response: Option,\n gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/configs/settings.rs::struct::Payouts", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Payouts {\n pub payout_eligibility: bool,\n #[serde(default)]\n pub required_fields: PayoutRequiredFields,\n}", + "after_code": "pub struct Payouts {\n pub payout_eligibility: bool,\n #[serde(default)]\n pub required_fields: PayoutRequiredFields,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::MerchantIdAuthSettings", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct MerchantIdAuthSettings {\n pub merchant_id_auth_enabled: bool,\n}", + "after_code": "pub struct MerchantIdAuthSettings {\n pub merchant_id_auth_enabled: bool,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_intent(&self) -> &storage::PaymentIntent {\n &self.payment_intent\n }", + "after_code": "fn get_payment_intent(&self) -> &storage::PaymentIntent {\n &self.payment_intent\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_vault_session_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_vault_session_details(\n &mut self,\n external_vault_session_details: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_vault_session_details(\n &mut self,\n external_vault_session_details: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::PaymentStatusData", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl OperationSessionSetters for PaymentStatusData {\n #[cfg(feature = \"v2\")]\n fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(straight_through_algorithm);\n }\n fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }\n fn set_client_secret(&mut self, client_secret: Option>) {\n todo!()\n }\n fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }\n\n fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }\n\n fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }\n\n fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }\n\n fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }\n\n fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n todo!()\n }\n\n fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }\n\n fn set_pm_token(&mut self, _token: String) {\n todo!()\n }\n\n fn set_connector_customer_id(&mut self, _customer_id: Option) {\n // TODO: handle this case. Should we add connector_customer_id in paymentConfirmData?\n }\n\n fn push_sessions_token(&mut self, _token: api::SessionToken) {\n todo!()\n }\n\n fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }\n\n #[track_caller]\n fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n todo!()\n }\n\n fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }\n\n fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }\n\n fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }\n\n fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }\n\n fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }\n\n fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }\n\n fn set_connector_in_payment_attempt(&mut self, connector: Option) {\n self.payment_attempt.connector = connector;\n }\n\n fn set_connector_request_reference_id(&mut self, reference_id: Option) {\n todo!()\n }\n\n fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n todo!()\n }\n\n fn set_vault_session_details(\n &mut self,\n external_vault_session_details: Option,\n ) {\n todo!()\n }\n fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n todo!()\n }\n\n fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n todo!()\n }\n\n fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n todo!()\n }\n}", + "after_code": "impl OperationSessionSetters for PaymentStatusData {\n #[cfg(feature = \"v2\")]\n fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(straight_through_algorithm);\n }\n fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }\n fn set_client_secret(&mut self, client_secret: Option>) {\n todo!()\n }\n fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }\n\n fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }\n\n fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }\n\n fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }\n\n fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }\n\n fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n todo!()\n }\n\n fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }\n\n fn set_pm_token(&mut self, _token: String) {\n todo!()\n }\n\n fn set_connector_customer_id(&mut self, _customer_id: Option) {\n // TODO: handle this case. Should we add connector_customer_id in paymentConfirmData?\n }\n\n fn push_sessions_token(&mut self, _token: api::SessionToken) {\n todo!()\n }\n\n fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }\n\n #[track_caller]\n fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n todo!()\n }\n\n fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }\n\n fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }\n\n fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }\n\n fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }\n\n fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }\n\n fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }\n\n fn set_connector_in_payment_attempt(&mut self, connector: Option) {\n self.payment_attempt.connector = connector;\n }\n\n fn set_connector_request_reference_id(&mut self, reference_id: Option) {\n todo!()\n }\n\n fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n todo!()\n }\n\n fn set_vault_session_details(\n &mut self,\n external_vault_session_details: Option,\n ) {\n todo!()\n }\n fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n todo!()\n }\n\n fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n todo!()\n }\n\n fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n todo!()\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ], + "after_imports": [ + "use std::future;", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::PaymentMethodSession", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl PaymentMethodSession {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/v2/payment-method-sessions\").app_data(web::Data::new(state));\n route = route.service(\n web::resource(\"\")\n .route(web::post().to(payment_methods::payment_methods_session_create)),\n );\n\n route =\n route.service(\n web::scope(\"/{payment_method_session_id}\")\n .service(\n web::resource(\"\")\n .route(web::get().to(payment_methods::payment_methods_session_retrieve))\n .route(web::put().to(payment_methods::payment_methods_session_update))\n .route(web::delete().to(\n payment_methods::payment_method_session_delete_saved_payment_method,\n )),\n )\n .service(web::resource(\"/list-payment-methods\").route(\n web::get().to(payment_methods::payment_method_session_list_payment_methods),\n ))\n .service(\n web::resource(\"/confirm\")\n .route(web::post().to(payment_methods::payment_method_session_confirm)),\n )\n .service(web::resource(\"/update-saved-payment-method\").route(\n web::put().to(\n payment_methods::payment_method_session_update_saved_payment_method,\n ),\n )),\n );\n\n route\n }\n}", + "after_code": "impl PaymentMethodSession {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/v2/payment-method-sessions\").app_data(web::Data::new(state));\n route = route.service(\n web::resource(\"\")\n .route(web::post().to(payment_methods::payment_methods_session_create)),\n );\n\n route =\n route.service(\n web::scope(\"/{payment_method_session_id}\")\n .service(\n web::resource(\"\")\n .route(web::get().to(payment_methods::payment_methods_session_retrieve))\n .route(web::put().to(payment_methods::payment_methods_session_update))\n .route(web::delete().to(\n payment_methods::payment_method_session_delete_saved_payment_method,\n )),\n )\n .service(web::resource(\"/list-payment-methods\").route(\n web::get().to(payment_methods::payment_method_session_list_payment_methods),\n ))\n .service(\n web::resource(\"/confirm\")\n .route(web::post().to(payment_methods::payment_method_session_confirm)),\n )\n .service(web::resource(\"/update-saved-payment-method\").route(\n web::put().to(\n payment_methods::payment_method_session_update_saved_payment_method,\n ),\n )),\n );\n\n route\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::payment_methods;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use super::payment_methods;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/approve_flow.rs::impl::PaymentData", + "file": "crates/router/src/core/payments/flows/approve_flow.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl\n ConstructFlowSpecificData\n for PaymentData\n{\n #[cfg(feature = \"v2\")]\n async fn construct_router_data<'a>(\n &self,\n state: &SessionState,\n connector_id: &str,\n merchant_context: &domain::MerchantContext,\n customer: &Option,\n merchant_connector_account: &domain::MerchantConnectorAccountTypeDetails,\n merchant_recipient_data: Option,\n header_payload: Option,\n ) -> RouterResult {\n todo!()\n }\n\n #[cfg(feature = \"v1\")]\n async fn construct_router_data<'a>(\n &self,\n state: &SessionState,\n connector_id: &str,\n merchant_context: &domain::MerchantContext,\n customer: &Option,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n merchant_recipient_data: Option,\n header_payload: Option,\n _payment_method: Option,\n _payment_method_type: Option,\n ) -> RouterResult {\n Box::pin(transformers::construct_payment_router_data::<\n api::Approve,\n types::PaymentsApproveData,\n >(\n state,\n self.clone(),\n connector_id,\n merchant_context,\n customer,\n merchant_connector_account,\n merchant_recipient_data,\n header_payload,\n None,\n None,\n ))\n .await\n }\n}", + "after_code": "impl\n ConstructFlowSpecificData\n for PaymentData\n{\n #[cfg(feature = \"v2\")]\n async fn construct_router_data<'a>(\n &self,\n state: &SessionState,\n connector_id: &str,\n merchant_context: &domain::MerchantContext,\n customer: &Option,\n merchant_connector_account: &domain::MerchantConnectorAccountTypeDetails,\n merchant_recipient_data: Option,\n header_payload: Option,\n ) -> RouterResult {\n todo!()\n }\n\n #[cfg(feature = \"v1\")]\n async fn construct_router_data<'a>(\n &self,\n state: &SessionState,\n connector_id: &str,\n merchant_context: &domain::MerchantContext,\n customer: &Option,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n merchant_recipient_data: Option,\n header_payload: Option,\n _payment_method: Option,\n _payment_method_type: Option,\n ) -> RouterResult {\n Box::pin(transformers::construct_payment_router_data::<\n api::Approve,\n types::PaymentsApproveData,\n >(\n state,\n self.clone(),\n connector_id,\n merchant_context,\n customer,\n merchant_connector_account,\n merchant_recipient_data,\n header_payload,\n None,\n None,\n ))\n .await\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::{ConstructFlowSpecificData, Feature};", + "use crate::{\n core::{\n errors::{ApiErrorResponse, NotImplementedMessage, RouterResult},\n payments::{self, access_token, helpers, transformers, PaymentData},\n },\n routes::SessionState,\n services,\n types::{self, api, domain},\n};" + ], + "after_imports": [ + "use super::{ConstructFlowSpecificData, Feature};", + "use crate::{\n core::{\n errors::{ApiErrorResponse, NotImplementedMessage, RouterResult},\n payments::{\n self, access_token, flows::gateway_context, helpers, transformers, PaymentData,\n },\n },\n routes::SessionState,\n services,\n types::{self, api, domain},\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::ProcessTrackerDeprecated::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n use super::process_tracker::revenue_recovery;\n // TODO: Deprecated. Remove this in favour of /v2/process-trackers\n web::scope(\"/v2/process_tracker/revenue_recovery_workflow\")\n .app_data(web::Data::new(state.clone()))\n .service(\n web::resource(\"/{revenue_recovery_id}\")\n .route(web::get().to(revenue_recovery::revenue_recovery_pt_retrieve_api)),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n use super::process_tracker::revenue_recovery;\n // TODO: Deprecated. Remove this in favour of /v2/process-trackers\n web::scope(\"/v2/process_tracker/revenue_recovery_workflow\")\n .app_data(web::Data::new(state.clone()))\n .service(\n web::resource(\"/{revenue_recovery_id}\")\n .route(web::get().to(revenue_recovery::revenue_recovery_pt_retrieve_api)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::process_tracker::revenue_recovery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::process_tracker::revenue_recovery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::impl::CellInformation", + "file": "crates/router/src/configs/settings.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Default for CellInformation {\n fn default() -> Self {\n // We provide a static default cell id for constructing application settings.\n // This will only panic at application startup if we're unable to construct the default,\n // around the time of deserializing application settings.\n // And a panic at application startup is considered acceptable.\n #[allow(clippy::expect_used)]\n let cell_id =\n id_type::CellId::from_string(\"defid\").expect(\"Failed to create a default for Cell Id\");\n Self { id: cell_id }\n }\n}", + "after_code": "impl Default for CellInformation {\n fn default() -> Self {\n // We provide a static default cell id for constructing application settings.\n // This will only panic at application startup if we're unable to construct the default,\n // around the time of deserializing application settings.\n // And a panic at application startup is considered acceptable.\n #[allow(clippy::expect_used)]\n let cell_id =\n id_type::CellId::from_string(\"defid\").expect(\"Failed to create a default for Cell Id\");\n Self { id: cell_id }\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Files::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/files\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(files::files_create)))\n .service(\n web::resource(\"/{file_id}\")\n .route(web::delete().to(files::files_delete))\n .route(web::get().to(files::files_retrieve)),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/files\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(files::files_create)))\n .service(\n web::resource(\"/{file_id}\")\n .route(web::delete().to(files::files_delete))\n .route(web::get().to(files::files_retrieve)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Verify::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/verify\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/apple-pay/{merchant_id}\")\n .route(web::post().to(apple_pay_merchant_registration)),\n )\n .service(\n web::resource(\"/applepay-verified-domains\")\n .route(web::get().to(retrieve_apple_pay_verified_domains)),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/verify\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/apple-pay/{merchant_id}\")\n .route(web::post().to(apple_pay_merchant_registration)),\n )\n .service(\n web::resource(\"/applepay-verified-domains\")\n .route(web::get().to(retrieve_apple_pay_verified_domains)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::verification::{apple_pay_merchant_registration, retrieve_apple_pay_verified_domains};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use super::verification::{apple_pay_merchant_registration, retrieve_apple_pay_verified_domains};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows.rs::function::call_capture_request", + "file": "crates/router/src/core/payments/flows.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "pub async fn call_capture_request(\n mut capture_router_data: types::RouterData<\n api::Capture,\n PaymentsCaptureData,\n types::PaymentsResponseData,\n >,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n business_profile: &domain::Profile,\n header_payload: domain_payments::HeaderPayload,\n) -> RouterResult>\n{\n // Build capture-specific connector request\n let (connector_request, _should_continue_further) = capture_router_data\n .build_flow_specific_connector_request(state, connector, call_connector_action.clone())\n .await?;\n\n // Execute capture flow\n capture_router_data\n .decide_flows(\n state,\n connector,\n call_connector_action,\n connector_request,\n business_profile,\n header_payload.clone(),\n None,\n )\n .await\n}", + "after_code": "pub async fn call_capture_request(\n mut capture_router_data: types::RouterData<\n api::Capture,\n PaymentsCaptureData,\n types::PaymentsResponseData,\n >,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n business_profile: &domain::Profile,\n header_payload: domain_payments::HeaderPayload,\n) -> RouterResult>\n{\n // Build capture-specific connector request\n let (connector_request, _should_continue_further) = capture_router_data\n .build_flow_specific_connector_request(state, connector, call_connector_action.clone())\n .await?;\n\n // Execute capture flow\n capture_router_data\n .decide_flows(\n state,\n connector,\n call_connector_action,\n connector_request,\n business_profile,\n header_payload.clone(),\n None,\n None, // gateway_context\n )\n .await\n}", + "diff_span": { + "before": "", + "after": " header_payload.clone(),\n None,\n None, // gateway_context\n )\n .await" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/configs/settings.rs::struct::DrainerSettings", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct DrainerSettings {\n pub stream_name: String,\n pub num_partitions: u8,\n pub max_read_count: u64,\n pub shutdown_interval: u32, // in milliseconds\n pub loop_interval: u32, // in milliseconds\n}", + "after_code": "pub struct DrainerSettings {\n pub stream_name: String,\n pub num_partitions: u8,\n pub max_read_count: u64,\n pub shutdown_interval: u32, // in milliseconds\n pub loop_interval: u32, // in milliseconds\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::call_unified_connector_service_for_external_proxy", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn call_unified_connector_service_for_external_proxy(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n _connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n customer: &Option,\n _call_connector_action: CallConnectorAction,\n _schedule_time: Option,\n header_payload: HeaderPayload,\n frm_suggestion: Option,\n business_profile: &domain::Profile,\n _is_retry_payment: bool,\n _should_retry_with_pan: bool,\n _return_raw_connector_response: Option,\n merchant_connector_account_type_details: domain::MerchantConnectorAccountTypeDetails,\n external_vault_merchant_connector_account_type_details: domain::MerchantConnectorAccountTypeDetails,\n mut router_data: RouterData,\n _updated_customer: Option,\n) -> RouterResult>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n record_time_taken_with(|| async {\n (_, *payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data.clone(),\n customer.clone(),\n merchant_context.get_merchant_account().storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n frm_suggestion,\n header_payload.clone(),\n )\n .await?;\n let lineage_ids = grpc_client::LineageIds::new(\n business_profile.merchant_id.clone(),\n business_profile.get_id().clone(),\n );\n\n // Extract merchant_order_reference_id from payment data for UCS audit trail\n let merchant_order_reference_id = payment_data\n .get_payment_intent()\n .merchant_reference_id\n .clone()\n .map(|id| id.get_string_repr().to_string());\n\n router_data\n .call_unified_connector_service_with_external_vault_proxy(\n state,\n &header_payload,\n lineage_ids,\n merchant_connector_account_type_details.clone(),\n external_vault_merchant_connector_account_type_details.clone(),\n merchant_context,\n ExecutionMode::Primary, //UCS is called in primary mode\n merchant_order_reference_id,\n )\n .await?;\n\n Ok(router_data)\n })\n .await\n}", + "after_code": "pub async fn call_unified_connector_service_for_external_proxy(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n _connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n customer: &Option,\n _call_connector_action: CallConnectorAction,\n _schedule_time: Option,\n header_payload: HeaderPayload,\n frm_suggestion: Option,\n business_profile: &domain::Profile,\n _is_retry_payment: bool,\n _should_retry_with_pan: bool,\n _return_raw_connector_response: Option,\n merchant_connector_account_type_details: domain::MerchantConnectorAccountTypeDetails,\n external_vault_merchant_connector_account_type_details: domain::MerchantConnectorAccountTypeDetails,\n mut router_data: RouterData,\n _updated_customer: Option,\n) -> RouterResult>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n record_time_taken_with(|| async {\n (_, *payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data.clone(),\n customer.clone(),\n merchant_context.get_merchant_account().storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n frm_suggestion,\n header_payload.clone(),\n )\n .await?;\n let lineage_ids = grpc_client::LineageIds::new(\n business_profile.merchant_id.clone(),\n business_profile.get_id().clone(),\n );\n\n // Extract merchant_order_reference_id from payment data for UCS audit trail\n let merchant_order_reference_id = payment_data\n .get_payment_intent()\n .merchant_reference_id\n .clone()\n .map(|id| id.get_string_repr().to_string());\n\n router_data\n .call_unified_connector_service_with_external_vault_proxy(\n state,\n &header_payload,\n lineage_ids,\n merchant_connector_account_type_details.clone(),\n external_vault_merchant_connector_account_type_details.clone(),\n merchant_context,\n ExecutionMode::Primary, //UCS is called in primary mode\n merchant_order_reference_id,\n )\n .await?;\n\n Ok(router_data)\n })\n .await\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use external_services::grpc_client;" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use external_services::grpc_client;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_payment_attempt_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_attempt_connector(&self) -> Option<&str> {\n self.payment_attempt.connector.as_deref()\n }", + "after_code": "fn get_payment_attempt_connector(&self) -> Option<&str> {\n self.payment_attempt.connector.as_deref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_address", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_address(&self) -> &PaymentAddress {\n &self.payment_address\n }", + "after_code": "fn get_address(&self) -> &PaymentAddress {\n &self.payment_address\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Recon::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/recon\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/{merchant_id}/update\")\n .route(web::post().to(recon_routes::update_merchant)),\n )\n .service(web::resource(\"/token\").route(web::get().to(recon_routes::get_recon_token)))\n .service(\n web::resource(\"/request\").route(web::post().to(recon_routes::request_for_recon)),\n )\n .service(\n web::resource(\"/verify_token\")\n .route(web::get().to(recon_routes::verify_recon_token)),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/recon\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/{merchant_id}/update\")\n .route(web::post().to(recon_routes::update_merchant)),\n )\n .service(web::resource(\"/token\").route(web::get().to(recon_routes::get_recon_token)))\n .service(\n web::resource(\"/request\").route(web::post().to(recon_routes::request_for_recon)),\n )\n .service(\n web::resource(\"/verify_token\")\n .route(web::get().to(recon_routes::verify_recon_token)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::AppState::function::email_client", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn email_client(&self) -> Arc> {\n self.email_client.to_owned()\n }", + "after_code": "fn email_client(&self) -> Arc> {\n self.email_client.to_owned()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Gsm", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Gsm;", + "after_code": "pub struct Gsm;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::FeatureMatrix", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct FeatureMatrix;", + "after_code": "pub struct FeatureMatrix;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::TenantConfig::function::get_store_interface_map", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn get_store_interface_map(\n &self,\n storage_impl: &app::StorageImpl,\n conf: &configs::Settings,\n cache_store: Arc,\n testable: bool,\n ) -> HashMap> {\n #[allow(clippy::expect_used)]\n let event_handler = conf\n .events\n .get_event_handler()\n .await\n .expect(\"Failed to create event handler\");\n futures::future::join_all(self.0.iter().map(|(tenant_name, tenant)| async {\n let store = AppState::get_store_interface(\n storage_impl,\n &event_handler,\n conf,\n tenant,\n cache_store.clone(),\n testable,\n )\n .await\n .get_storage_interface();\n (tenant_name.clone(), store)\n }))\n .await\n .into_iter()\n .collect()\n }", + "after_code": "pub async fn get_store_interface_map(\n &self,\n storage_impl: &app::StorageImpl,\n conf: &configs::Settings,\n cache_store: Arc,\n testable: bool,\n ) -> HashMap> {\n #[allow(clippy::expect_used)]\n let event_handler = conf\n .events\n .get_event_handler()\n .await\n .expect(\"Failed to create event handler\");\n futures::future::join_all(self.0.iter().map(|(tenant_name, tenant)| async {\n let store = AppState::get_store_interface(\n storage_impl,\n &event_handler,\n conf,\n tenant,\n cache_store.clone(),\n testable,\n )\n .await\n .get_storage_interface();\n (tenant_name.clone(), store)\n }))\n .await\n .into_iter()\n .collect()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::collections::{HashMap, HashSet};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::FallbackMerchantIds", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct FallbackMerchantIds {\n #[serde(deserialize_with = \"deserialize_merchant_ids\")]\n pub merchant_ids: HashSet,\n}", + "after_code": "pub struct FallbackMerchantIds {\n #[serde(deserialize_with = \"deserialize_merchant_ids\")]\n pub merchant_ids: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::{HashMap, HashSet};", + "use std::collections::HashSet;" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::call_connector_service", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": true, + "before_code": "pub async fn call_connector_service(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n customer: &Option,\n call_connector_action: CallConnectorAction,\n schedule_time: Option,\n header_payload: HeaderPayload,\n frm_suggestion: Option,\n business_profile: &domain::Profile,\n is_retry_payment: bool,\n should_retry_with_pan: bool,\n return_raw_connector_response: Option,\n merchant_connector_account_type_details: domain::MerchantConnectorAccountTypeDetails,\n mut router_data: RouterData,\n updated_customer: Option,\n tokenization_action: TokenizationAction,\n) -> RouterResult>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector: services::api::ConnectorIntegration\n + Send\n + Sync,\n{\n let add_access_token_result = router_data\n .add_access_token(\n state,\n &connector,\n merchant_context,\n payment_data.get_creds_identifier(),\n )\n .await?;\n\n router_data = router_data.add_session_token(state, &connector).await?;\n\n let should_continue_further = access_token::update_router_data_with_access_token_result(\n &add_access_token_result,\n &mut router_data,\n &call_connector_action,\n );\n let payment_method_token_response = router_data\n .add_payment_method_token(\n state,\n &connector,\n &tokenization_action,\n should_continue_further,\n )\n .await?;\n let should_continue_further = tokenization::update_router_data_with_payment_method_token_result(\n payment_method_token_response,\n &mut router_data,\n is_retry_payment,\n should_continue_further,\n );\n let should_continue = match router_data\n .create_order_at_connector(state, &connector, should_continue_further)\n .await?\n {\n Some(create_order_response) => {\n if let Ok(order_id) = create_order_response.clone().create_order_result {\n payment_data.set_connector_response_reference_id(Some(order_id))\n }\n\n // Set the response in routerdata response to carry forward\n router_data\n .update_router_data_with_create_order_response(create_order_response.clone());\n create_order_response.create_order_result.ok().map(|_| ())\n }\n // If create order is not required, then we can proceed with further processing\n None => Some(()),\n };\n\n // In case of authorize flow, pre-task and post-tasks are being called in build request\n // if we do not want to proceed further, then the function will return Ok(None, false)\n let (connector_request, should_continue_further) = match should_continue {\n Some(_) => {\n router_data\n .build_flow_specific_connector_request(\n state,\n &connector,\n call_connector_action.clone(),\n )\n .await?\n }\n None => (None, false),\n };\n\n // Update the payment trackers just before calling the connector\n // Since the request is already built in the previous step,\n // there should be no error in request construction from hyperswitch end\n (_, *payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data.clone(),\n customer.clone(),\n merchant_context.get_merchant_account().storage_scheme,\n updated_customer,\n merchant_context.get_merchant_key_store(),\n frm_suggestion,\n header_payload.clone(),\n )\n .await?;\n\n let router_data = if should_continue_further {\n // The status of payment_attempt and intent will be updated in the previous step\n // update this in router_data.\n // This is added because few connector integrations do not update the status,\n // and rely on previous status set in router_data\n // TODO: status is already set when constructing payment data, why should this be done again?\n // router_data.status = payment_data.get_payment_attempt().status;\n router_data\n .decide_flows(\n state,\n &connector,\n call_connector_action,\n connector_request,\n business_profile,\n header_payload.clone(),\n return_raw_connector_response,\n )\n .await\n } else {\n Ok(router_data)\n }?;\n\n Ok(router_data)\n}", + "after_code": "pub async fn call_connector_service(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n customer: &Option,\n call_connector_action: CallConnectorAction,\n schedule_time: Option,\n header_payload: HeaderPayload,\n frm_suggestion: Option,\n business_profile: &domain::Profile,\n is_retry_payment: bool,\n should_retry_with_pan: bool,\n return_raw_connector_response: Option,\n merchant_connector_account_type_details: domain::MerchantConnectorAccountTypeDetails,\n mut router_data: RouterData,\n updated_customer: Option,\n tokenization_action: TokenizationAction,\n) -> RouterResult>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector: services::api::ConnectorIntegration\n + Send\n + Sync,\n{\n let add_access_token_result = router_data\n .add_access_token(\n state,\n &connector,\n merchant_context,\n payment_data.get_creds_identifier(),\n )\n .await?;\n\n router_data = router_data.add_session_token(state, &connector).await?;\n\n let should_continue_further = access_token::update_router_data_with_access_token_result(\n &add_access_token_result,\n &mut router_data,\n &call_connector_action,\n );\n let payment_method_token_response = router_data\n .add_payment_method_token(\n state,\n &connector,\n &tokenization_action,\n should_continue_further,\n )\n .await?;\n let should_continue_further = tokenization::update_router_data_with_payment_method_token_result(\n payment_method_token_response,\n &mut router_data,\n is_retry_payment,\n should_continue_further,\n );\n let should_continue = match router_data\n .create_order_at_connector(state, &connector, should_continue_further)\n .await?\n {\n Some(create_order_response) => {\n if let Ok(order_id) = create_order_response.clone().create_order_result {\n payment_data.set_connector_response_reference_id(Some(order_id))\n }\n\n // Set the response in routerdata response to carry forward\n router_data\n .update_router_data_with_create_order_response(create_order_response.clone());\n create_order_response.create_order_result.ok().map(|_| ())\n }\n // If create order is not required, then we can proceed with further processing\n None => Some(()),\n };\n\n // In case of authorize flow, pre-task and post-tasks are being called in build request\n // if we do not want to proceed further, then the function will return Ok(None, false)\n let (connector_request, should_continue_further) = match should_continue {\n Some(_) => {\n router_data\n .build_flow_specific_connector_request(\n state,\n &connector,\n call_connector_action.clone(),\n )\n .await?\n }\n None => (None, false),\n };\n\n // Update the payment trackers just before calling the connector\n // Since the request is already built in the previous step,\n // there should be no error in request construction from hyperswitch end\n (_, *payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data.clone(),\n customer.clone(),\n merchant_context.get_merchant_account().storage_scheme,\n updated_customer,\n merchant_context.get_merchant_key_store(),\n frm_suggestion,\n header_payload.clone(),\n )\n .await?;\n\n let router_data = if should_continue_further {\n // The status of payment_attempt and intent will be updated in the previous step\n // update this in router_data.\n // This is added because few connector integrations do not update the status,\n // and rely on previous status set in router_data\n // TODO: status is already set when constructing payment data, why should this be done again?\n // router_data.status = payment_data.get_payment_attempt().status;\n router_data\n .decide_flows(\n state,\n &connector,\n call_connector_action,\n connector_request,\n business_profile,\n header_payload.clone(),\n return_raw_connector_response,\n None,\n )\n .await\n } else {\n Ok(router_data)\n }?;\n\n Ok(router_data)\n}", + "diff_span": { + "before": "", + "after": " header_payload.clone(),\n return_raw_connector_response,\n None,\n )\n .await" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::enum::ApplePayPreDecryptFlow", + "file": "crates/router/src/configs/settings.rs", + "kind": "enum_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub enum ApplePayPreDecryptFlow {\n #[default]\n ConnectorTokenization,\n NetworkTokenization,\n}", + "after_code": "pub enum ApplePayPreDecryptFlow {\n #[default]\n ConnectorTokenization,\n NetworkTokenization,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_prerouting_algorithm_in_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(straight_through_algorithm);\n }", + "after_code": "fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(straight_through_algorithm);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_disputes", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_disputes(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_disputes(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_attempts", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_attempts(&self) -> Option> {\n todo!()\n }", + "after_code": "fn get_attempts(&self) -> Option> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_frm_message", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }", + "after_code": "fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::push_sessions_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn push_sessions_token(&mut self, token: api::SessionToken) {\n self.sessions_token.push(token);\n }", + "after_code": "fn push_sessions_token(&mut self, token: api::SessionToken) {\n self.sessions_token.push(token);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::payment_external_authentication", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn payment_external_authentication(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n req: api_models::payments::PaymentsExternalAuthenticationRequest,\n) -> RouterResponse {\n use super::unified_authentication_service::types::ExternalAuthentication;\n use crate::core::unified_authentication_service::{\n types::UnifiedAuthenticationService, utils::external_authentication_update_trackers,\n };\n\n let db = &*state.store;\n let key_manager_state = &(&state).into();\n\n let merchant_id = merchant_context.get_merchant_account().get_id();\n let storage_scheme = merchant_context.get_merchant_account().storage_scheme;\n let payment_id = req.payment_id;\n let payment_intent = db\n .find_payment_intent_by_payment_id_merchant_id(\n key_manager_state,\n &payment_id,\n merchant_id,\n merchant_context.get_merchant_key_store(),\n storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n let attempt_id = payment_intent.active_attempt.get_id().clone();\n let payment_attempt = db\n .find_payment_attempt_by_payment_id_merchant_id_attempt_id(\n &payment_intent.payment_id,\n merchant_id,\n &attempt_id.clone(),\n storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n if payment_attempt.external_three_ds_authentication_attempted != Some(true) {\n Err(errors::ApiErrorResponse::PreconditionFailed {\n message:\n \"You cannot authenticate this payment because payment_attempt.external_three_ds_authentication_attempted is false\".to_owned(),\n })?\n }\n helpers::validate_payment_status_against_allowed_statuses(\n payment_intent.status,\n &[storage_enums::IntentStatus::RequiresCustomerAction],\n \"authenticate\",\n )?;\n\n let optional_customer = match &payment_intent.customer_id {\n Some(customer_id) => Some(\n state\n .store\n .find_customer_by_customer_id_merchant_id(\n key_manager_state,\n customer_id,\n merchant_context.get_merchant_account().get_id(),\n merchant_context.get_merchant_key_store(),\n storage_scheme,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable_lazy(|| {\n format!(\"error while finding customer with customer_id {customer_id:?}\")\n })?,\n ),\n None => None,\n };\n\n let profile_id = payment_intent\n .profile_id\n .as_ref()\n .get_required_value(\"profile_id\")\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"'profile_id' not set in payment intent\")?;\n let currency = payment_attempt.currency.get_required_value(\"currency\")?;\n let amount = payment_attempt.get_total_amount();\n let shipping_address = helpers::create_or_find_address_for_payment_by_request(\n &state,\n None,\n payment_intent.shipping_address_id.as_deref(),\n merchant_id,\n payment_intent.customer_id.as_ref(),\n merchant_context.get_merchant_key_store(),\n &payment_intent.payment_id,\n storage_scheme,\n )\n .await?;\n let billing_address = helpers::create_or_find_address_for_payment_by_request(\n &state,\n None,\n payment_attempt\n .payment_method_billing_address_id\n .as_deref()\n .or(payment_intent.billing_address_id.as_deref()),\n merchant_id,\n payment_intent.customer_id.as_ref(),\n merchant_context.get_merchant_key_store(),\n &payment_intent.payment_id,\n storage_scheme,\n )\n .await?;\n let authentication_connector = payment_attempt\n .authentication_connector\n .clone()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"authentication_connector not found in payment_attempt\")?;\n let merchant_connector_account = helpers::get_merchant_connector_account(\n &state,\n merchant_id,\n None,\n merchant_context.get_merchant_key_store(),\n profile_id,\n authentication_connector.as_str(),\n None,\n )\n .await?;\n let authentication = db\n .find_authentication_by_merchant_id_authentication_id(\n merchant_id,\n &payment_attempt\n .authentication_id\n .clone()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing authentication_id in payment_attempt\")?,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while fetching authentication record\")?;\n\n let business_profile = state\n .store\n .find_business_profile_by_profile_id(\n key_manager_state,\n merchant_context.get_merchant_key_store(),\n profile_id,\n )\n .await\n .change_context(errors::ApiErrorResponse::ProfileNotFound {\n id: profile_id.get_string_repr().to_owned(),\n })?;\n\n let payment_method_details = helpers::get_payment_method_details_from_payment_token(\n &state,\n &payment_attempt,\n &payment_intent,\n merchant_context.get_merchant_key_store(),\n storage_scheme,\n )\n .await?\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing payment_method_details\")?;\n let browser_info: Option = payment_attempt\n .browser_info\n .clone()\n .map(|browser_information| browser_information.parse_value(\"BrowserInformation\"))\n .transpose()\n .change_context(errors::ApiErrorResponse::InvalidDataValue {\n field_name: \"browser_info\",\n })?;\n let payment_connector_name = payment_attempt\n .connector\n .as_ref()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing connector in payment_attempt\")?;\n let return_url = Some(helpers::create_authorize_url(\n &state.base_url,\n &payment_attempt.clone(),\n payment_connector_name,\n ));\n let mca_id_option = merchant_connector_account.get_mca_id(); // Bind temporary value\n let merchant_connector_account_id_or_connector_name = mca_id_option\n .as_ref()\n .map(|mca_id| mca_id.get_string_repr())\n .unwrap_or(&authentication_connector);\n\n let webhook_url = helpers::create_webhook_url(\n &state.base_url,\n merchant_id,\n merchant_connector_account_id_or_connector_name,\n );\n\n let authentication_details = business_profile\n .authentication_connector_details\n .clone()\n .get_required_value(\"authentication_connector_details\")\n .attach_printable(\"authentication_connector_details not configured by the merchant\")?;\n\n let authentication_response = if helpers::is_merchant_eligible_authentication_service(\n merchant_context.get_merchant_account().get_id(),\n &state,\n )\n .await?\n {\n let auth_response =\n ::authentication(\n &state,\n &business_profile,\n &payment_method_details.1,\n browser_info,\n Some(amount),\n Some(currency),\n authentication::MessageCategory::Payment,\n req.device_channel,\n authentication.clone(),\n return_url,\n req.sdk_information,\n req.threeds_method_comp_ind,\n optional_customer.and_then(|customer| customer.email.map(pii::Email::from)),\n webhook_url,\n &merchant_connector_account,\n &authentication_connector,\n Some(payment_intent.payment_id),\n )\n .await?;\n let authentication = external_authentication_update_trackers(\n &state,\n auth_response,\n authentication.clone(),\n None,\n merchant_context.get_merchant_key_store(),\n None,\n None,\n None,\n None,\n )\n .await?;\n authentication::AuthenticationResponse::try_from(authentication)?\n } else {\n Box::pin(authentication_core::perform_authentication(\n &state,\n business_profile.merchant_id,\n authentication_connector,\n payment_method_details.0,\n payment_method_details.1,\n billing_address\n .as_ref()\n .map(|address| address.into())\n .ok_or(errors::ApiErrorResponse::MissingRequiredField {\n field_name: \"billing_address\",\n })?,\n shipping_address.as_ref().map(|address| address.into()),\n browser_info,\n merchant_connector_account,\n Some(amount),\n Some(currency),\n authentication::MessageCategory::Payment,\n req.device_channel,\n authentication,\n return_url,\n req.sdk_information,\n req.threeds_method_comp_ind,\n optional_customer.and_then(|customer| customer.email.map(pii::Email::from)),\n webhook_url,\n authentication_details.three_ds_requestor_url.clone(),\n payment_intent.psd2_sca_exemption_type,\n payment_intent.payment_id,\n payment_intent.force_3ds_challenge_trigger.unwrap_or(false),\n merchant_context.get_merchant_key_store(),\n ))\n .await?\n };\n Ok(services::ApplicationResponse::Json(\n api_models::payments::PaymentsExternalAuthenticationResponse {\n transaction_status: authentication_response.trans_status,\n acs_url: authentication_response\n .acs_url\n .as_ref()\n .map(ToString::to_string),\n challenge_request: authentication_response.challenge_request,\n // If challenge_request_key is None, we send \"creq\" as a static value which is standard 3DS challenge form field name\n challenge_request_key: authentication_response\n .challenge_request_key\n .or(Some(consts::CREQ_CHALLENGE_REQUEST_KEY.to_string())),\n acs_reference_number: authentication_response.acs_reference_number,\n acs_trans_id: authentication_response.acs_trans_id,\n three_dsserver_trans_id: authentication_response.three_dsserver_trans_id,\n acs_signed_content: authentication_response.acs_signed_content,\n three_ds_requestor_url: authentication_details.three_ds_requestor_url,\n three_ds_requestor_app_url: authentication_details.three_ds_requestor_app_url,\n },\n ))\n}", + "after_code": "pub async fn payment_external_authentication(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n req: api_models::payments::PaymentsExternalAuthenticationRequest,\n) -> RouterResponse {\n use super::unified_authentication_service::types::ExternalAuthentication;\n use crate::core::unified_authentication_service::{\n types::UnifiedAuthenticationService, utils::external_authentication_update_trackers,\n };\n\n let db = &*state.store;\n let key_manager_state = &(&state).into();\n\n let merchant_id = merchant_context.get_merchant_account().get_id();\n let storage_scheme = merchant_context.get_merchant_account().storage_scheme;\n let payment_id = req.payment_id;\n let payment_intent = db\n .find_payment_intent_by_payment_id_merchant_id(\n key_manager_state,\n &payment_id,\n merchant_id,\n merchant_context.get_merchant_key_store(),\n storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n let attempt_id = payment_intent.active_attempt.get_id().clone();\n let payment_attempt = db\n .find_payment_attempt_by_payment_id_merchant_id_attempt_id(\n &payment_intent.payment_id,\n merchant_id,\n &attempt_id.clone(),\n storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n if payment_attempt.external_three_ds_authentication_attempted != Some(true) {\n Err(errors::ApiErrorResponse::PreconditionFailed {\n message:\n \"You cannot authenticate this payment because payment_attempt.external_three_ds_authentication_attempted is false\".to_owned(),\n })?\n }\n helpers::validate_payment_status_against_allowed_statuses(\n payment_intent.status,\n &[storage_enums::IntentStatus::RequiresCustomerAction],\n \"authenticate\",\n )?;\n\n let optional_customer = match &payment_intent.customer_id {\n Some(customer_id) => Some(\n state\n .store\n .find_customer_by_customer_id_merchant_id(\n key_manager_state,\n customer_id,\n merchant_context.get_merchant_account().get_id(),\n merchant_context.get_merchant_key_store(),\n storage_scheme,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable_lazy(|| {\n format!(\"error while finding customer with customer_id {customer_id:?}\")\n })?,\n ),\n None => None,\n };\n\n let profile_id = payment_intent\n .profile_id\n .as_ref()\n .get_required_value(\"profile_id\")\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"'profile_id' not set in payment intent\")?;\n let currency = payment_attempt.currency.get_required_value(\"currency\")?;\n let amount = payment_attempt.get_total_amount();\n let shipping_address = helpers::create_or_find_address_for_payment_by_request(\n &state,\n None,\n payment_intent.shipping_address_id.as_deref(),\n merchant_id,\n payment_intent.customer_id.as_ref(),\n merchant_context.get_merchant_key_store(),\n &payment_intent.payment_id,\n storage_scheme,\n )\n .await?;\n let billing_address = helpers::create_or_find_address_for_payment_by_request(\n &state,\n None,\n payment_attempt\n .payment_method_billing_address_id\n .as_deref()\n .or(payment_intent.billing_address_id.as_deref()),\n merchant_id,\n payment_intent.customer_id.as_ref(),\n merchant_context.get_merchant_key_store(),\n &payment_intent.payment_id,\n storage_scheme,\n )\n .await?;\n let authentication_connector = payment_attempt\n .authentication_connector\n .clone()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"authentication_connector not found in payment_attempt\")?;\n let merchant_connector_account = helpers::get_merchant_connector_account(\n &state,\n merchant_id,\n None,\n merchant_context.get_merchant_key_store(),\n profile_id,\n authentication_connector.as_str(),\n None,\n )\n .await?;\n let authentication = db\n .find_authentication_by_merchant_id_authentication_id(\n merchant_id,\n &payment_attempt\n .authentication_id\n .clone()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing authentication_id in payment_attempt\")?,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while fetching authentication record\")?;\n\n let business_profile = state\n .store\n .find_business_profile_by_profile_id(\n key_manager_state,\n merchant_context.get_merchant_key_store(),\n profile_id,\n )\n .await\n .change_context(errors::ApiErrorResponse::ProfileNotFound {\n id: profile_id.get_string_repr().to_owned(),\n })?;\n\n let payment_method_details = helpers::get_payment_method_details_from_payment_token(\n &state,\n &payment_attempt,\n &payment_intent,\n merchant_context.get_merchant_key_store(),\n storage_scheme,\n )\n .await?\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing payment_method_details\")?;\n let browser_info: Option = payment_attempt\n .browser_info\n .clone()\n .map(|browser_information| browser_information.parse_value(\"BrowserInformation\"))\n .transpose()\n .change_context(errors::ApiErrorResponse::InvalidDataValue {\n field_name: \"browser_info\",\n })?;\n let payment_connector_name = payment_attempt\n .connector\n .as_ref()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing connector in payment_attempt\")?;\n let return_url = Some(helpers::create_authorize_url(\n &state.base_url,\n &payment_attempt.clone(),\n payment_connector_name,\n ));\n let mca_id_option = merchant_connector_account.get_mca_id(); // Bind temporary value\n let merchant_connector_account_id_or_connector_name = mca_id_option\n .as_ref()\n .map(|mca_id| mca_id.get_string_repr())\n .unwrap_or(&authentication_connector);\n\n let webhook_url = helpers::create_webhook_url(\n &state.base_url,\n merchant_id,\n merchant_connector_account_id_or_connector_name,\n );\n\n let authentication_details = business_profile\n .authentication_connector_details\n .clone()\n .get_required_value(\"authentication_connector_details\")\n .attach_printable(\"authentication_connector_details not configured by the merchant\")?;\n\n let authentication_response = if helpers::is_merchant_eligible_authentication_service(\n merchant_context.get_merchant_account().get_id(),\n &state,\n )\n .await?\n {\n let auth_response =\n ::authentication(\n &state,\n &business_profile,\n &payment_method_details.1,\n browser_info,\n Some(amount),\n Some(currency),\n authentication::MessageCategory::Payment,\n req.device_channel,\n authentication.clone(),\n return_url,\n req.sdk_information,\n req.threeds_method_comp_ind,\n optional_customer.and_then(|customer| customer.email.map(pii::Email::from)),\n webhook_url,\n &merchant_connector_account,\n &authentication_connector,\n Some(payment_intent.payment_id),\n )\n .await?;\n let authentication = external_authentication_update_trackers(\n &state,\n auth_response,\n authentication.clone(),\n None,\n merchant_context.get_merchant_key_store(),\n None,\n None,\n None,\n None,\n )\n .await?;\n authentication::AuthenticationResponse::try_from(authentication)?\n } else {\n Box::pin(authentication_core::perform_authentication(\n &state,\n business_profile.merchant_id,\n authentication_connector,\n payment_method_details.0,\n payment_method_details.1,\n billing_address\n .as_ref()\n .map(|address| address.into())\n .ok_or(errors::ApiErrorResponse::MissingRequiredField {\n field_name: \"billing_address\",\n })?,\n shipping_address.as_ref().map(|address| address.into()),\n browser_info,\n merchant_connector_account,\n Some(amount),\n Some(currency),\n authentication::MessageCategory::Payment,\n req.device_channel,\n authentication,\n return_url,\n req.sdk_information,\n req.threeds_method_comp_ind,\n optional_customer.and_then(|customer| customer.email.map(pii::Email::from)),\n webhook_url,\n authentication_details.three_ds_requestor_url.clone(),\n payment_intent.psd2_sca_exemption_type,\n payment_intent.payment_id,\n payment_intent.force_3ds_challenge_trigger.unwrap_or(false),\n merchant_context.get_merchant_key_store(),\n ))\n .await?\n };\n Ok(services::ApplicationResponse::Json(\n api_models::payments::PaymentsExternalAuthenticationResponse {\n transaction_status: authentication_response.trans_status,\n acs_url: authentication_response\n .acs_url\n .as_ref()\n .map(ToString::to_string),\n challenge_request: authentication_response.challenge_request,\n // If challenge_request_key is None, we send \"creq\" as a static value which is standard 3DS challenge form field name\n challenge_request_key: authentication_response\n .challenge_request_key\n .or(Some(consts::CREQ_CHALLENGE_REQUEST_KEY.to_string())),\n acs_reference_number: authentication_response.acs_reference_number,\n acs_trans_id: authentication_response.acs_trans_id,\n three_dsserver_trans_id: authentication_response.three_dsserver_trans_id,\n acs_signed_content: authentication_response.acs_signed_content,\n three_ds_requestor_url: authentication_details.three_ds_requestor_url,\n three_ds_requestor_app_url: authentication_details.three_ds_requestor_app_url,\n },\n ))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::unified_authentication_service::types::ExternalAuthentication;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::unified_authentication_service::{\n types::UnifiedAuthenticationService, utils::external_authentication_update_trackers,\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use super::unified_authentication_service::types::ExternalAuthentication;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::unified_authentication_service::{\n types::UnifiedAuthenticationService, utils::external_authentication_update_trackers,\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Payouts", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Payouts {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/payouts\").app_data(web::Data::new(state));\n route = route.service(web::resource(\"/create\").route(web::post().to(payouts_create)));\n\n #[cfg(feature = \"olap\")]\n {\n route = route\n .service(\n web::resource(\"/list\")\n .route(web::get().to(payouts_list))\n .route(web::post().to(payouts_list_by_filter)),\n )\n .service(\n web::resource(\"/profile/list\")\n .route(web::get().to(payouts_list_profile))\n .route(web::post().to(payouts_list_by_filter_profile)),\n )\n .service(\n web::resource(\"/filter\")\n .route(web::post().to(payouts_list_available_filters_for_merchant)),\n )\n .service(\n web::resource(\"/profile/filter\")\n .route(web::post().to(payouts_list_available_filters_for_profile)),\n );\n }\n route = route\n .service(\n web::resource(\"/{payout_id}\")\n .route(web::get().to(payouts_retrieve))\n .route(web::put().to(payouts_update)),\n )\n .service(web::resource(\"/{payout_id}/confirm\").route(web::post().to(payouts_confirm)))\n .service(web::resource(\"/{payout_id}/cancel\").route(web::post().to(payouts_cancel)))\n .service(web::resource(\"/{payout_id}/fulfill\").route(web::post().to(payouts_fulfill)));\n route\n }\n}", + "after_code": "impl Payouts {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/payouts\").app_data(web::Data::new(state));\n route = route.service(web::resource(\"/create\").route(web::post().to(payouts_create)));\n\n #[cfg(feature = \"olap\")]\n {\n route = route\n .service(\n web::resource(\"/list\")\n .route(web::get().to(payouts_list))\n .route(web::post().to(payouts_list_by_filter)),\n )\n .service(\n web::resource(\"/profile/list\")\n .route(web::get().to(payouts_list_profile))\n .route(web::post().to(payouts_list_by_filter_profile)),\n )\n .service(\n web::resource(\"/filter\")\n .route(web::post().to(payouts_list_available_filters_for_merchant)),\n )\n .service(\n web::resource(\"/profile/filter\")\n .route(web::post().to(payouts_list_available_filters_for_profile)),\n );\n }\n route = route\n .service(\n web::resource(\"/{payout_id}\")\n .route(web::get().to(payouts_retrieve))\n .route(web::put().to(payouts_update)),\n )\n .service(web::resource(\"/{payout_id}/confirm\").route(web::post().to(payouts_confirm)))\n .service(web::resource(\"/{payout_id}/cancel\").route(web::post().to(payouts_cancel)))\n .service(web::resource(\"/{payout_id}/fulfill\").route(web::post().to(payouts_fulfill)));\n route\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::mod::flows", + "file": "crates/router/src/core/payments.rs", + "kind": "mod_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub mod flows;", + "after_code": "pub mod flows;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_recurring_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_recurring_details(&self) -> Option<&RecurringDetails> {\n todo!()\n }", + "after_code": "fn get_recurring_details(&self) -> Option<&RecurringDetails> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::EphemeralKey", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct EphemeralKey;", + "after_code": "pub struct EphemeralKey;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_connector_request_reference_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_request_reference_id(&mut self, reference_id: Option) {\n self.payment_attempt.connector_request_reference_id = reference_id;\n }", + "after_code": "fn set_connector_request_reference_id(&mut self, reference_id: Option) {\n self.payment_attempt.connector_request_reference_id = reference_id;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::is_network_token_with_network_transaction_id_flow", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn is_network_token_with_network_transaction_id_flow(\n is_connector_agnostic_mit_enabled: Option,\n is_network_tokenization_enabled: bool,\n payment_method_info: &domain::PaymentMethod,\n) -> IsNtWithNtiFlow {\n match (\n is_connector_agnostic_mit_enabled,\n is_network_tokenization_enabled,\n payment_method_info.get_payment_method_type(),\n payment_method_info.network_transaction_id.clone(),\n payment_method_info.network_token_locker_id.is_some(),\n payment_method_info\n .network_token_requestor_reference_id\n .is_some(),\n ) {\n (\n Some(true),\n true,\n Some(storage_enums::PaymentMethod::Card),\n Some(network_transaction_id),\n true,\n true,\n ) => IsNtWithNtiFlow::NtWithNtiSupported(network_transaction_id),\n _ => IsNtWithNtiFlow::NTWithNTINotSupported,\n }\n}", + "after_code": "pub fn is_network_token_with_network_transaction_id_flow(\n is_connector_agnostic_mit_enabled: Option,\n is_network_tokenization_enabled: bool,\n payment_method_info: &domain::PaymentMethod,\n) -> IsNtWithNtiFlow {\n match (\n is_connector_agnostic_mit_enabled,\n is_network_tokenization_enabled,\n payment_method_info.get_payment_method_type(),\n payment_method_info.network_transaction_id.clone(),\n payment_method_info.network_token_locker_id.is_some(),\n payment_method_info\n .network_token_requestor_reference_id\n .is_some(),\n ) {\n (\n Some(true),\n true,\n Some(storage_enums::PaymentMethod::Card),\n Some(network_transaction_id),\n true,\n true,\n ) => IsNtWithNtiFlow::NtWithNtiSupported(network_transaction_id),\n _ => IsNtWithNtiFlow::NTWithNTINotSupported,\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_pre_routing_result", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_pre_routing_result(\n &self,\n ) -> Option> {\n self.get_payment_intent()\n .prerouting_algorithm\n .clone()\n .and_then(|pre_routing_algorithm| pre_routing_algorithm.pre_routing_results)\n }", + "after_code": "fn get_pre_routing_result(\n &self,\n ) -> Option> {\n self.get_payment_intent()\n .prerouting_algorithm\n .clone()\n .and_then(|pre_routing_algorithm| pre_routing_algorithm.pre_routing_results)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_setup_future_usage_in_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }", + "after_code": "fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use std::future;", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_client_secret", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_client_secret(&mut self, client_secret: Option>) {\n todo!()\n }", + "after_code": "fn set_client_secret(&mut self, client_secret: Option>) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_address", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_address(&self) -> &PaymentAddress {\n &self.payment_address\n }", + "after_code": "fn get_address(&self) -> &PaymentAddress {\n &self.payment_address\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::NetworkTokenizationSupportedCardNetworks", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct NetworkTokenizationSupportedCardNetworks {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub card_networks: HashSet,\n}", + "after_code": "pub struct NetworkTokenizationSupportedCardNetworks {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub card_networks: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use super::deserialize_hashset;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use api_models::enums;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::payments_api::NetworkTokenWithNTIRef::function::from", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn from(network_token_data: NTWithNTIRef) -> Self {\n Self {\n network_transaction_id: network_token_data.network_transaction_id,\n token_exp_month: network_token_data.token_exp_month,\n token_exp_year: network_token_data.token_exp_year,\n }\n }", + "after_code": "fn from(network_token_data: NTWithNTIRef) -> Self {\n Self {\n network_transaction_id: network_token_data.network_transaction_id,\n token_exp_month: network_token_data.token_exp_month,\n token_exp_year: network_token_data.token_exp_year,\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_attempts", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_attempts(&self) -> Option> {\n todo!()\n }", + "after_code": "fn get_attempts(&self) -> Option> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::LockSettings::function::deserialize", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn deserialize>(deserializer: D) -> Result {\n #[derive(Deserialize)]\n #[serde(deny_unknown_fields)]\n struct Inner {\n redis_lock_expiry_seconds: u32,\n delay_between_retries_in_milliseconds: u32,\n }\n\n let Inner {\n redis_lock_expiry_seconds,\n delay_between_retries_in_milliseconds,\n } = Inner::deserialize(deserializer)?;\n let redis_lock_expiry_milliseconds = redis_lock_expiry_seconds * 1000;\n Ok(Self {\n redis_lock_expiry_seconds,\n delay_between_retries_in_milliseconds,\n lock_retries: redis_lock_expiry_milliseconds / delay_between_retries_in_milliseconds,\n })\n }", + "after_code": "fn deserialize>(deserializer: D) -> Result {\n #[derive(Deserialize)]\n #[serde(deny_unknown_fields)]\n struct Inner {\n redis_lock_expiry_seconds: u32,\n delay_between_retries_in_milliseconds: u32,\n }\n\n let Inner {\n redis_lock_expiry_seconds,\n delay_between_retries_in_milliseconds,\n } = Inner::deserialize(deserializer)?;\n let redis_lock_expiry_milliseconds = redis_lock_expiry_seconds * 1000;\n Ok(Self {\n redis_lock_expiry_seconds,\n delay_between_retries_in_milliseconds,\n lock_retries: redis_lock_expiry_milliseconds / delay_between_retries_in_milliseconds,\n })\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use serde::de::Error;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::Error;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_pre_routing_result", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_pre_routing_result(\n &self,\n ) -> Option> {\n None\n }", + "after_code": "fn get_pre_routing_result(\n &self,\n ) -> Option> {\n None\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_connector_response_reference_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n todo!()\n }", + "after_code": "fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentEvent::type::Data", + "file": "crates/router/src/core/payments.rs", + "kind": "type_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "type Data = Self;", + "after_code": "type Data = Self;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/psync_flow.rs::impl::hyperswitch_domain_models::payments::PaymentStatusData", + "file": "crates/router/src/core/payments/flows/psync_flow.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl ConstructFlowSpecificData\n for hyperswitch_domain_models::payments::PaymentStatusData\n{\n async fn construct_router_data<'a>(\n &self,\n state: &SessionState,\n connector_id: &str,\n merchant_context: &domain::MerchantContext,\n customer: &Option,\n merchant_connector_account: &domain::MerchantConnectorAccountTypeDetails,\n merchant_recipient_data: Option,\n header_payload: Option,\n ) -> RouterResult<\n types::RouterData,\n > {\n Box::pin(transformers::construct_router_data_for_psync(\n state,\n self.clone(),\n connector_id,\n merchant_context,\n customer,\n merchant_connector_account,\n merchant_recipient_data,\n header_payload,\n ))\n .await\n }\n}", + "after_code": "impl ConstructFlowSpecificData\n for hyperswitch_domain_models::payments::PaymentStatusData\n{\n async fn construct_router_data<'a>(\n &self,\n state: &SessionState,\n connector_id: &str,\n merchant_context: &domain::MerchantContext,\n customer: &Option,\n merchant_connector_account: &domain::MerchantConnectorAccountTypeDetails,\n merchant_recipient_data: Option,\n header_payload: Option,\n ) -> RouterResult<\n types::RouterData,\n > {\n Box::pin(transformers::construct_router_data_for_psync(\n state,\n self.clone(),\n connector_id,\n merchant_context,\n customer,\n merchant_connector_account,\n merchant_recipient_data,\n header_payload,\n ))\n .await\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n};", + "use super::{ConstructFlowSpecificData, Feature};" + ], + "after_imports": [ + "use common_enums::{self, enums};", + "use super::{ConstructFlowSpecificData, Feature};", + "use hyperswitch_interfaces::{\n api::gateway,\n unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n },\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_intent(&self) -> &storage::PaymentIntent {\n todo!()\n }", + "after_code": "fn get_payment_intent(&self) -> &storage::PaymentIntent {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_multiple_capture_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData> {\n todo!()\n }", + "after_code": "fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::BlockListCheck", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "struct BlockListCheck;", + "after_code": "struct BlockListCheck;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_connector_response_reference_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n self.payment_attempt.connector_response_reference_id = reference_id;\n }", + "after_code": "fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n self.payment_attempt.connector_response_reference_id = reference_id;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_frm_message", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }", + "after_code": "fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::PazeDecryptConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PazeDecryptConfig {\n pub paze_private_key: Secret,\n pub paze_private_key_passphrase: Secret,\n}", + "after_code": "pub struct PazeDecryptConfig {\n pub paze_private_key: Secret,\n pub paze_private_key_passphrase: Secret,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_connector_request_reference_id_in_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n todo!()\n }", + "after_code": "fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::trait::SessionStateInfo", + "file": "crates/router/src/routes/app.rs", + "kind": "trait_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub trait SessionStateInfo {\n fn conf(&self) -> settings::Settings;\n fn store(&self) -> Box;\n fn event_handler(&self) -> EventsHandler;\n fn get_request_id(&self) -> Option;\n fn add_request_id(&mut self, request_id: RequestId);\n #[cfg(feature = \"partial-auth\")]\n fn get_detached_auth(&self) -> RouterResult<(Blake3, &[u8])>;\n fn session_state(&self) -> SessionState;\n fn global_store(&self) -> Box;\n}", + "after_code": "pub trait SessionStateInfo {\n fn conf(&self) -> settings::Settings;\n fn store(&self) -> Box;\n fn event_handler(&self) -> EventsHandler;\n fn get_request_id(&self) -> Option;\n fn add_request_id(&mut self, request_id: RequestId);\n #[cfg(feature = \"partial-auth\")]\n fn get_detached_auth(&self) -> RouterResult<(Blake3, &[u8])>;\n fn session_state(&self) -> SessionState;\n fn global_store(&self) -> Box;\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use common_utils::crypto::Blake3;", + "use crate::errors::RouterResult;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};", + "use router_env::tracing_actix_web::RequestId;" + ], + "after_imports": [ + "use common_utils::crypto::Blake3;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use crate::errors::RouterResult;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use router_env::tracing_actix_web::RequestId;" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::hashmap_deserialization_test::function::test_payment_method_and_payment_method_types", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn test_payment_method_and_payment_method_types() {\n use diesel_models::enums::{PaymentMethod, PaymentMethodType};\n\n let input_map: HashMap = HashMap::from([\n (\"bank_transfer\".to_string(), \"ach,bacs\".to_string()),\n (\"wallet\".to_string(), \"paypal,venmo\".to_string()),\n ]);\n let deserializer: MapDeserializer<\n '_,\n std::collections::hash_map::IntoIter,\n ValueError,\n > = input_map.into_deserializer();\n let result = deserialize_hashmap::<'_, _, PaymentMethod, PaymentMethodType>(deserializer);\n let expected_result = HashMap::from([\n (\n PaymentMethod::BankTransfer,\n HashSet::from([PaymentMethodType::Ach, PaymentMethodType::Bacs]),\n ),\n (\n PaymentMethod::Wallet,\n HashSet::from([PaymentMethodType::Paypal, PaymentMethodType::Venmo]),\n ),\n ]);\n\n assert!(result.is_ok());\n assert_eq!(result.unwrap(), expected_result);\n }", + "after_code": "fn test_payment_method_and_payment_method_types() {\n use diesel_models::enums::{PaymentMethod, PaymentMethodType};\n\n let input_map: HashMap = HashMap::from([\n (\"bank_transfer\".to_string(), \"ach,bacs\".to_string()),\n (\"wallet\".to_string(), \"paypal,venmo\".to_string()),\n ]);\n let deserializer: MapDeserializer<\n '_,\n std::collections::hash_map::IntoIter,\n ValueError,\n > = input_map.into_deserializer();\n let result = deserialize_hashmap::<'_, _, PaymentMethod, PaymentMethodType>(deserializer);\n let expected_result = HashMap::from([\n (\n PaymentMethod::BankTransfer,\n HashSet::from([PaymentMethodType::Ach, PaymentMethodType::Bacs]),\n ),\n (\n PaymentMethod::Wallet,\n HashSet::from([PaymentMethodType::Paypal, PaymentMethodType::Venmo]),\n ),\n ]);\n\n assert!(result.is_ok());\n assert_eq!(result.unwrap(), expected_result);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::PaymentMethod;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use super::deserialize_hashmap;", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use serde::de::Error;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "use serde::Deserialize;", + "use super::deserialize_hashmap;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use serde::de::Error;", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::static::CHECKSUM_KEY", + "file": "crates/router/src/routes/app.rs", + "kind": "static_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "static CHECKSUM_KEY: once_cell::sync::OnceCell<(\n masking::StrongSecret,\n masking::StrongSecret>,\n)> = once_cell::sync::OnceCell::new();", + "after_code": "static CHECKSUM_KEY: once_cell::sync::OnceCell<(\n masking::StrongSecret,\n masking::StrongSecret>,\n)> = once_cell::sync::OnceCell::new();", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_authentication_type_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::KvConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct KvConfig {\n pub ttl: u32,\n pub soft_kill: Option,\n}", + "after_code": "pub struct KvConfig {\n pub ttl: u32,\n pub soft_kill: Option,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Payouts::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/payouts\").app_data(web::Data::new(state));\n route = route.service(web::resource(\"/create\").route(web::post().to(payouts_create)));\n\n #[cfg(feature = \"olap\")]\n {\n route = route\n .service(\n web::resource(\"/list\")\n .route(web::get().to(payouts_list))\n .route(web::post().to(payouts_list_by_filter)),\n )\n .service(\n web::resource(\"/profile/list\")\n .route(web::get().to(payouts_list_profile))\n .route(web::post().to(payouts_list_by_filter_profile)),\n )\n .service(\n web::resource(\"/filter\")\n .route(web::post().to(payouts_list_available_filters_for_merchant)),\n )\n .service(\n web::resource(\"/profile/filter\")\n .route(web::post().to(payouts_list_available_filters_for_profile)),\n );\n }\n route = route\n .service(\n web::resource(\"/{payout_id}\")\n .route(web::get().to(payouts_retrieve))\n .route(web::put().to(payouts_update)),\n )\n .service(web::resource(\"/{payout_id}/confirm\").route(web::post().to(payouts_confirm)))\n .service(web::resource(\"/{payout_id}/cancel\").route(web::post().to(payouts_cancel)))\n .service(web::resource(\"/{payout_id}/fulfill\").route(web::post().to(payouts_fulfill)));\n route\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/payouts\").app_data(web::Data::new(state));\n route = route.service(web::resource(\"/create\").route(web::post().to(payouts_create)));\n\n #[cfg(feature = \"olap\")]\n {\n route = route\n .service(\n web::resource(\"/list\")\n .route(web::get().to(payouts_list))\n .route(web::post().to(payouts_list_by_filter)),\n )\n .service(\n web::resource(\"/profile/list\")\n .route(web::get().to(payouts_list_profile))\n .route(web::post().to(payouts_list_by_filter_profile)),\n )\n .service(\n web::resource(\"/filter\")\n .route(web::post().to(payouts_list_available_filters_for_merchant)),\n )\n .service(\n web::resource(\"/profile/filter\")\n .route(web::post().to(payouts_list_available_filters_for_profile)),\n );\n }\n route = route\n .service(\n web::resource(\"/{payout_id}\")\n .route(web::get().to(payouts_retrieve))\n .route(web::put().to(payouts_update)),\n )\n .service(web::resource(\"/{payout_id}/confirm\").route(web::post().to(payouts_confirm)))\n .service(web::resource(\"/{payout_id}/cancel\").route(web::post().to(payouts_cancel)))\n .service(web::resource(\"/{payout_id}/fulfill\").route(web::post().to(payouts_fulfill)));\n route\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/reject_flow.rs::impl::types::RouterData", + "file": "crates/router/src/core/payments/flows/reject_flow.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "impl Feature\n for types::RouterData\n{\n async fn decide_flows<'a>(\n self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _call_connector_action: payments::CallConnectorAction,\n _connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n Err(ApiErrorResponse::NotImplemented {\n message: NotImplementedMessage::Reason(\"Flow not supported\".to_string()),\n }\n .into())\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n Err(ApiErrorResponse::NotImplemented {\n message: NotImplementedMessage::Reason(\"Flow not supported\".to_string()),\n }\n .into())\n }\n}", + "after_code": "impl Feature\n for types::RouterData\n{\n async fn decide_flows<'a>(\n self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _call_connector_action: payments::CallConnectorAction,\n _connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n Err(ApiErrorResponse::NotImplemented {\n message: NotImplementedMessage::Reason(\"Flow not supported\".to_string()),\n }\n .into())\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n Err(ApiErrorResponse::NotImplemented {\n message: NotImplementedMessage::Reason(\"Flow not supported\".to_string()),\n }\n .into())\n }\n}", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n Err(ApiErrorResponse::NotImplemented {" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/routes/app.rs::impl::UserDeprecated", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl UserDeprecated {\n pub fn server(state: AppState) -> Scope {\n // TODO: Deprecated. Remove this in favour of /v2/users\n let mut route = web::scope(\"/v2/user\").app_data(web::Data::new(state));\n\n route = route.service(\n web::resource(\"/create_merchant\")\n .route(web::post().to(user::user_merchant_account_create)),\n );\n route = route.service(\n web::scope(\"/list\")\n .service(\n web::resource(\"/merchant\")\n .route(web::get().to(user::list_merchants_for_user_in_org)),\n )\n .service(\n web::resource(\"/profile\")\n .route(web::get().to(user::list_profiles_for_user_in_org_and_merchant)),\n ),\n );\n\n route = route.service(\n web::scope(\"/switch\")\n .service(\n web::resource(\"/merchant\")\n .route(web::post().to(user::switch_merchant_for_user_in_org)),\n )\n .service(\n web::resource(\"/profile\")\n .route(web::post().to(user::switch_profile_for_user_in_org_and_merchant)),\n ),\n );\n\n route = route.service(\n web::resource(\"/data\")\n .route(web::get().to(user::get_multiple_dashboard_metadata))\n .route(web::post().to(user::set_dashboard_metadata)),\n );\n\n route\n }\n}", + "after_code": "impl UserDeprecated {\n pub fn server(state: AppState) -> Scope {\n // TODO: Deprecated. Remove this in favour of /v2/users\n let mut route = web::scope(\"/v2/user\").app_data(web::Data::new(state));\n\n route = route.service(\n web::resource(\"/create_merchant\")\n .route(web::post().to(user::user_merchant_account_create)),\n );\n route = route.service(\n web::scope(\"/list\")\n .service(\n web::resource(\"/merchant\")\n .route(web::get().to(user::list_merchants_for_user_in_org)),\n )\n .service(\n web::resource(\"/profile\")\n .route(web::get().to(user::list_profiles_for_user_in_org_and_merchant)),\n ),\n );\n\n route = route.service(\n web::scope(\"/switch\")\n .service(\n web::resource(\"/merchant\")\n .route(web::post().to(user::switch_merchant_for_user_in_org)),\n )\n .service(\n web::resource(\"/profile\")\n .route(web::post().to(user::switch_profile_for_user_in_org_and_merchant)),\n ),\n );\n\n route = route.service(\n web::resource(\"/data\")\n .route(web::get().to(user::get_multiple_dashboard_metadata))\n .route(web::post().to(user::set_dashboard_metadata)),\n );\n\n route\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::IncrementalAuthorizationDetails", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct IncrementalAuthorizationDetails {\n pub additional_amount: MinorUnit,\n pub total_amount: MinorUnit,\n pub reason: Option,\n pub authorization_id: Option,\n}", + "after_code": "pub struct IncrementalAuthorizationDetails {\n pub additional_amount: MinorUnit,\n pub total_amount: MinorUnit,\n pub reason: Option,\n pub authorization_id: Option,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_disputes", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_disputes(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_disputes(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }", + "after_code": "fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_payment_method_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }", + "after_code": "fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_amount", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_amount(&self) -> api::Amount {\n self.amount\n }", + "after_code": "fn get_amount(&self) -> api::Amount {\n self.amount\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/approve_flow.rs::types::RouterData::function::decide_flows", + "file": "crates/router/src/core/payments/flows/approve_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": true, + "before_code": "async fn decide_flows<'a>(\n self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _call_connector_action: payments::CallConnectorAction,\n _connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n Err(ApiErrorResponse::NotImplemented {\n message: NotImplementedMessage::Reason(\"Flow not supported\".to_string()),\n }\n .into())\n }", + "after_code": "async fn decide_flows<'a>(\n self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _call_connector_action: payments::CallConnectorAction,\n _connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n Err(ApiErrorResponse::NotImplemented {\n message: NotImplementedMessage::Reason(\"Flow not supported\".to_string()),\n }\n .into())\n }", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n Err(ApiErrorResponse::NotImplemented {" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use crate::{\n core::{\n errors::{ApiErrorResponse, NotImplementedMessage, RouterResult},\n payments::{self, access_token, helpers, transformers, PaymentData},\n },\n routes::SessionState,\n services,\n types::{self, api, domain},\n};" + ], + "after_imports": [ + "use crate::{\n core::{\n errors::{ApiErrorResponse, NotImplementedMessage, RouterResult},\n payments::{\n self, access_token, flows::gateway_context, helpers, transformers, PaymentData,\n },\n },\n routes::SessionState,\n services,\n types::{self, api, domain},\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_connector_request_reference_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_request_reference_id(&mut self, reference_id: Option) {\n todo!()\n }", + "after_code": "fn set_connector_request_reference_id(&mut self, reference_id: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_capture_method", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_capture_method(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_capture_method(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_email_if_not_present", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }", + "after_code": "fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_attempt(&self) -> &storage::PaymentAttempt {\n todo!()\n }", + "after_code": "fn get_payment_attempt(&self) -> &storage::PaymentAttempt {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::WebhookEvents", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct WebhookEvents;", + "after_code": "pub struct WebhookEvents;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_payment_attempt_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_attempt_connector(&self) -> Option<&str> {\n todo!()\n }", + "after_code": "fn get_payment_attempt_connector(&self) -> Option<&str> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_setup_future_usage_in_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }", + "after_code": "fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use std::future;", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::apply_filters_on_payments", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn apply_filters_on_payments(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n profile_id_list: Option>,\n constraints: api::PaymentListFilterConstraints,\n) -> RouterResponse {\n common_utils::metrics::utils::record_operation_time(\n async {\n let limit = &constraints.limit;\n helpers::validate_payment_list_request_for_joins(*limit)?;\n let db: &dyn StorageInterface = state.store.as_ref();\n let pi_fetch_constraints = (constraints.clone(), profile_id_list.clone()).try_into()?;\n let list: Vec<(storage::PaymentIntent, storage::PaymentAttempt)> = db\n .get_filtered_payment_intents_attempt(\n &(&state).into(),\n merchant_context.get_merchant_account().get_id(),\n &pi_fetch_constraints,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n let data: Vec =\n list.into_iter().map(ForeignFrom::foreign_from).collect();\n\n let active_attempt_ids = db\n .get_filtered_active_attempt_ids_for_total_count(\n merchant_context.get_merchant_account().get_id(),\n &pi_fetch_constraints,\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::InternalServerError)?;\n\n let total_count = if constraints.has_no_attempt_filters() {\n i64::try_from(active_attempt_ids.len())\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while converting from usize to i64\")\n } else {\n db.get_total_count_of_filtered_payment_attempts(\n merchant_context.get_merchant_account().get_id(),\n &active_attempt_ids,\n constraints.connector,\n constraints.payment_method,\n constraints.payment_method_type,\n constraints.authentication_type,\n constraints.merchant_connector_id,\n constraints.card_network,\n constraints.card_discovery,\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n }?;\n\n Ok(services::ApplicationResponse::Json(\n api::PaymentListResponseV2 {\n count: data.len(),\n total_count,\n data,\n },\n ))\n },\n &metrics::PAYMENT_LIST_LATENCY,\n router_env::metric_attributes!((\n \"merchant_id\",\n merchant_context.get_merchant_account().get_id().clone()\n )),\n )\n .await\n}", + "after_code": "pub async fn apply_filters_on_payments(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n profile_id_list: Option>,\n constraints: api::PaymentListFilterConstraints,\n) -> RouterResponse {\n common_utils::metrics::utils::record_operation_time(\n async {\n let limit = &constraints.limit;\n helpers::validate_payment_list_request_for_joins(*limit)?;\n let db: &dyn StorageInterface = state.store.as_ref();\n let pi_fetch_constraints = (constraints.clone(), profile_id_list.clone()).try_into()?;\n let list: Vec<(storage::PaymentIntent, storage::PaymentAttempt)> = db\n .get_filtered_payment_intents_attempt(\n &(&state).into(),\n merchant_context.get_merchant_account().get_id(),\n &pi_fetch_constraints,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n let data: Vec =\n list.into_iter().map(ForeignFrom::foreign_from).collect();\n\n let active_attempt_ids = db\n .get_filtered_active_attempt_ids_for_total_count(\n merchant_context.get_merchant_account().get_id(),\n &pi_fetch_constraints,\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::InternalServerError)?;\n\n let total_count = if constraints.has_no_attempt_filters() {\n i64::try_from(active_attempt_ids.len())\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while converting from usize to i64\")\n } else {\n db.get_total_count_of_filtered_payment_attempts(\n merchant_context.get_merchant_account().get_id(),\n &active_attempt_ids,\n constraints.connector,\n constraints.payment_method,\n constraints.payment_method_type,\n constraints.authentication_type,\n constraints.merchant_connector_id,\n constraints.card_network,\n constraints.card_discovery,\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n }?;\n\n Ok(services::ApplicationResponse::Json(\n api::PaymentListResponseV2 {\n count: data.len(),\n total_count,\n data,\n },\n ))\n },\n &metrics::PAYMENT_LIST_LATENCY,\n router_env::metric_attributes!((\n \"merchant_id\",\n merchant_context.get_merchant_account().get_id().clone()\n )),\n )\n .await\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use router_types::transformers::ForeignFrom;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use router_types::transformers::ForeignFrom;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Disputes", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Disputes;", + "after_code": "pub struct Disputes;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_connector_with_networks", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn get_connector_with_networks(\n connectors: &mut IntoIter,\n) -> Option<(api::ConnectorData, enums::CardNetwork)> {\n connectors.find_map(|connector| {\n connector\n .network\n .map(|network| (connector.connector_data, network))\n })\n}", + "after_code": "pub fn get_connector_with_networks(\n connectors: &mut IntoIter,\n) -> Option<(api::ConnectorData, enums::CardNetwork)> {\n connectors.find_map(|connector| {\n connector\n .network\n .map(|network| (connector.connector_data, network))\n })\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::call_connector_service_prerequisites_for_external_vault_proxy", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn call_connector_service_prerequisites_for_external_vault_proxy<\n F,\n RouterDReq,\n ApiRequest,\n D,\n>(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n customer: &Option,\n call_connector_action: CallConnectorAction,\n schedule_time: Option,\n header_payload: HeaderPayload,\n frm_suggestion: Option,\n business_profile: &domain::Profile,\n is_retry_payment: bool,\n should_retry_with_pan: bool,\n all_keys_required: Option,\n) -> RouterResult<(\n domain::MerchantConnectorAccountTypeDetails,\n domain::MerchantConnectorAccountTypeDetails,\n Option,\n RouterData,\n)>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n // get merchant connector account related to external vault\n let external_vault_source: id_type::MerchantConnectorAccountId = business_profile\n .external_vault_connector_details\n .clone()\n .map(|connector_details| connector_details.vault_connector_id.clone())\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"mca_id not present for external vault\")?;\n\n let external_vault_merchant_connector_account_type_details =\n domain::MerchantConnectorAccountTypeDetails::MerchantConnectorAccount(Box::new(\n helpers::get_merchant_connector_account_v2(\n state,\n merchant_context.get_merchant_key_store(),\n Some(&external_vault_source),\n )\n .await?,\n ));\n\n let (\n merchant_connector_account_type_details,\n updated_customer,\n router_data,\n _tokenization_action,\n ) = call_connector_service_prerequisites(\n state,\n req_state,\n merchant_context,\n connector,\n operation,\n payment_data,\n customer,\n call_connector_action,\n schedule_time,\n header_payload,\n frm_suggestion,\n business_profile,\n is_retry_payment,\n should_retry_with_pan,\n all_keys_required,\n )\n .await?;\n Ok((\n merchant_connector_account_type_details,\n external_vault_merchant_connector_account_type_details,\n updated_customer,\n router_data,\n ))\n}", + "after_code": "pub async fn call_connector_service_prerequisites_for_external_vault_proxy<\n F,\n RouterDReq,\n ApiRequest,\n D,\n>(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n customer: &Option,\n call_connector_action: CallConnectorAction,\n schedule_time: Option,\n header_payload: HeaderPayload,\n frm_suggestion: Option,\n business_profile: &domain::Profile,\n is_retry_payment: bool,\n should_retry_with_pan: bool,\n all_keys_required: Option,\n) -> RouterResult<(\n domain::MerchantConnectorAccountTypeDetails,\n domain::MerchantConnectorAccountTypeDetails,\n Option,\n RouterData,\n)>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n // get merchant connector account related to external vault\n let external_vault_source: id_type::MerchantConnectorAccountId = business_profile\n .external_vault_connector_details\n .clone()\n .map(|connector_details| connector_details.vault_connector_id.clone())\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"mca_id not present for external vault\")?;\n\n let external_vault_merchant_connector_account_type_details =\n domain::MerchantConnectorAccountTypeDetails::MerchantConnectorAccount(Box::new(\n helpers::get_merchant_connector_account_v2(\n state,\n merchant_context.get_merchant_key_store(),\n Some(&external_vault_source),\n )\n .await?,\n ));\n\n let (\n merchant_connector_account_type_details,\n updated_customer,\n router_data,\n _tokenization_action,\n ) = call_connector_service_prerequisites(\n state,\n req_state,\n merchant_context,\n connector,\n operation,\n payment_data,\n customer,\n call_connector_action,\n schedule_time,\n header_payload,\n frm_suggestion,\n business_profile,\n is_retry_payment,\n should_retry_with_pan,\n all_keys_required,\n )\n .await?;\n Ok((\n merchant_connector_account_type_details,\n external_vault_merchant_connector_account_type_details,\n updated_customer,\n router_data,\n ))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::PaymentEvent", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PaymentEvent {\n payment_intent: storage::PaymentIntent,\n payment_attempt: storage::PaymentAttempt,\n}", + "after_code": "pub struct PaymentEvent {\n payment_intent: storage::PaymentIntent,\n payment_attempt: storage::PaymentAttempt,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/approve_flow.rs::types::RouterData::function::build_flow_specific_connector_request", + "file": "crates/router/src/core/payments/flows/approve_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn build_flow_specific_connector_request(\n &mut self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n Err(ApiErrorResponse::NotImplemented {\n message: NotImplementedMessage::Reason(\"Flow not supported\".to_string()),\n }\n .into())\n }", + "after_code": "async fn build_flow_specific_connector_request(\n &mut self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n Err(ApiErrorResponse::NotImplemented {\n message: NotImplementedMessage::Reason(\"Flow not supported\".to_string()),\n }\n .into())\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use crate::{\n core::{\n errors::{ApiErrorResponse, NotImplementedMessage, RouterResult},\n payments::{self, access_token, helpers, transformers, PaymentData},\n },\n routes::SessionState,\n services,\n types::{self, api, domain},\n};" + ], + "after_imports": [ + "use crate::{\n core::{\n errors::{ApiErrorResponse, NotImplementedMessage, RouterResult},\n payments::{\n self, access_token, flows::gateway_context, helpers, transformers, PaymentData,\n },\n },\n routes::SessionState,\n services,\n types::{self, api, domain},\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_billing_address", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_billing_address(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_billing_address(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::UserDeprecated", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct UserDeprecated;", + "after_code": "pub struct UserDeprecated;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_setup_mandate", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_setup_mandate(&self) -> Option<&MandateData> {\n todo!()\n }", + "after_code": "fn get_setup_mandate(&self) -> Option<&MandateData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::payments_get_intent_using_merchant_reference", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn payments_get_intent_using_merchant_reference(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n req_state: ReqState,\n merchant_reference_id: &id_type::PaymentReferenceId,\n header_payload: HeaderPayload,\n) -> RouterResponse {\n let db = state.store.as_ref();\n let storage_scheme = merchant_context.get_merchant_account().storage_scheme;\n let key_manager_state = &(&state).into();\n let payment_intent = db\n .find_payment_intent_by_merchant_reference_id_profile_id(\n key_manager_state,\n merchant_reference_id,\n profile.get_id(),\n merchant_context.get_merchant_key_store(),\n &storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n\n let (payment_data, _req, customer) = Box::pin(payments_intent_operation_core::<\n api::PaymentGetIntent,\n _,\n _,\n PaymentIntentData,\n >(\n &state,\n req_state,\n merchant_context.clone(),\n profile.clone(),\n operations::PaymentGetIntent,\n api_models::payments::PaymentsGetIntentRequest {\n id: payment_intent.get_id().clone(),\n },\n payment_intent.get_id().clone(),\n header_payload.clone(),\n ))\n .await?;\n\n transformers::ToResponse::<\n api::PaymentGetIntent,\n PaymentIntentData,\n operations::PaymentGetIntent,\n >::generate_response(\n payment_data,\n customer,\n &state.base_url,\n operations::PaymentGetIntent,\n &state.conf.connector_request_reference_id_config,\n None,\n None,\n header_payload.x_hs_latency,\n &merchant_context,\n )\n}", + "after_code": "pub async fn payments_get_intent_using_merchant_reference(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n req_state: ReqState,\n merchant_reference_id: &id_type::PaymentReferenceId,\n header_payload: HeaderPayload,\n) -> RouterResponse {\n let db = state.store.as_ref();\n let storage_scheme = merchant_context.get_merchant_account().storage_scheme;\n let key_manager_state = &(&state).into();\n let payment_intent = db\n .find_payment_intent_by_merchant_reference_id_profile_id(\n key_manager_state,\n merchant_reference_id,\n profile.get_id(),\n merchant_context.get_merchant_key_store(),\n &storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n\n let (payment_data, _req, customer) = Box::pin(payments_intent_operation_core::<\n api::PaymentGetIntent,\n _,\n _,\n PaymentIntentData,\n >(\n &state,\n req_state,\n merchant_context.clone(),\n profile.clone(),\n operations::PaymentGetIntent,\n api_models::payments::PaymentsGetIntentRequest {\n id: payment_intent.get_id().clone(),\n },\n payment_intent.get_id().clone(),\n header_payload.clone(),\n ))\n .await?;\n\n transformers::ToResponse::<\n api::PaymentGetIntent,\n PaymentIntentData,\n operations::PaymentGetIntent,\n >::generate_response(\n payment_data,\n customer,\n &state.base_url,\n operations::PaymentGetIntent,\n &state.conf.connector_request_reference_id_config,\n None,\n None,\n header_payload.x_hs_latency,\n &merchant_context,\n )\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::LockSettings::struct::Inner", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "struct Inner {\n redis_lock_expiry_seconds: u32,\n delay_between_retries_in_milliseconds: u32,\n }", + "after_code": "struct Inner {\n redis_lock_expiry_seconds: u32,\n delay_between_retries_in_milliseconds: u32,\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::payments_intent_operation_core", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn payments_intent_operation_core(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n payment_id: id_type::GlobalPaymentId,\n header_payload: HeaderPayload,\n) -> RouterResult<(D, Req, Option)>\nwhere\n F: Send + Clone + Sync,\n Req: Clone,\n Op: Operation + Send + Sync,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let operation: BoxedOperation<'_, F, Req, D> = Box::new(operation);\n\n tracing::Span::current().record(\n \"merchant_id\",\n merchant_context\n .get_merchant_account()\n .get_id()\n .get_string_repr(),\n );\n\n let _validate_result = operation\n .to_validate_request()?\n .validate_request(&req, &merchant_context)?;\n\n tracing::Span::current().record(\"global_payment_id\", payment_id.get_string_repr());\n\n let operations::GetTrackerResponse { mut payment_data } = operation\n .to_get_tracker()?\n .get_trackers(\n state,\n &payment_id,\n &req,\n &merchant_context,\n &profile,\n &header_payload,\n )\n .await?;\n\n let (_operation, customer) = operation\n .to_domain()?\n .get_customer_details(\n state,\n &mut payment_data,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::CustomerNotFound)\n .attach_printable(\"Failed while fetching/creating customer\")?;\n\n let (_operation, payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data,\n customer.clone(),\n merchant_context.get_merchant_account().storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n None,\n header_payload,\n )\n .await?;\n\n Ok((payment_data, req, customer))\n}", + "after_code": "pub async fn payments_intent_operation_core(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n payment_id: id_type::GlobalPaymentId,\n header_payload: HeaderPayload,\n) -> RouterResult<(D, Req, Option)>\nwhere\n F: Send + Clone + Sync,\n Req: Clone,\n Op: Operation + Send + Sync,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let operation: BoxedOperation<'_, F, Req, D> = Box::new(operation);\n\n tracing::Span::current().record(\n \"merchant_id\",\n merchant_context\n .get_merchant_account()\n .get_id()\n .get_string_repr(),\n );\n\n let _validate_result = operation\n .to_validate_request()?\n .validate_request(&req, &merchant_context)?;\n\n tracing::Span::current().record(\"global_payment_id\", payment_id.get_string_repr());\n\n let operations::GetTrackerResponse { mut payment_data } = operation\n .to_get_tracker()?\n .get_trackers(\n state,\n &payment_id,\n &req,\n &merchant_context,\n &profile,\n &header_payload,\n )\n .await?;\n\n let (_operation, customer) = operation\n .to_domain()?\n .get_customer_details(\n state,\n &mut payment_data,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::CustomerNotFound)\n .attach_printable(\"Failed while fetching/creating customer\")?;\n\n let (_operation, payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data,\n customer.clone(),\n merchant_context.get_merchant_account().storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n None,\n header_payload,\n )\n .await?;\n\n Ok((payment_data, req, customer))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use router_env::{instrument, tracing};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use router_env::{instrument, tracing};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::Option::function::from", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn from(result: CheckResult) -> Self {\n match result {\n CheckResult::Allow => None,\n CheckResult::Deny { message } => Some(api_models::payments::SdkNextAction {\n next_action: api_models::payments::NextActionCall::Deny { message },\n }),\n }\n }", + "after_code": "fn from(result: CheckResult) -> Self {\n match result {\n CheckResult::Allow => None,\n CheckResult::Deny { message } => Some(api_models::payments::SdkNextAction {\n next_action: api_models::payments::NextActionCall::Deny { message },\n }),\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::event_handler", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn event_handler(&self) -> &dyn hyperswitch_interfaces::events::EventHandlerInterface {\n &self.event_handler\n }", + "after_code": "fn event_handler(&self) -> &dyn hyperswitch_interfaces::events::EventHandlerInterface {\n &self.event_handler\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_connector_customer_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_connector_customer_id(&self) -> Option {\n self.connector_customer_id.clone()\n }", + "after_code": "fn get_connector_customer_id(&self) -> Option {\n self.connector_customer_id.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::GooglePayWallet", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "struct GooglePayWallet;", + "after_code": "struct GooglePayWallet;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_sessions_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_sessions_token(&self) -> Vec {\n self.sessions_token.clone()\n }", + "after_code": "fn get_sessions_token(&self) -> Vec {\n self.sessions_token.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_multiple_capture_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData> {\n todo!()\n }", + "after_code": "fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_payment_method_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }", + "after_code": "fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::DecideWalletFlow::function::get_google_pay_payment_processing_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_google_pay_payment_processing_details(\n &self,\n ) -> Option<&GooglePayPaymentProcessingDetails> {\n if let Self::GooglePayDecrypt(details) = self {\n Some(details)\n } else {\n None\n }\n }", + "after_code": "fn get_google_pay_payment_processing_details(\n &self,\n ) -> Option<&GooglePayPaymentProcessingDetails> {\n if let Self::GooglePayDecrypt(details) = self {\n Some(details)\n } else {\n None\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_payment_method_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }", + "after_code": "fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::external_vault_proxy_for_payments_operation_core", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn external_vault_proxy_for_payments_operation_core(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n get_tracker_response: operations::GetTrackerResponse,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n return_raw_connector_response: Option,\n) -> RouterResult<(D, Req, Option, Option)>\nwhere\n F: Send + Clone + Sync,\n Req: Send + Sync + Authenticate,\n Op: Operation + Send + Sync,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n\n // To create connector flow specific interface data\n D: ConstructFlowSpecificData,\n RouterData: Feature,\n\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n\n RouterData:\n hyperswitch_domain_models::router_data::TrackerPostUpdateObjects,\n\n // To perform router related operation for PaymentResponse\n PaymentResponse: Operation,\n FData: Send + Sync + Clone,\n{\n let operation: BoxedOperation<'_, F, Req, D> = Box::new(operation);\n\n // Get the trackers related to track the state of the payment\n let operations::GetTrackerResponse { mut payment_data } = get_tracker_response;\n\n let (_operation, customer) = operation\n .to_domain()?\n .get_customer_details(\n state,\n &mut payment_data,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::CustomerNotFound)\n .attach_printable(\"Failed while fetching/creating customer\")?;\n\n operation\n .to_domain()?\n .create_or_fetch_payment_method(state, &merchant_context, &profile, &mut payment_data)\n .await?;\n\n // consume the req merchant_connector_id and set it in the payment_data\n let connector = operation\n .to_domain()?\n .perform_routing(&merchant_context, &profile, state, &mut payment_data)\n .await?;\n\n let payment_data = match connector {\n ConnectorCallType::PreDetermined(connector_data) => {\n let (mca_type_details, external_vault_mca_type_details, updated_customer, router_data) =\n call_connector_service_prerequisites_for_external_vault_proxy(\n state,\n req_state.clone(),\n &merchant_context,\n connector_data.connector_data.clone(),\n &operation,\n &mut payment_data,\n &customer,\n call_connector_action.clone(),\n None,\n header_payload.clone(),\n None,\n &profile,\n false,\n false, //should_retry_with_pan is set to false in case of PreDetermined ConnectorCallType\n req.should_return_raw_response(),\n )\n .await?;\n\n let router_data = call_unified_connector_service_for_external_proxy(\n state,\n req_state.clone(),\n &merchant_context,\n connector_data.connector_data.clone(),\n &operation,\n &mut payment_data,\n &customer,\n call_connector_action.clone(),\n None, // schedule_time is not used in PreDetermined ConnectorCallType\n header_payload.clone(),\n #[cfg(feature = \"frm\")]\n None,\n &profile,\n false,\n false, //should_retry_with_pan is set to false in case of PreDetermined ConnectorCallType\n req.should_return_raw_response(),\n mca_type_details,\n external_vault_mca_type_details,\n router_data,\n updated_customer,\n )\n .await?;\n\n // update payment method if its a successful transaction\n if router_data.status.is_success() {\n operation\n .to_domain()?\n .update_payment_method(state, &merchant_context, &mut payment_data)\n .await;\n }\n\n let payments_response_operation = Box::new(PaymentResponse);\n\n payments_response_operation\n .to_post_update_tracker()?\n .update_tracker(\n state,\n payment_data,\n router_data,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await?\n }\n ConnectorCallType::Retryable(_) => todo!(),\n ConnectorCallType::SessionMultiple(_) => todo!(),\n ConnectorCallType::Skip => payment_data,\n };\n\n Ok((payment_data, req, None, None))\n}", + "after_code": "pub async fn external_vault_proxy_for_payments_operation_core(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n get_tracker_response: operations::GetTrackerResponse,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n return_raw_connector_response: Option,\n) -> RouterResult<(D, Req, Option, Option)>\nwhere\n F: Send + Clone + Sync,\n Req: Send + Sync + Authenticate,\n Op: Operation + Send + Sync,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n\n // To create connector flow specific interface data\n D: ConstructFlowSpecificData,\n RouterData: Feature,\n\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n\n RouterData:\n hyperswitch_domain_models::router_data::TrackerPostUpdateObjects,\n\n // To perform router related operation for PaymentResponse\n PaymentResponse: Operation,\n FData: Send + Sync + Clone,\n{\n let operation: BoxedOperation<'_, F, Req, D> = Box::new(operation);\n\n // Get the trackers related to track the state of the payment\n let operations::GetTrackerResponse { mut payment_data } = get_tracker_response;\n\n let (_operation, customer) = operation\n .to_domain()?\n .get_customer_details(\n state,\n &mut payment_data,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::CustomerNotFound)\n .attach_printable(\"Failed while fetching/creating customer\")?;\n\n operation\n .to_domain()?\n .create_or_fetch_payment_method(state, &merchant_context, &profile, &mut payment_data)\n .await?;\n\n // consume the req merchant_connector_id and set it in the payment_data\n let connector = operation\n .to_domain()?\n .perform_routing(&merchant_context, &profile, state, &mut payment_data)\n .await?;\n\n let payment_data = match connector {\n ConnectorCallType::PreDetermined(connector_data) => {\n let (mca_type_details, external_vault_mca_type_details, updated_customer, router_data) =\n call_connector_service_prerequisites_for_external_vault_proxy(\n state,\n req_state.clone(),\n &merchant_context,\n connector_data.connector_data.clone(),\n &operation,\n &mut payment_data,\n &customer,\n call_connector_action.clone(),\n None,\n header_payload.clone(),\n None,\n &profile,\n false,\n false, //should_retry_with_pan is set to false in case of PreDetermined ConnectorCallType\n req.should_return_raw_response(),\n )\n .await?;\n\n let router_data = call_unified_connector_service_for_external_proxy(\n state,\n req_state.clone(),\n &merchant_context,\n connector_data.connector_data.clone(),\n &operation,\n &mut payment_data,\n &customer,\n call_connector_action.clone(),\n None, // schedule_time is not used in PreDetermined ConnectorCallType\n header_payload.clone(),\n #[cfg(feature = \"frm\")]\n None,\n &profile,\n false,\n false, //should_retry_with_pan is set to false in case of PreDetermined ConnectorCallType\n req.should_return_raw_response(),\n mca_type_details,\n external_vault_mca_type_details,\n router_data,\n updated_customer,\n )\n .await?;\n\n // update payment method if its a successful transaction\n if router_data.status.is_success() {\n operation\n .to_domain()?\n .update_payment_method(state, &merchant_context, &mut payment_data)\n .await;\n }\n\n let payments_response_operation = Box::new(PaymentResponse);\n\n payments_response_operation\n .to_post_update_tracker()?\n .update_tracker(\n state,\n payment_data,\n router_data,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await?\n }\n ConnectorCallType::Retryable(_) => todo!(),\n ConnectorCallType::SessionMultiple(_) => todo!(),\n ConnectorCallType::Skip => payment_data,\n };\n\n Ok((payment_data, req, None, None))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_authentication", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>\n {\n todo!()\n }", + "after_code": "fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>\n {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::TenantConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct TenantConfig(pub HashMap);", + "after_code": "pub struct TenantConfig(pub HashMap);", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::collections::{HashMap, HashSet};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Customers::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/customers\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n route = route\n .service(\n web::resource(\"/{customer_id}/mandates\")\n .route(web::get().to(customers::get_customer_mandates)),\n )\n .service(web::resource(\"/list\").route(web::get().to(customers::customers_list)))\n .service(\n web::resource(\"/list_with_count\")\n .route(web::get().to(customers::customers_list_with_count)),\n )\n }\n\n #[cfg(feature = \"oltp\")]\n {\n route = route\n .service(web::resource(\"\").route(web::post().to(customers::customers_create)))\n .service(\n web::resource(\"/payment_methods\").route(\n web::get().to(payment_methods::list_customer_payment_method_api_client),\n ),\n )\n .service(\n web::resource(\"/{customer_id}/payment_methods\")\n .route(web::get().to(payment_methods::list_customer_payment_method_api)),\n )\n .service(\n web::resource(\"/{customer_id}/payment_methods/{payment_method_id}/default\")\n .route(web::post().to(payment_methods::default_payment_method_set_api)),\n )\n .service(\n web::resource(\"/{customer_id}\")\n .route(web::get().to(customers::customers_retrieve))\n .route(web::post().to(customers::customers_update))\n .route(web::delete().to(customers::customers_delete)),\n )\n }\n\n route\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/customers\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n route = route\n .service(\n web::resource(\"/{customer_id}/mandates\")\n .route(web::get().to(customers::get_customer_mandates)),\n )\n .service(web::resource(\"/list\").route(web::get().to(customers::customers_list)))\n .service(\n web::resource(\"/list_with_count\")\n .route(web::get().to(customers::customers_list_with_count)),\n )\n }\n\n #[cfg(feature = \"oltp\")]\n {\n route = route\n .service(web::resource(\"\").route(web::post().to(customers::customers_create)))\n .service(\n web::resource(\"/payment_methods\").route(\n web::get().to(payment_methods::list_customer_payment_method_api_client),\n ),\n )\n .service(\n web::resource(\"/{customer_id}/payment_methods\")\n .route(web::get().to(payment_methods::list_customer_payment_method_api)),\n )\n .service(\n web::resource(\"/{customer_id}/payment_methods/{payment_method_id}/default\")\n .route(web::post().to(payment_methods::default_payment_method_set_api)),\n )\n .service(\n web::resource(\"/{customer_id}\")\n .route(web::get().to(customers::customers_retrieve))\n .route(web::post().to(customers::customers_update))\n .route(web::delete().to(customers::customers_delete)),\n )\n }\n\n route\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::payment_methods;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use super::payment_methods;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::complete_postprocessing_steps_if_required", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn complete_postprocessing_steps_if_required(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n customer: &Option,\n merchant_conn_account: &helpers::MerchantConnectorAccountType,\n connector: &api::ConnectorData,\n payment_data: &mut D,\n _operation: &BoxedOperation<'_, F, Q, D>,\n header_payload: Option,\n) -> RouterResult>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n\n RouterData: Feature + Send,\n dyn api::Connector:\n services::api::ConnectorIntegration,\n D: ConstructFlowSpecificData,\n{\n let mut router_data = payment_data\n .construct_router_data(\n state,\n connector.connector.id(),\n merchant_context,\n customer,\n merchant_conn_account,\n None,\n header_payload,\n payment_data.get_payment_attempt().payment_method,\n payment_data.get_payment_attempt().payment_method_type,\n )\n .await?;\n\n match payment_data.get_payment_method_data() {\n Some(domain::PaymentMethodData::OpenBanking(domain::OpenBankingData::OpenBankingPIS {\n ..\n })) => {\n if connector.connector_name == router_types::Connector::Plaid {\n router_data = router_data.postprocessing_steps(state, connector).await?;\n let token = if let Ok(ref res) = router_data.response {\n match res {\n router_types::PaymentsResponseData::PostProcessingResponse {\n session_token,\n } => session_token\n .as_ref()\n .map(|token| api::SessionToken::OpenBanking(token.clone())),\n _ => None,\n }\n } else {\n None\n };\n if let Some(t) = token {\n payment_data.push_sessions_token(t);\n }\n\n Ok(router_data)\n } else {\n Ok(router_data)\n }\n }\n _ => Ok(router_data),\n }\n}", + "after_code": "async fn complete_postprocessing_steps_if_required(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n customer: &Option,\n merchant_conn_account: &helpers::MerchantConnectorAccountType,\n connector: &api::ConnectorData,\n payment_data: &mut D,\n _operation: &BoxedOperation<'_, F, Q, D>,\n header_payload: Option,\n) -> RouterResult>\nwhere\n F: Send + Clone + Sync,\n RouterDReq: Send + Sync,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n\n RouterData: Feature + Send,\n dyn api::Connector:\n services::api::ConnectorIntegration,\n D: ConstructFlowSpecificData,\n{\n let mut router_data = payment_data\n .construct_router_data(\n state,\n connector.connector.id(),\n merchant_context,\n customer,\n merchant_conn_account,\n None,\n header_payload,\n payment_data.get_payment_attempt().payment_method,\n payment_data.get_payment_attempt().payment_method_type,\n )\n .await?;\n\n match payment_data.get_payment_method_data() {\n Some(domain::PaymentMethodData::OpenBanking(domain::OpenBankingData::OpenBankingPIS {\n ..\n })) => {\n if connector.connector_name == router_types::Connector::Plaid {\n router_data = router_data.postprocessing_steps(state, connector).await?;\n let token = if let Ok(ref res) = router_data.response {\n match res {\n router_types::PaymentsResponseData::PostProcessingResponse {\n session_token,\n } => session_token\n .as_ref()\n .map(|token| api::SessionToken::OpenBanking(token.clone())),\n _ => None,\n }\n } else {\n None\n };\n if let Some(t) = token {\n payment_data.push_sessions_token(t);\n }\n\n Ok(router_data)\n } else {\n Ok(router_data)\n }\n }\n _ => Ok(router_data),\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_routing_approach_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_routing_approach_in_attempt(\n &mut self,\n _routing_approach: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_routing_approach_in_attempt(\n &mut self,\n _routing_approach: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/helpers.rs::function::process_through_direct_with_shadow_unified_connector_service", + "file": "crates/router/src/core/payments/helpers.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "pub async fn process_through_direct_with_shadow_unified_connector_service<\n 'a,\n F,\n RouterDReq,\n ApiRequest,\n D,\n>(\n state: &'a SessionState,\n req_state: routes::app::ReqState,\n merchant_context: &'a domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &'a BoxedOperation<'a, F, ApiRequest, D>,\n payment_data: &'a mut D,\n customer: &Option,\n call_connector_action: CallConnectorAction,\n shadow_ucs_call_connector_action: Option,\n validate_result: &'a OperationsValidateResult,\n schedule_time: Option,\n header_payload: domain_payments::HeaderPayload,\n frm_suggestion: Option,\n business_profile: &'a domain::Profile,\n is_retry_payment: bool,\n all_keys_required: Option,\n merchant_connector_account: MerchantConnectorAccountType,\n router_data: RouterData,\n tokenization_action: TokenizationAction,\n) -> RouterResult<(\n RouterData,\n MerchantConnectorAccountType,\n)>\nwhere\n F: Send + Clone + Sync + 'static,\n RouterDReq: Send + Sync + Clone + 'static + Serialize,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData:\n Feature + Send + Clone + Serialize,\n dyn api::Connector: services::api::ConnectorIntegration,\n{\n router_env::logger::info!(\n \"Processing payment through Direct gateway system with UCS in shadow mode - payment_id={}, attempt_id={}\",\n payment_data.get_payment_intent().payment_id.get_string_repr(),\n payment_data.get_payment_attempt().attempt_id\n );\n\n // Extract merchant_order_reference_id from payment data for UCS audit trail\n let merchant_order_reference_id = payment_data\n .get_payment_intent()\n .merchant_order_reference_id\n .clone();\n\n // Calculate connector_label before cloning data for shadow UCS\n let unified_connector_service_connector_label =\n get_connector_label_for_customer(&merchant_connector_account, payment_data);\n\n let creds_identifier = payment_data.get_creds_identifier().map(str::to_owned);\n\n // Clone data needed for shadow UCS call\n let unified_connector_service_router_data = router_data.clone();\n let unified_connector_service_merchant_connector_account = merchant_connector_account.clone();\n let unified_connector_service_merchant_context = merchant_context.clone();\n let unified_connector_service_header_payload = header_payload.clone();\n let unified_connector_service_state = state.clone();\n let unified_connector_service_merchant_order_reference_id = merchant_order_reference_id;\n let unified_connector_service_creds_identifier = creds_identifier.clone();\n let unified_connector_service_customer = customer.clone();\n let unified_connector_service_payment_attempt_data = payment_data.get_payment_attempt().clone();\n let unified_connector_service_connector_payment_id = payment_data\n .get_payment_intent()\n .payment_id\n .get_string_repr()\n .to_string();\n\n let lineage_ids = grpc_client::LineageIds::new(\n business_profile.merchant_id.clone(),\n business_profile.get_id().clone(),\n );\n\n // Update feature metadata to track Direct routing usage for stickiness\n update_gateway_system_in_feature_metadata(payment_data, GatewaySystem::Direct)?;\n\n // Call Direct connector service\n let result = call_connector_service(\n state,\n req_state,\n merchant_context,\n connector.clone(),\n operation,\n payment_data,\n customer,\n call_connector_action.clone(),\n validate_result,\n schedule_time,\n header_payload,\n frm_suggestion,\n business_profile,\n is_retry_payment,\n all_keys_required,\n merchant_connector_account,\n router_data,\n tokenization_action,\n )\n .await?;\n\n // Spawn shadow UCS call in background\n let direct_router_data = result.0.clone();\n tokio::spawn(async move {\n execute_shadow_unified_connector_service_call(\n unified_connector_service_state,\n unified_connector_service_router_data,\n direct_router_data,\n unified_connector_service_header_payload,\n lineage_ids,\n unified_connector_service_merchant_connector_account,\n &connector,\n unified_connector_service_merchant_context,\n unified_connector_service_merchant_order_reference_id,\n call_connector_action,\n shadow_ucs_call_connector_action,\n unified_connector_service_creds_identifier,\n unified_connector_service_customer,\n unified_connector_service_payment_attempt_data,\n unified_connector_service_connector_label,\n unified_connector_service_connector_payment_id,\n )\n .await\n .map_err(|e| {\n router_env::logger::debug!(\n \"Shadow UCS call in Direct with shadow UCS processing failed: {:?}\",\n e\n )\n })\n .ok()\n });\n\n Ok(result)\n}", + "after_code": "pub async fn process_through_direct_with_shadow_unified_connector_service<\n 'a,\n F,\n RouterDReq,\n ApiRequest,\n D,\n>(\n state: &'a SessionState,\n req_state: routes::app::ReqState,\n merchant_context: &'a domain::MerchantContext,\n connector: api::ConnectorData,\n operation: &'a BoxedOperation<'a, F, ApiRequest, D>,\n payment_data: &'a mut D,\n customer: &Option,\n call_connector_action: CallConnectorAction,\n shadow_ucs_call_connector_action: Option,\n validate_result: &'a OperationsValidateResult,\n schedule_time: Option,\n header_payload: domain_payments::HeaderPayload,\n frm_suggestion: Option,\n business_profile: &'a domain::Profile,\n is_retry_payment: bool,\n all_keys_required: Option,\n merchant_connector_account: MerchantConnectorAccountType,\n router_data: RouterData,\n tokenization_action: TokenizationAction,\n) -> RouterResult<(\n RouterData,\n MerchantConnectorAccountType,\n)>\nwhere\n F: Send + Clone + Sync + 'static,\n RouterDReq: Send + Sync + Clone + 'static + Serialize,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData:\n Feature + Send + Clone + Serialize,\n dyn api::Connector: services::api::ConnectorIntegration,\n{\n router_env::logger::info!(\n \"Processing payment through Direct gateway system with UCS in shadow mode - payment_id={}, attempt_id={}\",\n payment_data.get_payment_intent().payment_id.get_string_repr(),\n payment_data.get_payment_attempt().attempt_id\n );\n\n // Extract merchant_order_reference_id from payment data for UCS audit trail\n let merchant_order_reference_id = payment_data\n .get_payment_intent()\n .merchant_order_reference_id\n .clone();\n\n // Calculate connector_label before cloning data for shadow UCS\n let unified_connector_service_connector_label =\n get_connector_label_for_customer(&merchant_connector_account, payment_data);\n\n let creds_identifier = payment_data.get_creds_identifier().map(str::to_owned);\n\n // Clone data needed for shadow UCS call\n let unified_connector_service_router_data = router_data.clone();\n let unified_connector_service_merchant_connector_account = merchant_connector_account.clone();\n let unified_connector_service_merchant_context = merchant_context.clone();\n let unified_connector_service_header_payload = header_payload.clone();\n let unified_connector_service_state = state.clone();\n let unified_connector_service_merchant_order_reference_id = merchant_order_reference_id;\n let unified_connector_service_creds_identifier = creds_identifier.clone();\n let unified_connector_service_customer = customer.clone();\n let unified_connector_service_payment_attempt_data = payment_data.get_payment_attempt().clone();\n let unified_connector_service_connector_payment_id = payment_data\n .get_payment_intent()\n .payment_id\n .get_string_repr()\n .to_string();\n\n let lineage_ids = grpc_client::LineageIds::new(\n business_profile.merchant_id.clone(),\n business_profile.get_id().clone(),\n );\n\n // Update feature metadata to track Direct routing usage for stickiness\n update_gateway_system_in_feature_metadata(payment_data, GatewaySystem::Direct)?;\n\n // Call Direct connector service\n let result = call_connector_service(\n state,\n req_state,\n merchant_context,\n connector.clone(),\n operation,\n payment_data,\n customer,\n call_connector_action.clone(),\n validate_result,\n schedule_time,\n header_payload,\n frm_suggestion,\n business_profile,\n is_retry_payment,\n all_keys_required,\n merchant_connector_account,\n router_data,\n tokenization_action,\n None,\n )\n .await?;\n\n // Spawn shadow UCS call in background\n let direct_router_data = result.0.clone();\n tokio::spawn(async move {\n execute_shadow_unified_connector_service_call(\n unified_connector_service_state,\n unified_connector_service_router_data,\n direct_router_data,\n unified_connector_service_header_payload,\n lineage_ids,\n unified_connector_service_merchant_connector_account,\n &connector,\n unified_connector_service_merchant_context,\n unified_connector_service_merchant_order_reference_id,\n call_connector_action,\n shadow_ucs_call_connector_action,\n unified_connector_service_creds_identifier,\n unified_connector_service_customer,\n unified_connector_service_payment_attempt_data,\n unified_connector_service_connector_label,\n unified_connector_service_connector_payment_id,\n )\n .await\n .map_err(|e| {\n router_env::logger::debug!(\n \"Shadow UCS call in Direct with shadow UCS processing failed: {:?}\",\n e\n )\n })\n .ok()\n });\n\n Ok(result)\n}", + "diff_span": { + "before": "", + "after": " router_data,\n tokenization_action,\n None,\n )\n .await?;" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::get_db", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_db(&self) -> Box {\n self.store.get_scheduler_db()\n }", + "after_code": "fn get_db(&self) -> Box {\n self.store.get_scheduler_db()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};", + "use scheduler::SchedulerInterface;" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use scheduler::SchedulerInterface;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Files", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Files {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/files\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(files::files_create)))\n .service(\n web::resource(\"/{file_id}\")\n .route(web::delete().to(files::files_delete))\n .route(web::get().to(files::files_retrieve)),\n )\n }\n}", + "after_code": "impl Files {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/files\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(files::files_create)))\n .service(\n web::resource(\"/{file_id}\")\n .route(web::delete().to(files::files_delete))\n .route(web::get().to(files::files_retrieve)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentRedirectCompleteAuthorize::function::get_payment_action", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_action(&self) -> services::PaymentAction {\n services::PaymentAction::CompleteAuthorize\n }", + "after_code": "fn get_payment_action(&self) -> services::PaymentAction {\n services::PaymentAction::CompleteAuthorize\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_merchant_connector_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_merchant_connector_id_in_attempt(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_merchant_connector_id_in_attempt(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_filters_for_payments", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn get_filters_for_payments(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n time_range: common_utils::types::TimeRange,\n) -> RouterResponse {\n let db = state.store.as_ref();\n let pi = db\n .filter_payment_intents_by_time_range_constraints(\n &(&state).into(),\n merchant_context.get_merchant_account().get_id(),\n &time_range,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n\n let filters = db\n .get_filters_for_payments(\n pi.as_slice(),\n merchant_context.get_merchant_account().get_id(),\n // since OLAP doesn't have KV. Force to get the data from PSQL.\n storage_enums::MerchantStorageScheme::PostgresOnly,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n\n Ok(services::ApplicationResponse::Json(\n api::PaymentListFilters {\n connector: filters.connector,\n currency: filters.currency,\n status: filters.status,\n payment_method: filters.payment_method,\n payment_method_type: filters.payment_method_type,\n authentication_type: filters.authentication_type,\n },\n ))\n}", + "after_code": "pub async fn get_filters_for_payments(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n time_range: common_utils::types::TimeRange,\n) -> RouterResponse {\n let db = state.store.as_ref();\n let pi = db\n .filter_payment_intents_by_time_range_constraints(\n &(&state).into(),\n merchant_context.get_merchant_account().get_id(),\n &time_range,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n\n let filters = db\n .get_filters_for_payments(\n pi.as_slice(),\n merchant_context.get_merchant_account().get_id(),\n // since OLAP doesn't have KV. Force to get the data from PSQL.\n storage_enums::MerchantStorageScheme::PostgresOnly,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n\n Ok(services::ApplicationResponse::Json(\n api::PaymentListFilters {\n connector: filters.connector,\n currency: filters.currency,\n status: filters.status,\n payment_method: filters.payment_method,\n payment_method_type: filters.payment_method_type,\n authentication_type: filters.authentication_type,\n },\n ))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }", + "after_code": "fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_recurring_mandate_payment_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }", + "after_code": "fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_payment_link_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_link_data(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_payment_link_data(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_payment_method_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }", + "after_code": "fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/update_metadata_flow.rs::types::RouterData<\n api::UpdateMetadata,\n types::PaymentsUpdateMetadataData,\n types::PaymentsResponseData,\n >::function::decide_flows", + "file": "crates/router/src/core/payments/flows/update_metadata_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::UpdateMetadata,\n types::PaymentsUpdateMetadataData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n }", + "after_code": "async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::UpdateMetadata,\n types::PaymentsUpdateMetadataData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n }", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/routes/app.rs::struct::RelayWebhooks", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct RelayWebhooks;", + "after_code": "pub struct RelayWebhooks;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_merchant_connector_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_merchant_connector_id_in_attempt(&self) -> Option {\n self.payment_attempt.merchant_connector_id.clone()\n }", + "after_code": "fn get_merchant_connector_id_in_attempt(&self) -> Option {\n self.payment_attempt.merchant_connector_id.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::push_sessions_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn push_sessions_token(&mut self, _token: api::SessionToken) {\n todo!()\n }", + "after_code": "fn push_sessions_token(&mut self, _token: api::SessionToken) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_optional_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt> {\n todo!()\n }", + "after_code": "fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Webhooks::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(config: AppState) -> Scope {\n use api_models::webhooks as webhook_type;\n\n #[allow(unused_mut)]\n let mut route = web::scope(\"/v2/webhooks\")\n .app_data(web::Data::new(config))\n .service(\n web::resource(\"/{merchant_id}/{profile_id}/{connector_id}\")\n .route(\n web::post().to(receive_incoming_webhook::),\n )\n .route(web::get().to(receive_incoming_webhook::))\n .route(\n web::put().to(receive_incoming_webhook::),\n ),\n );\n\n #[cfg(all(feature = \"revenue_recovery\", feature = \"v2\"))]\n {\n route = route.service(\n web::resource(\"/recovery/{merchant_id}/{profile_id}/{connector_id}\").route(\n web::post()\n .to(recovery_receive_incoming_webhook::),\n ),\n );\n }\n\n route\n }", + "after_code": "pub fn server(config: AppState) -> Scope {\n use api_models::webhooks as webhook_type;\n\n #[allow(unused_mut)]\n let mut route = web::scope(\"/v2/webhooks\")\n .app_data(web::Data::new(config))\n .service(\n web::resource(\"/{merchant_id}/{profile_id}/{connector_id}\")\n .route(\n web::post().to(receive_incoming_webhook::),\n )\n .route(web::get().to(receive_incoming_webhook::))\n .route(\n web::put().to(receive_incoming_webhook::),\n ),\n );\n\n #[cfg(all(feature = \"revenue_recovery\", feature = \"v2\"))]\n {\n route = route.service(\n web::resource(\"/recovery/{merchant_id}/{profile_id}/{connector_id}\").route(\n web::post()\n .to(recovery_receive_incoming_webhook::),\n ),\n );\n }\n\n route\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use api_models::webhooks as webhook_type;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::process_tracker::revenue_recovery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use api_models::webhooks as webhook_type;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::process_tracker::revenue_recovery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_sessions_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_sessions_token(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_sessions_token(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_intent(&self) -> &storage::PaymentIntent {\n &self.payment_intent\n }", + "after_code": "fn get_payment_intent(&self) -> &storage::PaymentIntent {\n &self.payment_intent\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/incremental_authorization_flow.rs::types::RouterData<\n api::IncrementalAuthorization,\n types::PaymentsIncrementalAuthorizationData,\n types::PaymentsResponseData,\n >::function::decide_flows", + "file": "crates/router/src/core/payments/flows/incremental_authorization_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::IncrementalAuthorization,\n types::PaymentsIncrementalAuthorizationData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n Ok(resp)\n }", + "after_code": "async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::IncrementalAuthorization,\n types::PaymentsIncrementalAuthorizationData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n Ok(resp)\n }", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_billing_address", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_billing_address(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_billing_address(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Routing", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Routing;", + "after_code": "pub struct Routing;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::ApplePayWallet", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl WalletFlow for ApplePayWallet\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n fn check_predecrypted_token(\n &self,\n payment_data: &D,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let apple_pay_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_apple_pay_wallet_data());\n\n let result = if let Some(data) = apple_pay_wallet_data {\n match &data.payment_data {\n common_payments_types::ApplePayPaymentData::Encrypted(_) => None,\n common_payments_types::ApplePayPaymentData::Decrypted(\n apple_pay_predecrypt_data,\n ) => {\n helpers::validate_card_expiry(\n &apple_pay_predecrypt_data.application_expiration_month,\n &apple_pay_predecrypt_data.application_expiration_year,\n )?;\n Some(PaymentMethodToken::ApplePayDecrypt(Box::new(\n apple_pay_predecrypt_data.clone(),\n )))\n }\n }\n } else {\n None\n };\n Ok(result)\n }\n\n fn decide_wallet_flow(\n &self,\n state: &SessionState,\n payment_data: &D,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let apple_pay_metadata = check_apple_pay_metadata(state, Some(merchant_connector_account));\n\n add_apple_pay_flow_metrics(\n &apple_pay_metadata,\n payment_data.get_payment_attempt().connector.clone(),\n payment_data.get_payment_attempt().merchant_id.clone(),\n );\n\n let wallet_flow = match apple_pay_metadata {\n Some(domain::ApplePayFlow::Simplified(payment_processing_details)) => Some(\n DecideWalletFlow::ApplePayDecrypt(payment_processing_details),\n ),\n Some(domain::ApplePayFlow::Manual) | None => None,\n };\n Ok(wallet_flow)\n }\n\n async fn decrypt_wallet_token(\n &self,\n wallet_flow: &DecideWalletFlow,\n payment_data: &D,\n ) -> CustomResult {\n let apple_pay_payment_processing_details = wallet_flow\n .get_apple_pay_payment_processing_details()\n .get_required_value(\"Apple Pay payment processing details\")\n .attach_printable(\n \"Apple Pay payment processing details not found in Apple Pay decryption flow\",\n )?;\n let apple_pay_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_apple_pay_wallet_data())\n .get_required_value(\"Apple Pay wallet token\").attach_printable(\n \"Apple Pay wallet data not found in the payment method data during the Apple Pay decryption flow\",\n )?;\n\n let apple_pay_data =\n ApplePayData::token_json(domain::WalletData::ApplePay(apple_pay_wallet_data.clone()))\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to parse apple pay token to json\")?\n .decrypt(\n &apple_pay_payment_processing_details.payment_processing_certificate,\n &apple_pay_payment_processing_details.payment_processing_certificate_key,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to decrypt apple pay token\")?;\n\n let apple_pay_predecrypt_internal = apple_pay_data\n .parse_value::(\n \"ApplePayPredecryptDataInternal\",\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\n \"failed to parse decrypted apple pay response to ApplePayPredecryptData\",\n )?;\n\n let apple_pay_predecrypt =\n common_types::payments::ApplePayPredecryptData::try_from(apple_pay_predecrypt_internal)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\n \"failed to convert ApplePayPredecryptDataInternal to ApplePayPredecryptData\",\n )?;\n\n Ok(PaymentMethodToken::ApplePayDecrypt(Box::new(\n apple_pay_predecrypt,\n )))\n }\n}", + "after_code": "impl WalletFlow for ApplePayWallet\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n fn check_predecrypted_token(\n &self,\n payment_data: &D,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let apple_pay_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_apple_pay_wallet_data());\n\n let result = if let Some(data) = apple_pay_wallet_data {\n match &data.payment_data {\n common_payments_types::ApplePayPaymentData::Encrypted(_) => None,\n common_payments_types::ApplePayPaymentData::Decrypted(\n apple_pay_predecrypt_data,\n ) => {\n helpers::validate_card_expiry(\n &apple_pay_predecrypt_data.application_expiration_month,\n &apple_pay_predecrypt_data.application_expiration_year,\n )?;\n Some(PaymentMethodToken::ApplePayDecrypt(Box::new(\n apple_pay_predecrypt_data.clone(),\n )))\n }\n }\n } else {\n None\n };\n Ok(result)\n }\n\n fn decide_wallet_flow(\n &self,\n state: &SessionState,\n payment_data: &D,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let apple_pay_metadata = check_apple_pay_metadata(state, Some(merchant_connector_account));\n\n add_apple_pay_flow_metrics(\n &apple_pay_metadata,\n payment_data.get_payment_attempt().connector.clone(),\n payment_data.get_payment_attempt().merchant_id.clone(),\n );\n\n let wallet_flow = match apple_pay_metadata {\n Some(domain::ApplePayFlow::Simplified(payment_processing_details)) => Some(\n DecideWalletFlow::ApplePayDecrypt(payment_processing_details),\n ),\n Some(domain::ApplePayFlow::Manual) | None => None,\n };\n Ok(wallet_flow)\n }\n\n async fn decrypt_wallet_token(\n &self,\n wallet_flow: &DecideWalletFlow,\n payment_data: &D,\n ) -> CustomResult {\n let apple_pay_payment_processing_details = wallet_flow\n .get_apple_pay_payment_processing_details()\n .get_required_value(\"Apple Pay payment processing details\")\n .attach_printable(\n \"Apple Pay payment processing details not found in Apple Pay decryption flow\",\n )?;\n let apple_pay_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_apple_pay_wallet_data())\n .get_required_value(\"Apple Pay wallet token\").attach_printable(\n \"Apple Pay wallet data not found in the payment method data during the Apple Pay decryption flow\",\n )?;\n\n let apple_pay_data =\n ApplePayData::token_json(domain::WalletData::ApplePay(apple_pay_wallet_data.clone()))\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to parse apple pay token to json\")?\n .decrypt(\n &apple_pay_payment_processing_details.payment_processing_certificate,\n &apple_pay_payment_processing_details.payment_processing_certificate_key,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to decrypt apple pay token\")?;\n\n let apple_pay_predecrypt_internal = apple_pay_data\n .parse_value::(\n \"ApplePayPredecryptDataInternal\",\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\n \"failed to parse decrypted apple pay response to ApplePayPredecryptData\",\n )?;\n\n let apple_pay_predecrypt =\n common_types::payments::ApplePayPredecryptData::try_from(apple_pay_predecrypt_internal)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\n \"failed to convert ApplePayPredecryptDataInternal to ApplePayPredecryptData\",\n )?;\n\n Ok(PaymentMethodToken::ApplePayDecrypt(Box::new(\n apple_pay_predecrypt,\n )))\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use helpers::{decrypt_paze_token, ApplePayData};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use helpers::{decrypt_paze_token, ApplePayData};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::BlockListCheck", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl EligibilityCheck for BlockListCheck {\n type Output = CheckResult;\n\n async fn should_run(\n &self,\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n ) -> CustomResult {\n let merchant_id = merchant_context.get_merchant_account().get_id();\n let blocklist_enabled_key = merchant_id.get_blocklist_guard_key();\n let blocklist_guard_enabled = state\n .store\n .find_config_by_key_unwrap_or(&blocklist_enabled_key, Some(\"false\".to_string()))\n .await;\n\n Ok(match blocklist_guard_enabled {\n Ok(config) => serde_json::from_str(&config.config).unwrap_or(false),\n\n // If it is not present in db we are defaulting it to false\n Err(inner) => {\n if !inner.current_context().is_db_not_found() {\n logger::error!(\"Error fetching guard blocklist enabled config {:?}\", inner);\n }\n false\n }\n })\n }\n\n async fn execute_check(\n &self,\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n payment_elgibility_data: &PaymentEligibilityData,\n _business_profile: &domain::Profile,\n ) -> CustomResult {\n let should_payment_be_blocked = blocklist_utils::should_payment_be_blocked(\n state,\n merchant_context,\n &payment_elgibility_data.payment_method_data,\n )\n .await?;\n if should_payment_be_blocked {\n Ok(CheckResult::Deny {\n message: \"Card number is blocklisted\".to_string(),\n })\n } else {\n Ok(CheckResult::Allow)\n }\n }\n\n fn transform(output: CheckResult) -> Option {\n output.into()\n }\n}", + "after_code": "impl EligibilityCheck for BlockListCheck {\n type Output = CheckResult;\n\n async fn should_run(\n &self,\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n ) -> CustomResult {\n let merchant_id = merchant_context.get_merchant_account().get_id();\n let blocklist_enabled_key = merchant_id.get_blocklist_guard_key();\n let blocklist_guard_enabled = state\n .store\n .find_config_by_key_unwrap_or(&blocklist_enabled_key, Some(\"false\".to_string()))\n .await;\n\n Ok(match blocklist_guard_enabled {\n Ok(config) => serde_json::from_str(&config.config).unwrap_or(false),\n\n // If it is not present in db we are defaulting it to false\n Err(inner) => {\n if !inner.current_context().is_db_not_found() {\n logger::error!(\"Error fetching guard blocklist enabled config {:?}\", inner);\n }\n false\n }\n })\n }\n\n async fn execute_check(\n &self,\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n payment_elgibility_data: &PaymentEligibilityData,\n _business_profile: &domain::Profile,\n ) -> CustomResult {\n let should_payment_be_blocked = blocklist_utils::should_payment_be_blocked(\n state,\n merchant_context,\n &payment_elgibility_data.payment_method_data,\n )\n .await?;\n if should_payment_be_blocked {\n Ok(CheckResult::Deny {\n message: \"Card number is blocklisted\".to_string(),\n })\n } else {\n Ok(CheckResult::Allow)\n }\n }\n\n fn transform(output: CheckResult) -> Option {\n output.into()\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_billing_address", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_billing_address(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_billing_address(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Routing", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Routing {\n pub fn server(state: AppState) -> Scope {\n #[allow(unused_mut)]\n let mut route = web::scope(\"/routing\")\n .app_data(web::Data::new(state.clone()))\n .service(\n web::resource(\"/active\").route(web::get().to(|state, req, query_params| {\n routing::routing_retrieve_linked_config(state, req, query_params, None)\n })),\n )\n .service(\n web::resource(\"\")\n .route(\n web::get().to(|state, req, path: web::Query| {\n routing::list_routing_configs(state, req, path, None)\n }),\n )\n .route(web::post().to(|state, req, payload| {\n routing::routing_create_config(state, req, payload, None)\n })),\n )\n .service(web::resource(\"/list/profile\").route(web::get().to(\n |state, req, query: web::Query| {\n routing::list_routing_configs_for_profile(state, req, query, None)\n },\n )))\n .service(\n web::resource(\"/default\").route(web::post().to(|state, req, payload| {\n routing::routing_update_default_config(\n state,\n req,\n payload,\n &TransactionType::Payment,\n )\n })),\n )\n .service(web::resource(\"/rule/migrate\").route(web::post().to(\n |state, req, query: web::Query| {\n routing::migrate_routing_rules_for_profile(state, req, query)\n },\n )))\n .service(\n web::resource(\"/deactivate\").route(web::post().to(|state, req, payload| {\n routing::routing_unlink_config(state, req, payload, None)\n })),\n )\n .service(\n web::resource(\"/decision\")\n .route(web::put().to(routing::upsert_decision_manager_config))\n .route(web::get().to(routing::retrieve_decision_manager_config))\n .route(web::delete().to(routing::delete_decision_manager_config)),\n )\n .service(\n web::resource(\"/decision/surcharge\")\n .route(web::put().to(routing::upsert_surcharge_decision_manager_config))\n .route(web::get().to(routing::retrieve_surcharge_decision_manager_config))\n .route(web::delete().to(routing::delete_surcharge_decision_manager_config)),\n )\n .service(\n web::resource(\"/default/profile/{profile_id}\").route(web::post().to(\n |state, req, path, payload| {\n routing::routing_update_default_config_for_profile(\n state,\n req,\n path,\n payload,\n &TransactionType::Payment,\n )\n },\n )),\n )\n .service(\n web::resource(\"/default/profile\").route(web::get().to(|state, req| {\n routing::routing_retrieve_default_config(state, req, &TransactionType::Payment)\n })),\n );\n\n #[cfg(feature = \"dynamic_routing\")]\n {\n route = route\n .service(\n web::resource(\"/evaluate\")\n .route(web::post().to(routing::call_decide_gateway_open_router)),\n )\n .service(\n web::resource(\"/feedback\")\n .route(web::post().to(routing::call_update_gateway_score_open_router)),\n )\n }\n\n #[cfg(feature = \"payouts\")]\n {\n route = route\n .service(\n web::resource(\"/payouts\")\n .route(web::get().to(\n |state, req, path: web::Query| {\n routing::list_routing_configs(\n state,\n req,\n path,\n Some(TransactionType::Payout),\n )\n },\n ))\n .route(web::post().to(|state, req, payload| {\n routing::routing_create_config(\n state,\n req,\n payload,\n Some(TransactionType::Payout),\n )\n })),\n )\n .service(web::resource(\"/payouts/list/profile\").route(web::get().to(\n |state, req, query: web::Query| {\n routing::list_routing_configs_for_profile(\n state,\n req,\n query,\n Some(TransactionType::Payout),\n )\n },\n )))\n .service(web::resource(\"/payouts/active\").route(web::get().to(\n |state, req, query_params| {\n routing::routing_retrieve_linked_config(\n state,\n req,\n query_params,\n Some(TransactionType::Payout),\n )\n },\n )))\n .service(\n web::resource(\"/payouts/default\")\n .route(web::get().to(|state, req| {\n routing::routing_retrieve_default_config(\n state,\n req,\n &TransactionType::Payout,\n )\n }))\n .route(web::post().to(|state, req, payload| {\n routing::routing_update_default_config(\n state,\n req,\n payload,\n &TransactionType::Payout,\n )\n })),\n )\n .service(\n web::resource(\"/payouts/{algorithm_id}/activate\").route(web::post().to(\n |state, req, path, payload| {\n routing::routing_link_config(\n state,\n req,\n path,\n payload,\n Some(TransactionType::Payout),\n )\n },\n )),\n )\n .service(web::resource(\"/payouts/deactivate\").route(web::post().to(\n |state, req, payload| {\n routing::routing_unlink_config(\n state,\n req,\n payload,\n Some(TransactionType::Payout),\n )\n },\n )))\n .service(\n web::resource(\"/payouts/default/profile/{profile_id}\").route(web::post().to(\n |state, req, path, payload| {\n routing::routing_update_default_config_for_profile(\n state,\n req,\n path,\n payload,\n &TransactionType::Payout,\n )\n },\n )),\n )\n .service(\n web::resource(\"/payouts/default/profile\").route(web::get().to(|state, req| {\n routing::routing_retrieve_default_config_for_profiles(\n state,\n req,\n &TransactionType::Payout,\n )\n })),\n );\n }\n\n route = route\n .service(\n web::resource(\"/{algorithm_id}\")\n .route(web::get().to(routing::routing_retrieve_config)),\n )\n .service(\n web::resource(\"/{algorithm_id}/activate\").route(web::post().to(\n |state, req, payload, path| {\n routing::routing_link_config(state, req, path, payload, None)\n },\n )),\n )\n .service(\n web::resource(\"/rule/evaluate\")\n .route(web::post().to(routing::evaluate_routing_rule)),\n );\n route\n }\n}", + "after_code": "impl Routing {\n pub fn server(state: AppState) -> Scope {\n #[allow(unused_mut)]\n let mut route = web::scope(\"/routing\")\n .app_data(web::Data::new(state.clone()))\n .service(\n web::resource(\"/active\").route(web::get().to(|state, req, query_params| {\n routing::routing_retrieve_linked_config(state, req, query_params, None)\n })),\n )\n .service(\n web::resource(\"\")\n .route(\n web::get().to(|state, req, path: web::Query| {\n routing::list_routing_configs(state, req, path, None)\n }),\n )\n .route(web::post().to(|state, req, payload| {\n routing::routing_create_config(state, req, payload, None)\n })),\n )\n .service(web::resource(\"/list/profile\").route(web::get().to(\n |state, req, query: web::Query| {\n routing::list_routing_configs_for_profile(state, req, query, None)\n },\n )))\n .service(\n web::resource(\"/default\").route(web::post().to(|state, req, payload| {\n routing::routing_update_default_config(\n state,\n req,\n payload,\n &TransactionType::Payment,\n )\n })),\n )\n .service(web::resource(\"/rule/migrate\").route(web::post().to(\n |state, req, query: web::Query| {\n routing::migrate_routing_rules_for_profile(state, req, query)\n },\n )))\n .service(\n web::resource(\"/deactivate\").route(web::post().to(|state, req, payload| {\n routing::routing_unlink_config(state, req, payload, None)\n })),\n )\n .service(\n web::resource(\"/decision\")\n .route(web::put().to(routing::upsert_decision_manager_config))\n .route(web::get().to(routing::retrieve_decision_manager_config))\n .route(web::delete().to(routing::delete_decision_manager_config)),\n )\n .service(\n web::resource(\"/decision/surcharge\")\n .route(web::put().to(routing::upsert_surcharge_decision_manager_config))\n .route(web::get().to(routing::retrieve_surcharge_decision_manager_config))\n .route(web::delete().to(routing::delete_surcharge_decision_manager_config)),\n )\n .service(\n web::resource(\"/default/profile/{profile_id}\").route(web::post().to(\n |state, req, path, payload| {\n routing::routing_update_default_config_for_profile(\n state,\n req,\n path,\n payload,\n &TransactionType::Payment,\n )\n },\n )),\n )\n .service(\n web::resource(\"/default/profile\").route(web::get().to(|state, req| {\n routing::routing_retrieve_default_config(state, req, &TransactionType::Payment)\n })),\n );\n\n #[cfg(feature = \"dynamic_routing\")]\n {\n route = route\n .service(\n web::resource(\"/evaluate\")\n .route(web::post().to(routing::call_decide_gateway_open_router)),\n )\n .service(\n web::resource(\"/feedback\")\n .route(web::post().to(routing::call_update_gateway_score_open_router)),\n )\n }\n\n #[cfg(feature = \"payouts\")]\n {\n route = route\n .service(\n web::resource(\"/payouts\")\n .route(web::get().to(\n |state, req, path: web::Query| {\n routing::list_routing_configs(\n state,\n req,\n path,\n Some(TransactionType::Payout),\n )\n },\n ))\n .route(web::post().to(|state, req, payload| {\n routing::routing_create_config(\n state,\n req,\n payload,\n Some(TransactionType::Payout),\n )\n })),\n )\n .service(web::resource(\"/payouts/list/profile\").route(web::get().to(\n |state, req, query: web::Query| {\n routing::list_routing_configs_for_profile(\n state,\n req,\n query,\n Some(TransactionType::Payout),\n )\n },\n )))\n .service(web::resource(\"/payouts/active\").route(web::get().to(\n |state, req, query_params| {\n routing::routing_retrieve_linked_config(\n state,\n req,\n query_params,\n Some(TransactionType::Payout),\n )\n },\n )))\n .service(\n web::resource(\"/payouts/default\")\n .route(web::get().to(|state, req| {\n routing::routing_retrieve_default_config(\n state,\n req,\n &TransactionType::Payout,\n )\n }))\n .route(web::post().to(|state, req, payload| {\n routing::routing_update_default_config(\n state,\n req,\n payload,\n &TransactionType::Payout,\n )\n })),\n )\n .service(\n web::resource(\"/payouts/{algorithm_id}/activate\").route(web::post().to(\n |state, req, path, payload| {\n routing::routing_link_config(\n state,\n req,\n path,\n payload,\n Some(TransactionType::Payout),\n )\n },\n )),\n )\n .service(web::resource(\"/payouts/deactivate\").route(web::post().to(\n |state, req, payload| {\n routing::routing_unlink_config(\n state,\n req,\n payload,\n Some(TransactionType::Payout),\n )\n },\n )))\n .service(\n web::resource(\"/payouts/default/profile/{profile_id}\").route(web::post().to(\n |state, req, path, payload| {\n routing::routing_update_default_config_for_profile(\n state,\n req,\n path,\n payload,\n &TransactionType::Payout,\n )\n },\n )),\n )\n .service(\n web::resource(\"/payouts/default/profile\").route(web::get().to(|state, req| {\n routing::routing_retrieve_default_config_for_profiles(\n state,\n req,\n &TransactionType::Payout,\n )\n })),\n );\n }\n\n route = route\n .service(\n web::resource(\"/{algorithm_id}\")\n .route(web::get().to(routing::routing_retrieve_config)),\n )\n .service(\n web::resource(\"/{algorithm_id}/activate\").route(web::post().to(\n |state, req, payload, path| {\n routing::routing_link_config(state, req, path, payload, None)\n },\n )),\n )\n .service(\n web::resource(\"/rule/evaluate\")\n .route(web::post().to(routing::evaluate_routing_rule)),\n );\n route\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use api_models::routing::RoutingRetrieveQuery;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use api_models::routing::RuleMigrationQuery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::routing;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};", + "use common_enums::{ExecutionMode, TransactionType};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use api_models::routing::RoutingRetrieveQuery;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use api_models::routing::RuleMigrationQuery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::routing;", + "use common_enums::{ExecutionMode, TransactionType};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_poll_config", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_poll_config(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_poll_config(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::get_proxy", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_proxy(&self) -> hyperswitch_interfaces::types::Proxy {\n self.conf.proxy.clone()\n }", + "after_code": "fn get_proxy(&self) -> hyperswitch_interfaces::types::Proxy {\n self.conf.proxy.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::proxy;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::proxy;" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::impl::PaymentLink", + "file": "crates/router/src/configs/settings.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Default for PaymentLink {\n fn default() -> Self {\n Self {\n #[allow(clippy::expect_used)]\n sdk_url: url::Url::parse(\"https://beta.hyperswitch.io/v0/HyperLoader.js\")\n .expect(\"Failed to parse default SDK URL\"),\n }\n }\n}", + "after_code": "impl Default for PaymentLink {\n fn default() -> Self {\n Self {\n #[allow(clippy::expect_used)]\n sdk_url: url::Url::parse(\"https://beta.hyperswitch.io/v0/HyperLoader.js\")\n .expect(\"Failed to parse default SDK URL\"),\n }\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::ThreeDsDecisionRule", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl ThreeDsDecisionRule {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/three_ds_decision\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/execute\")\n .route(web::post().to(three_ds_decision_rule::execute_decision_rule)),\n )\n }\n}", + "after_code": "impl ThreeDsDecisionRule {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/three_ds_decision\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/execute\")\n .route(web::post().to(three_ds_decision_rule::execute_decision_rule)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::PaymentMethods::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/payment_methods\").app_data(web::Data::new(state));\n #[cfg(feature = \"olap\")]\n {\n route =\n route.service(web::resource(\"/filter\").route(\n web::get().to(\n payment_methods::list_countries_currencies_for_connector_payment_method,\n ),\n ));\n }\n #[cfg(feature = \"oltp\")]\n {\n route = route\n .service(\n web::resource(\"\")\n .route(web::post().to(payment_methods::create_payment_method_api))\n .route(web::get().to(payment_methods::list_payment_method_api)), // TODO : added for sdk compatibility for now, need to deprecate this later\n )\n .service(\n web::resource(\"/migrate\")\n .route(web::post().to(payment_methods::migrate_payment_method_api)),\n )\n .service(\n web::resource(\"/migrate-batch\")\n .route(web::post().to(payment_methods::migrate_payment_methods)),\n )\n .service(\n web::resource(\"/update-batch\")\n .route(web::post().to(payment_methods::update_payment_methods)),\n )\n .service(\n web::resource(\"/tokenize-card\")\n .route(web::post().to(payment_methods::tokenize_card_api)),\n )\n .service(\n web::resource(\"/tokenize-card-batch\")\n .route(web::post().to(payment_methods::tokenize_card_batch_api)),\n )\n .service(\n web::resource(\"/collect\")\n .route(web::post().to(payment_methods::initiate_pm_collect_link_flow)),\n )\n .service(\n web::resource(\"/collect/{merchant_id}/{collect_id}\")\n .route(web::get().to(payment_methods::render_pm_collect_link)),\n )\n .service(\n web::resource(\"/{payment_method_id}\")\n .route(web::get().to(payment_methods::payment_method_retrieve_api))\n .route(web::delete().to(payment_methods::payment_method_delete_api)),\n )\n .service(\n web::resource(\"/{payment_method_id}/tokenize-card\")\n .route(web::post().to(payment_methods::tokenize_card_using_pm_api)),\n )\n .service(\n web::resource(\"/{payment_method_id}/update\")\n .route(web::post().to(payment_methods::payment_method_update_api)),\n )\n .service(\n web::resource(\"/{payment_method_id}/save\")\n .route(web::post().to(payment_methods::save_payment_method_api)),\n )\n .service(\n web::resource(\"/auth/link\").route(web::post().to(pm_auth::link_token_create)),\n )\n .service(\n web::resource(\"/auth/exchange\").route(web::post().to(pm_auth::exchange_token)),\n )\n }\n route\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/payment_methods\").app_data(web::Data::new(state));\n #[cfg(feature = \"olap\")]\n {\n route =\n route.service(web::resource(\"/filter\").route(\n web::get().to(\n payment_methods::list_countries_currencies_for_connector_payment_method,\n ),\n ));\n }\n #[cfg(feature = \"oltp\")]\n {\n route = route\n .service(\n web::resource(\"\")\n .route(web::post().to(payment_methods::create_payment_method_api))\n .route(web::get().to(payment_methods::list_payment_method_api)), // TODO : added for sdk compatibility for now, need to deprecate this later\n )\n .service(\n web::resource(\"/migrate\")\n .route(web::post().to(payment_methods::migrate_payment_method_api)),\n )\n .service(\n web::resource(\"/migrate-batch\")\n .route(web::post().to(payment_methods::migrate_payment_methods)),\n )\n .service(\n web::resource(\"/update-batch\")\n .route(web::post().to(payment_methods::update_payment_methods)),\n )\n .service(\n web::resource(\"/tokenize-card\")\n .route(web::post().to(payment_methods::tokenize_card_api)),\n )\n .service(\n web::resource(\"/tokenize-card-batch\")\n .route(web::post().to(payment_methods::tokenize_card_batch_api)),\n )\n .service(\n web::resource(\"/collect\")\n .route(web::post().to(payment_methods::initiate_pm_collect_link_flow)),\n )\n .service(\n web::resource(\"/collect/{merchant_id}/{collect_id}\")\n .route(web::get().to(payment_methods::render_pm_collect_link)),\n )\n .service(\n web::resource(\"/{payment_method_id}\")\n .route(web::get().to(payment_methods::payment_method_retrieve_api))\n .route(web::delete().to(payment_methods::payment_method_delete_api)),\n )\n .service(\n web::resource(\"/{payment_method_id}/tokenize-card\")\n .route(web::post().to(payment_methods::tokenize_card_using_pm_api)),\n )\n .service(\n web::resource(\"/{payment_method_id}/update\")\n .route(web::post().to(payment_methods::payment_method_update_api)),\n )\n .service(\n web::resource(\"/{payment_method_id}/save\")\n .route(web::post().to(payment_methods::save_payment_method_api)),\n )\n .service(\n web::resource(\"/auth/link\").route(web::post().to(pm_auth::link_token_create)),\n )\n .service(\n web::resource(\"/auth/exchange\").route(web::post().to(pm_auth::exchange_token)),\n )\n }\n route\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use super::payment_methods;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::pm_auth;" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use super::payment_methods;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::pm_auth;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Verify", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Verify {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/verify\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/apple-pay/{merchant_id}\")\n .route(web::post().to(apple_pay_merchant_registration)),\n )\n .service(\n web::resource(\"/applepay-verified-domains\")\n .route(web::get().to(retrieve_apple_pay_verified_domains)),\n )\n }\n}", + "after_code": "impl Verify {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/verify\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/apple-pay/{merchant_id}\")\n .route(web::post().to(apple_pay_merchant_registration)),\n )\n .service(\n web::resource(\"/applepay-verified-domains\")\n .route(web::get().to(retrieve_apple_pay_verified_domains)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::verification::{apple_pay_merchant_registration, retrieve_apple_pay_verified_domains};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use super::verification::{apple_pay_merchant_registration, retrieve_apple_pay_verified_domains};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_force_sync", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_force_sync(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_force_sync(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_setup_mandate", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_setup_mandate(&self) -> Option<&MandateData> {\n todo!()\n }", + "after_code": "fn get_setup_mandate(&self) -> Option<&MandateData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Forex::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/forex\")\n .app_data(web::Data::new(state.clone()))\n .app_data(web::Data::new(state.clone()))\n .service(web::resource(\"/rates\").route(web::get().to(currency::retrieve_forex)))\n .service(\n web::resource(\"/convert_from_minor\").route(web::get().to(currency::convert_forex)),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/forex\")\n .app_data(web::Data::new(state.clone()))\n .app_data(web::Data::new(state.clone()))\n .service(web::resource(\"/rates\").route(web::get().to(currency::retrieve_forex)))\n .service(\n web::resource(\"/convert_from_minor\").route(web::get().to(currency::convert_forex)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};", + "use super::currency;" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::currency;" + ] + }, + { + "id": "crates/router/src/core/payments/flows/post_session_tokens_flow.rs::impl::types::RouterData<\n api::PostSessionTokens,\n types::PaymentsPostSessionTokensData,\n types::PaymentsResponseData,\n >", + "file": "crates/router/src/core/payments/flows/post_session_tokens_flow.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "impl Feature\n for types::RouterData<\n api::PostSessionTokens,\n types::PaymentsPostSessionTokensData,\n types::PaymentsResponseData,\n >\n{\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PostSessionTokens,\n types::PaymentsPostSessionTokensData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PostSessionTokens,\n types::PaymentsPostSessionTokensData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n}", + "after_code": "impl Feature\n for types::RouterData<\n api::PostSessionTokens,\n types::PaymentsPostSessionTokensData,\n types::PaymentsResponseData,\n >\n{\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PostSessionTokens,\n types::PaymentsPostSessionTokensData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PostSessionTokens,\n types::PaymentsPostSessionTokensData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n}", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }", + "after_code": "fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_email_if_not_present", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }", + "after_code": "fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::get_request_id_str", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_request_id_str(&self) -> Option {\n self.request_id\n .map(|req_id| req_id.as_hyphenated().to_string())\n }", + "after_code": "fn get_request_id_str(&self) -> Option {\n self.request_id\n .map(|req_id| req_id.as_hyphenated().to_string())\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::TempLockerEnablePaymentMethodFilter", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct TempLockerEnablePaymentMethodFilter {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub payment_method: HashSet,\n}", + "after_code": "pub struct TempLockerEnablePaymentMethodFilter {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub payment_method: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::PaymentMethod;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use super::deserialize_hashset;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use super::deserialize_hashset;", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_frm_message", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_frm_message(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_frm_message(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Authentication::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/authentication\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(authentication::authentication_create)))\n .service(\n web::resource(\"/{authentication_id}/eligibility\")\n .route(web::post().to(authentication::authentication_eligibility)),\n )\n .service(\n web::resource(\"/{authentication_id}/authenticate\")\n .route(web::post().to(authentication::authentication_authenticate)),\n )\n .service(\n web::resource(\"{merchant_id}/{authentication_id}/redirect\")\n .route(web::post().to(authentication::authentication_sync_post_update)),\n )\n .service(\n web::resource(\"{merchant_id}/{authentication_id}/sync\")\n .route(web::post().to(authentication::authentication_sync)),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/authentication\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(authentication::authentication_create)))\n .service(\n web::resource(\"/{authentication_id}/eligibility\")\n .route(web::post().to(authentication::authentication_eligibility)),\n )\n .service(\n web::resource(\"/{authentication_id}/authenticate\")\n .route(web::post().to(authentication::authentication_authenticate)),\n )\n .service(\n web::resource(\"{merchant_id}/{authentication_id}/redirect\")\n .route(web::post().to(authentication::authentication_sync_post_update)),\n )\n .service(\n web::resource(\"{merchant_id}/{authentication_id}/sync\")\n .route(web::post().to(authentication::authentication_sync)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use crate::routes::authentication;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use crate::routes::authentication;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::filter_network_tokenization_supported_connectors", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn filter_network_tokenization_supported_connectors(\n connectors: Vec,\n network_tokenization_supported_connectors: &HashSet,\n) -> Vec {\n connectors\n .into_iter()\n .filter(|data| {\n network_tokenization_supported_connectors.contains(&data.connector_data.connector_name)\n })\n .collect()\n}", + "after_code": "pub fn filter_network_tokenization_supported_connectors(\n connectors: Vec,\n network_tokenization_supported_connectors: &HashSet,\n) -> Vec {\n connectors\n .into_iter()\n .filter(|data| {\n network_tokenization_supported_connectors.contains(&data.connector_data.connector_name)\n })\n .collect()\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::ApplePayCertificatesMigration::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/apple_pay_certificates_migration\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(\n web::post().to(apple_pay_certificates_migration::apple_pay_certificates_migration),\n ))\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/apple_pay_certificates_migration\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(\n web::post().to(apple_pay_certificates_migration::apple_pay_certificates_migration),\n ))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_refunds", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_refunds(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_refunds(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::global_store", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn global_store(&self) -> Box {\n self.global_store.to_owned()\n }", + "after_code": "fn global_store(&self) -> Box {\n self.global_store.to_owned()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/extend_authorization_flow.rs::impl::types::RouterData<\n api::ExtendAuthorization,\n types::PaymentsExtendAuthorizationData,\n types::PaymentsResponseData,\n >", + "file": "crates/router/src/core/payments/flows/extend_authorization_flow.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "impl Feature\n for types::RouterData<\n api::ExtendAuthorization,\n types::PaymentsExtendAuthorizationData,\n types::PaymentsResponseData,\n >\n{\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n metrics::PAYMENT_EXTEND_AUTHORIZATION_COUNT.add(\n 1,\n router_env::metric_attributes!((\"connector\", connector.connector_name.to_string())),\n );\n\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::ExtendAuthorization,\n types::PaymentsExtendAuthorizationData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n Ok(resp)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::ExtendAuthorization,\n types::PaymentsExtendAuthorizationData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n}", + "after_code": "impl Feature\n for types::RouterData<\n api::ExtendAuthorization,\n types::PaymentsExtendAuthorizationData,\n types::PaymentsResponseData,\n >\n{\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n metrics::PAYMENT_EXTEND_AUTHORIZATION_COUNT.add(\n 1,\n router_env::metric_attributes!((\"connector\", connector.connector_name.to_string())),\n );\n\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::ExtendAuthorization,\n types::PaymentsExtendAuthorizationData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n Ok(resp)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::ExtendAuthorization,\n types::PaymentsExtendAuthorizationData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n}", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n metrics::PAYMENT_EXTEND_AUTHORIZATION_COUNT.add(" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_surcharge_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }", + "after_code": "fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::MandateConnectorDetails", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct MandateConnectorDetails {\n pub connector: String,\n pub merchant_connector_id: Option,\n}", + "after_code": "pub struct MandateConnectorDetails {\n pub connector: String,\n pub merchant_connector_id: Option,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_token_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_token_data(&self) -> Option<&storage::PaymentTokenData> {\n todo!()\n }", + "after_code": "fn get_token_data(&self) -> Option<&storage::PaymentTokenData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_frm_message", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_frm_message(&self) -> Option {\n self.frm_message.clone()\n }", + "after_code": "fn get_frm_message(&self) -> Option {\n self.frm_message.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::GenericLinkEnvUiConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct GenericLinkEnvUiConfig {\n pub logo: url::Url,\n pub merchant_name: Secret,\n pub theme: String,\n}", + "after_code": "pub struct GenericLinkEnvUiConfig {\n pub logo: url::Url,\n pub merchant_name: Secret,\n pub theme: String,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_optional_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt> {\n todo!();\n }", + "after_code": "fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt> {\n todo!();\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::decide_payment_method_tokenize_action", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn decide_payment_method_tokenize_action(\n state: &SessionState,\n connector_name: &str,\n payment_method: storage::enums::PaymentMethod,\n payment_intent_data: payments::PaymentIntent,\n pm_parent_token: Option<&str>,\n is_connector_tokenization_enabled: bool,\n) -> RouterResult {\n if matches!(\n payment_intent_data.split_payments,\n Some(common_types::payments::SplitPaymentsRequest::StripeSplitPayment(_))\n ) {\n Ok(TokenizationAction::TokenizeInConnector)\n } else {\n match pm_parent_token {\n None => Ok(if is_connector_tokenization_enabled {\n TokenizationAction::TokenizeInConnectorAndRouter\n } else {\n TokenizationAction::TokenizeInRouter\n }),\n\n Some(token) => {\n let redis_conn = state\n .store\n .get_redis_conn()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get redis connection\")?;\n\n let key = format!(\n \"pm_token_{}_{}_{}\",\n token.to_owned(),\n payment_method,\n connector_name\n );\n\n let connector_token_option = redis_conn\n .get_key::>(&key.into())\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to fetch the token from redis\")?;\n\n match connector_token_option {\n Some(connector_token) => {\n Ok(TokenizationAction::ConnectorToken(connector_token))\n }\n None => Ok(if is_connector_tokenization_enabled {\n TokenizationAction::TokenizeInConnectorAndRouter\n } else {\n TokenizationAction::TokenizeInRouter\n }),\n }\n }\n }\n }\n}", + "after_code": "async fn decide_payment_method_tokenize_action(\n state: &SessionState,\n connector_name: &str,\n payment_method: storage::enums::PaymentMethod,\n payment_intent_data: payments::PaymentIntent,\n pm_parent_token: Option<&str>,\n is_connector_tokenization_enabled: bool,\n) -> RouterResult {\n if matches!(\n payment_intent_data.split_payments,\n Some(common_types::payments::SplitPaymentsRequest::StripeSplitPayment(_))\n ) {\n Ok(TokenizationAction::TokenizeInConnector)\n } else {\n match pm_parent_token {\n None => Ok(if is_connector_tokenization_enabled {\n TokenizationAction::TokenizeInConnectorAndRouter\n } else {\n TokenizationAction::TokenizeInRouter\n }),\n\n Some(token) => {\n let redis_conn = state\n .store\n .get_redis_conn()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get redis connection\")?;\n\n let key = format!(\n \"pm_token_{}_{}_{}\",\n token.to_owned(),\n payment_method,\n connector_name\n );\n\n let connector_token_option = redis_conn\n .get_key::>(&key.into())\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to fetch the token from redis\")?;\n\n match connector_token_option {\n Some(connector_token) => {\n Ok(TokenizationAction::ConnectorToken(connector_token))\n }\n None => Ok(if is_connector_tokenization_enabled {\n TokenizationAction::TokenizeInConnectorAndRouter\n } else {\n TokenizationAction::TokenizeInRouter\n }),\n }\n }\n }\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::ThemeSettings", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ThemeSettings {\n pub storage: FileStorageConfig,\n pub email_config: EmailThemeConfig,\n}", + "after_code": "pub struct ThemeSettings {\n pub storage: FileStorageConfig,\n pub email_config: EmailThemeConfig,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use config::{Environment, File};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use config::{Environment, File};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::should_add_task_to_process_tracker", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn should_add_task_to_process_tracker>(\n payment_data: &D,\n) -> bool {\n let connector = payment_data.get_payment_attempt().connector.as_deref();\n\n !matches!(\n (\n payment_data.get_payment_attempt().get_payment_method(),\n connector\n ),\n (\n Some(storage_enums::PaymentMethod::BankTransfer),\n Some(\"stripe\")\n )\n )\n}", + "after_code": "pub fn should_add_task_to_process_tracker>(\n payment_data: &D,\n) -> bool {\n let connector = payment_data.get_payment_attempt().connector.as_deref();\n\n !matches!(\n (\n payment_data.get_payment_attempt().get_payment_method(),\n connector\n ),\n (\n Some(storage_enums::PaymentMethod::BankTransfer),\n Some(\"stripe\")\n )\n )\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::push_sessions_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn push_sessions_token(&mut self, _token: api::SessionToken) {\n todo!()\n }", + "after_code": "fn push_sessions_token(&mut self, _token: api::SessionToken) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Proxy", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Proxy {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/proxy\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(proxy::proxy)))\n }\n}", + "after_code": "impl Proxy {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/proxy\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(proxy::proxy)))\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::proxy;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::proxy;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_payment_method_info", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod> {\n todo!()\n }", + "after_code": "fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_connector_response_reference_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n self.payment_attempt.connector_response_reference_id = reference_id;\n }", + "after_code": "fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n self.payment_attempt.connector_response_reference_id = reference_id;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::ForexApi", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ForexApi {\n pub api_key: Secret,\n pub fallback_api_key: Secret,\n pub data_expiration_delay_in_seconds: u32,\n pub redis_lock_timeout_in_seconds: u32,\n pub redis_ttl_in_seconds: u32,\n}", + "after_code": "pub struct ForexApi {\n pub api_key: Secret,\n pub fallback_api_key: Secret,\n pub data_expiration_delay_in_seconds: u32,\n pub redis_lock_timeout_in_seconds: u32,\n pub redis_ttl_in_seconds: u32,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::CmdLineConf", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct CmdLineConf {\n /// Config file.\n /// Application will look for \"config/config.toml\" if this option isn't specified.\n #[arg(short = 'f', long, value_name = \"FILE\")]\n pub config_path: Option,\n}", + "after_code": "pub struct CmdLineConf {\n /// Config file.\n /// Application will look for \"config/config.toml\" if this option isn't specified.\n #[arg(short = 'f', long, value_name = \"FILE\")]\n pub config_path: Option,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_setup_mandate", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_setup_mandate(&self) -> Option<&MandateData> {\n todo!()\n }", + "after_code": "fn get_setup_mandate(&self) -> Option<&MandateData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_force_sync", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_force_sync(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_force_sync(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::FeatureMatrix", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl FeatureMatrix {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/feature_matrix\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::get().to(feature_matrix::fetch_feature_matrix)))\n }\n}", + "after_code": "impl FeatureMatrix {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/feature_matrix\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::get().to(feature_matrix::fetch_feature_matrix)))\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use crate::routes::feature_matrix;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use crate::routes::feature_matrix;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_recurring_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_recurring_details(&self) -> Option<&RecurringDetails> {\n todo!()\n }", + "after_code": "fn get_recurring_details(&self) -> Option<&RecurringDetails> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Relay", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Relay;", + "after_code": "pub struct Relay;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/approve_flow.rs::types::RouterData::function::add_access_token", + "file": "crates/router/src/core/payments/flows/approve_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }", + "after_code": "async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use crate::{\n core::{\n errors::{ApiErrorResponse, NotImplementedMessage, RouterResult},\n payments::{self, access_token, helpers, transformers, PaymentData},\n },\n routes::SessionState,\n services,\n types::{self, api, domain},\n};" + ], + "after_imports": [ + "use crate::{\n core::{\n errors::{ApiErrorResponse, NotImplementedMessage, RouterResult},\n payments::{\n self, access_token, flows::gateway_context, helpers, transformers, PaymentData,\n },\n },\n routes::SessionState,\n services,\n types::{self, api, domain},\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_connector_customer_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_connector_customer_id(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_connector_customer_id(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::CardTestingCheck", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "struct CardTestingCheck;", + "after_code": "struct CardTestingCheck;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::PaymentMethodTokenFilter", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PaymentMethodTokenFilter {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub payment_method: HashSet,\n pub payment_method_type: Option,\n pub long_lived_token: bool,\n pub apple_pay_pre_decrypt_flow: Option,\n pub google_pay_pre_decrypt_flow: Option,\n pub flow: Option,\n}", + "after_code": "pub struct PaymentMethodTokenFilter {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub payment_method: HashSet,\n pub payment_method_type: Option,\n pub long_lived_token: bool,\n pub apple_pay_pre_decrypt_flow: Option,\n pub google_pay_pre_decrypt_flow: Option,\n pub flow: Option,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::PaymentMethod;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use super::deserialize_hashset;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use super::deserialize_hashset;", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_ephemeral_key", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_ephemeral_key(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_ephemeral_key(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::is_operation_confirm", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn is_operation_confirm(operation: &Op) -> bool {\n matches!(format!(\"{operation:?}\").as_str(), \"PaymentConfirm\")\n}", + "after_code": "pub fn is_operation_confirm(operation: &Op) -> bool {\n matches!(format!(\"{operation:?}\").as_str(), \"PaymentConfirm\")\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_payment_link_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_link_data(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_payment_link_data(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::SessionTokenRoutingResult", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct SessionTokenRoutingResult {\n pub final_result: api::SessionConnectorDatas,\n pub routing_result:\n FxHashMap>,\n}", + "after_code": "pub struct SessionTokenRoutingResult {\n pub final_result: api::SessionConnectorDatas,\n pub routing_result:\n FxHashMap>,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use rustc_hash::FxHashMap;", + "use std::collections::HashMap;" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use rustc_hash::FxHashMap;", + "use std::collections::HashMap;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentRedirectSync::function::generate_response", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn generate_response(\n &self,\n payment_flow_response: &Self::PaymentFlowResponse,\n ) -> RouterResult> {\n let payment_intent = &payment_flow_response.payment_data.payment_intent;\n let profile = &payment_flow_response.profile;\n\n let return_url = payment_intent\n .return_url\n .as_ref()\n .or(profile.return_url.as_ref())\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"return url not found in payment intent and profile\")?\n .to_owned();\n\n let return_url = return_url\n .add_query_params((\"id\", payment_intent.id.get_string_repr()))\n .add_query_params((\"status\", &payment_intent.status.to_string()));\n\n let return_url_str = return_url.into_inner().to_string();\n\n Ok(services::ApplicationResponse::JsonForRedirection(\n api::RedirectionResponse {\n return_url_with_query_params: return_url_str,\n },\n ))\n }", + "after_code": "fn generate_response(\n &self,\n payment_flow_response: &Self::PaymentFlowResponse,\n ) -> RouterResult> {\n let payment_intent = &payment_flow_response.payment_data.payment_intent;\n let profile = &payment_flow_response.profile;\n\n let return_url = payment_intent\n .return_url\n .as_ref()\n .or(profile.return_url.as_ref())\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"return url not found in payment intent and profile\")?\n .to_owned();\n\n let return_url = return_url\n .add_query_params((\"id\", payment_intent.id.get_string_repr()))\n .add_query_params((\"status\", &payment_intent.status.to_string()));\n\n let return_url_str = return_url.into_inner().to_string();\n\n Ok(services::ApplicationResponse::JsonForRedirection(\n api::RedirectionResponse {\n return_url_with_query_params: return_url_str,\n },\n ))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::RecoveryDataBackfill", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct RecoveryDataBackfill;", + "after_code": "pub struct RecoveryDataBackfill;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::is_google_pay_pre_decrypt_type_connector_tokenization", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn is_google_pay_pre_decrypt_type_connector_tokenization(\n payment_method_type: Option,\n payment_method_token: Option<&PaymentMethodToken>,\n google_pay_pre_decrypt_flow_filter: Option,\n) -> bool {\n if let (\n Some(storage::enums::PaymentMethodType::GooglePay),\n Some(PaymentMethodToken::GooglePayDecrypt(..)),\n ) = (payment_method_type, payment_method_token)\n {\n !matches!(\n google_pay_pre_decrypt_flow_filter,\n Some(GooglePayPreDecryptFlow::NetworkTokenization)\n )\n } else {\n // Always return true for non\u2013Google Pay pre-decrypt cases,\n // because the filter is only relevant for Google Pay pre-decrypt tokenization.\n // Returning true ensures that other payment methods or token types are not blocked.\n true\n }\n}", + "after_code": "fn is_google_pay_pre_decrypt_type_connector_tokenization(\n payment_method_type: Option,\n payment_method_token: Option<&PaymentMethodToken>,\n google_pay_pre_decrypt_flow_filter: Option,\n) -> bool {\n if let (\n Some(storage::enums::PaymentMethodType::GooglePay),\n Some(PaymentMethodToken::GooglePayDecrypt(..)),\n ) = (payment_method_type, payment_method_token)\n {\n !matches!(\n google_pay_pre_decrypt_flow_filter,\n Some(GooglePayPreDecryptFlow::NetworkTokenization)\n )\n } else {\n // Always return true for non\u2013Google Pay pre-decrypt cases,\n // because the filter is only relevant for Google Pay pre-decrypt tokenization.\n // Returning true ensures that other payment methods or token types are not blocked.\n true\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_payment_method_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData> {\n todo!()\n }", + "after_code": "fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::is_start_pay", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn is_start_pay(operation: &Op) -> bool {\n format!(\"{operation:?}\").eq(\"PaymentStart\")\n}", + "after_code": "fn is_start_pay(operation: &Op) -> bool {\n format!(\"{operation:?}\").eq(\"PaymentStart\")\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Verify", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Verify;", + "after_code": "pub struct Verify;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::AppState::function::get_tenants", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_tenants(&self) -> Vec {\n self.conf.multitenancy.get_tenant_ids()\n }", + "after_code": "fn get_tenants(&self) -> Vec {\n self.conf.multitenancy.get_tenant_ids()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use self::settings::Tenant;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use self::settings::Tenant;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Organization", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Organization {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/organizations\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(admin::organization_create)))\n .service(\n web::scope(\"/{id}\")\n .service(\n web::resource(\"\")\n .route(web::get().to(admin::organization_retrieve))\n .route(web::put().to(admin::organization_update)),\n )\n .service(\n web::resource(\"/merchant-accounts\")\n .route(web::get().to(admin::merchant_account_list)),\n ),\n )\n }\n}", + "after_code": "impl Organization {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/organizations\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(admin::organization_create)))\n .service(\n web::scope(\"/{id}\")\n .service(\n web::resource(\"\")\n .route(web::get().to(admin::organization_retrieve))\n .route(web::put().to(admin::organization_update)),\n )\n .service(\n web::resource(\"/merchant-accounts\")\n .route(web::get().to(admin::merchant_account_list)),\n ),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_optional_external_vault_session_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_optional_external_vault_session_details(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_optional_external_vault_session_details(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_token_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_token_data(&self) -> Option<&storage::PaymentTokenData> {\n todo!()\n }", + "after_code": "fn get_token_data(&self) -> Option<&storage::PaymentTokenData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::payment_start_redirection", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn payment_start_redirection(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n req: api_models::payments::PaymentStartRedirectionRequest,\n) -> RouterResponse {\n let db = &*state.store;\n let key_manager_state = &(&state).into();\n\n let storage_scheme = merchant_context.get_merchant_account().storage_scheme;\n\n let payment_intent = db\n .find_payment_intent_by_id(\n key_manager_state,\n &req.id,\n merchant_context.get_merchant_key_store(),\n storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n\n //TODO: send valid html error pages in this case, or atleast redirect to valid html error pages\n utils::when(\n payment_intent.status != storage_enums::IntentStatus::RequiresCustomerAction,\n || {\n Err(errors::ApiErrorResponse::PaymentUnexpectedState {\n current_flow: \"PaymentStartRedirection\".to_string(),\n field_name: \"status\".to_string(),\n current_value: payment_intent.status.to_string(),\n states: [\"requires_customer_action\".to_string()].join(\", \"),\n })\n },\n )?;\n\n let payment_attempt = db\n .find_payment_attempt_by_id(\n key_manager_state,\n merchant_context.get_merchant_key_store(),\n payment_intent\n .active_attempt_id\n .as_ref()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing active attempt in payment_intent\")?,\n storage_scheme,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while fetching payment_attempt\")?;\n let redirection_data = payment_attempt\n .redirection_data\n .clone()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing authentication_data in payment_attempt\")?;\n\n Ok(services::ApplicationResponse::Form(Box::new(\n services::RedirectionFormData {\n redirect_form: redirection_data,\n payment_method_data: None,\n amount: payment_attempt.amount_details.get_net_amount().to_string(),\n currency: payment_intent.amount_details.currency.to_string(),\n },\n )))\n}", + "after_code": "pub async fn payment_start_redirection(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n req: api_models::payments::PaymentStartRedirectionRequest,\n) -> RouterResponse {\n let db = &*state.store;\n let key_manager_state = &(&state).into();\n\n let storage_scheme = merchant_context.get_merchant_account().storage_scheme;\n\n let payment_intent = db\n .find_payment_intent_by_id(\n key_manager_state,\n &req.id,\n merchant_context.get_merchant_key_store(),\n storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n\n //TODO: send valid html error pages in this case, or atleast redirect to valid html error pages\n utils::when(\n payment_intent.status != storage_enums::IntentStatus::RequiresCustomerAction,\n || {\n Err(errors::ApiErrorResponse::PaymentUnexpectedState {\n current_flow: \"PaymentStartRedirection\".to_string(),\n field_name: \"status\".to_string(),\n current_value: payment_intent.status.to_string(),\n states: [\"requires_customer_action\".to_string()].join(\", \"),\n })\n },\n )?;\n\n let payment_attempt = db\n .find_payment_attempt_by_id(\n key_manager_state,\n merchant_context.get_merchant_key_store(),\n payment_intent\n .active_attempt_id\n .as_ref()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing active attempt in payment_intent\")?,\n storage_scheme,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Error while fetching payment_attempt\")?;\n let redirection_data = payment_attempt\n .redirection_data\n .clone()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"missing authentication_data in payment_attempt\")?;\n\n Ok(services::ApplicationResponse::Form(Box::new(\n services::RedirectionFormData {\n redirect_form: redirection_data,\n payment_method_data: None,\n amount: payment_attempt.amount_details.get_net_amount().to_string(),\n currency: payment_intent.amount_details.currency.to_string(),\n },\n )))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_ephemeral_key", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_ephemeral_key(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_ephemeral_key(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_payment_method_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData> {\n self.payment_method_data.as_ref()\n }", + "after_code": "fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData> {\n self.payment_method_data.as_ref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::external_vault_proxy_for_payments_core", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn external_vault_proxy_for_payments_core(\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n payment_id: id_type::GlobalPaymentId,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n return_raw_connector_response: Option,\n) -> RouterResponse\nwhere\n F: Send + Clone + Sync,\n Req: Send + Sync + Authenticate,\n FData: Send + Sync + Clone,\n Op: Operation + ValidateStatusForOperation + Send + Sync + Clone,\n Req: Debug,\n D: OperationSessionGetters\n + OperationSessionSetters\n + transformers::GenerateResponse\n + Send\n + Sync\n + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature,\n\n dyn api::Connector:\n services::api::ConnectorIntegration,\n\n PaymentResponse: Operation,\n\n RouterData:\n hyperswitch_domain_models::router_data::TrackerPostUpdateObjects,\n{\n operation\n .to_validate_request()?\n .validate_request(&req, &merchant_context)?;\n\n let get_tracker_response = operation\n .to_get_tracker()?\n .get_trackers(\n &state,\n &payment_id,\n &req,\n &merchant_context,\n &profile,\n &header_payload,\n )\n .await?;\n\n let (payment_data, _req, connector_http_status_code, external_latency) =\n external_vault_proxy_for_payments_operation_core::<_, _, _, _, _>(\n &state,\n req_state,\n merchant_context.clone(),\n profile.clone(),\n operation.clone(),\n req,\n get_tracker_response,\n call_connector_action,\n header_payload.clone(),\n return_raw_connector_response,\n )\n .await?;\n\n payment_data.generate_response(\n &state,\n connector_http_status_code,\n external_latency,\n header_payload.x_hs_latency,\n &merchant_context,\n &profile,\n None,\n )\n}", + "after_code": "pub async fn external_vault_proxy_for_payments_core(\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n payment_id: id_type::GlobalPaymentId,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n return_raw_connector_response: Option,\n) -> RouterResponse\nwhere\n F: Send + Clone + Sync,\n Req: Send + Sync + Authenticate,\n FData: Send + Sync + Clone,\n Op: Operation + ValidateStatusForOperation + Send + Sync + Clone,\n Req: Debug,\n D: OperationSessionGetters\n + OperationSessionSetters\n + transformers::GenerateResponse\n + Send\n + Sync\n + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature,\n\n dyn api::Connector:\n services::api::ConnectorIntegration,\n\n PaymentResponse: Operation,\n\n RouterData:\n hyperswitch_domain_models::router_data::TrackerPostUpdateObjects,\n{\n operation\n .to_validate_request()?\n .validate_request(&req, &merchant_context)?;\n\n let get_tracker_response = operation\n .to_get_tracker()?\n .get_trackers(\n &state,\n &payment_id,\n &req,\n &merchant_context,\n &profile,\n &header_payload,\n )\n .await?;\n\n let (payment_data, _req, connector_http_status_code, external_latency) =\n external_vault_proxy_for_payments_operation_core::<_, _, _, _, _>(\n &state,\n req_state,\n merchant_context.clone(),\n profile.clone(),\n operation.clone(),\n req,\n get_tracker_response,\n call_connector_action,\n header_payload.clone(),\n return_raw_connector_response,\n )\n .await?;\n\n payment_data.generate_response(\n &state,\n connector_http_status_code,\n external_latency,\n header_payload.x_hs_latency,\n &merchant_context,\n &profile,\n None,\n )\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use operations::ValidateStatusForOperation;", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use operations::ValidateStatusForOperation;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::PaymentMethodFilters", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PaymentMethodFilters(pub HashMap);", + "after_code": "pub struct PaymentMethodFilters(pub HashMap);", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use diesel_models::enums::PaymentMethod;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use diesel_models::enums::PaymentMethod;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::CloneConnectorAllowlistConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct CloneConnectorAllowlistConfig {\n #[serde(deserialize_with = \"deserialize_merchant_ids\")]\n pub merchant_ids: HashSet,\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub connector_names: HashSet,\n}", + "after_code": "pub struct CloneConnectorAllowlistConfig {\n #[serde(deserialize_with = \"deserialize_merchant_ids\")]\n pub merchant_ids: HashSet,\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub connector_names: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use super::deserialize_hashset;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use api_models::enums;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::route_connector_v1_for_payouts", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn route_connector_v1_for_payouts(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n business_profile: &domain::Profile,\n transaction_data: &payouts::PayoutData,\n routing_data: &mut storage::RoutingData,\n eligible_connectors: Option>,\n) -> RouterResult {\n let routing_algorithm_id = {\n let routing_algorithm = business_profile.payout_routing_algorithm.clone();\n\n let algorithm_ref = routing_algorithm\n .map(|ra| ra.parse_value::(\"RoutingAlgorithmRef\"))\n .transpose()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Could not decode merchant routing algorithm ref\")?\n .unwrap_or_default();\n algorithm_ref.algorithm_id\n };\n\n let (connectors, _) = routing::perform_static_routing_v1(\n state,\n merchant_context.get_merchant_account().get_id(),\n routing_algorithm_id.as_ref(),\n business_profile,\n &TransactionData::Payout(transaction_data),\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)?;\n let connectors = routing::perform_eligibility_analysis_with_fallback(\n &state.clone(),\n merchant_context.get_merchant_key_store(),\n connectors,\n &TransactionData::Payout(transaction_data),\n eligible_connectors,\n business_profile,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed eligibility analysis and fallback\")?;\n let first_connector_choice = connectors\n .first()\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\"Empty connector list returned\")?\n .clone();\n\n let connector_data = connectors\n .into_iter()\n .map(|conn| {\n api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &conn.connector.to_string(),\n api::GetToken::Connector,\n conn.merchant_connector_id,\n )\n .map(|connector_data| connector_data.into())\n })\n .collect::, _>>()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Invalid connector name received\")?;\n\n routing_data.routed_through = Some(first_connector_choice.connector.to_string());\n\n routing_data.merchant_connector_id = first_connector_choice.merchant_connector_id;\n\n Ok(ConnectorCallType::Retryable(connector_data))\n}", + "after_code": "pub async fn route_connector_v1_for_payouts(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n business_profile: &domain::Profile,\n transaction_data: &payouts::PayoutData,\n routing_data: &mut storage::RoutingData,\n eligible_connectors: Option>,\n) -> RouterResult {\n let routing_algorithm_id = {\n let routing_algorithm = business_profile.payout_routing_algorithm.clone();\n\n let algorithm_ref = routing_algorithm\n .map(|ra| ra.parse_value::(\"RoutingAlgorithmRef\"))\n .transpose()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Could not decode merchant routing algorithm ref\")?\n .unwrap_or_default();\n algorithm_ref.algorithm_id\n };\n\n let (connectors, _) = routing::perform_static_routing_v1(\n state,\n merchant_context.get_merchant_account().get_id(),\n routing_algorithm_id.as_ref(),\n business_profile,\n &TransactionData::Payout(transaction_data),\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)?;\n let connectors = routing::perform_eligibility_analysis_with_fallback(\n &state.clone(),\n merchant_context.get_merchant_key_store(),\n connectors,\n &TransactionData::Payout(transaction_data),\n eligible_connectors,\n business_profile,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed eligibility analysis and fallback\")?;\n let first_connector_choice = connectors\n .first()\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\"Empty connector list returned\")?\n .clone();\n\n let connector_data = connectors\n .into_iter()\n .map(|conn| {\n api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &conn.connector.to_string(),\n api::GetToken::Connector,\n conn.merchant_connector_id,\n )\n .map(|connector_data| connector_data.into())\n })\n .collect::, _>>()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Invalid connector name received\")?;\n\n routing_data.routed_through = Some(first_connector_choice.connector.to_string());\n\n routing_data.merchant_connector_id = first_connector_choice.merchant_connector_id;\n\n Ok(ConnectorCallType::Retryable(connector_data))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/setup_mandate_flow.rs::impl::types::SetupMandateRouterData", + "file": "crates/router/src/core/payments/flows/setup_mandate_flow.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "impl Feature for types::SetupMandateRouterData {\n async fn decide_flows<'a>(\n mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: domain_payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::SetupMandate,\n types::SetupMandateRequestData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n // Change the authentication_type to ThreeDs, for google_pay wallet if card_holder_authenticated or account_verified in assurance_details is false\n if let hyperswitch_domain_models::payment_method_data::PaymentMethodData::Wallet(\n hyperswitch_domain_models::payment_method_data::WalletData::GooglePay(google_pay_data),\n ) = &self.request.payment_method_data\n {\n if let Some(assurance_details) = google_pay_data.info.assurance_details.as_ref() {\n // Step up the transaction to 3DS when either assurance_details.card_holder_authenticated or assurance_details.account_verified is false\n if !assurance_details.card_holder_authenticated\n || !assurance_details.account_verified\n {\n logger::info!(\"Googlepay transaction stepped up to 3DS\");\n self.auth_type = diesel_models::enums::AuthenticationType::ThreeDs;\n }\n }\n }\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action.clone(),\n connector_request,\n None,\n )\n .await\n .to_setup_mandate_failed_response()?;\n Ok(resp)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn add_session_token<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n ) -> RouterResult\n where\n Self: Sized,\n {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::AuthorizeSessionToken,\n types::AuthorizeSessionTokenData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n let authorize_data = &types::PaymentsAuthorizeSessionTokenRouterData::foreign_from((\n &self,\n types::AuthorizeSessionTokenData::foreign_from(&self),\n ));\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n authorize_data,\n payments::CallConnectorAction::Trigger,\n None,\n None,\n )\n .await\n .to_payment_failed_response()?;\n let mut router_data = self;\n router_data.session_token = resp.session_token;\n Ok(router_data)\n }\n\n async fn add_payment_method_token<'a>(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n tokenization_action: &payments::TokenizationAction,\n should_continue_payment: bool,\n ) -> RouterResult {\n if connector\n .connector\n .should_call_tokenization_before_setup_mandate()\n {\n let request = self.request.clone();\n tokenization::add_payment_method_token(\n state,\n connector,\n tokenization_action,\n self,\n types::PaymentMethodTokenizationData::try_from(request)?,\n should_continue_payment,\n )\n .await\n } else {\n Ok(types::PaymentMethodTokenResult {\n payment_method_token_result: Ok(None),\n is_payment_method_tokenization_performed: false,\n connector_response: None,\n })\n }\n }\n\n async fn create_connector_customer<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n ) -> RouterResult> {\n customers::create_connector_customer(\n state,\n connector,\n self,\n types::ConnectorCustomerData::try_from(self.request.to_owned())?,\n )\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::SetupMandate,\n types::SetupMandateRequestData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n Ok((\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?,\n true,\n ))\n }\n _ => Ok((None, true)),\n }\n }\n\n async fn preprocessing_steps<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n ) -> RouterResult {\n setup_mandate_preprocessing_steps(state, &self, true, connector).await\n }\n\n async fn call_unified_connector_service<'a>(\n &mut self,\n state: &SessionState,\n header_payload: &domain_payments::HeaderPayload,\n lineage_ids: grpc_client::LineageIds,\n #[cfg(feature = \"v1\")] merchant_connector_account: helpers::MerchantConnectorAccountType,\n #[cfg(feature = \"v2\")]\n merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n merchant_context: &domain::MerchantContext,\n _connector_data: &api::ConnectorData,\n unified_connector_service_execution_mode: enums::ExecutionMode,\n merchant_order_reference_id: Option,\n _call_connector_action: common_enums::CallConnectorAction,\n creds_identifier: Option,\n ) -> RouterResult<()> {\n let client = state\n .grpc_client\n .unified_connector_service_client\n .clone()\n .ok_or(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to fetch Unified Connector Service client\")?;\n\n let payment_register_request =\n payments_grpc::PaymentServiceRegisterRequest::foreign_try_from(&*self)\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct Payment Setup Mandate Request\")?;\n\n let merchant_connector_id = merchant_connector_account.get_mca_id();\n\n let connector_auth_metadata = build_unified_connector_service_auth_metadata(\n merchant_connector_account,\n merchant_context,\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct request metadata\")?;\n let merchant_reference_id = header_payload\n .x_reference_id\n .clone()\n .or(merchant_order_reference_id)\n .map(|id| id_type::PaymentReferenceId::from_str(id.as_str()))\n .transpose()\n .inspect_err(|err| logger::warn!(error=?err, \"Invalid Merchant ReferenceId found\"))\n .ok()\n .flatten()\n .map(ucs_types::UcsReferenceId::Payment);\n let header_payload = state\n .get_grpc_headers_ucs(unified_connector_service_execution_mode)\n .external_vault_proxy_metadata(None)\n .merchant_reference_id(merchant_reference_id)\n .lineage_ids(lineage_ids);\n let connector_name = self.connector.clone();\n let updated_router_data = Box::pin(ucs_logging_wrapper(\n self.clone(),\n state,\n payment_register_request,\n header_payload,\n |mut router_data, payment_register_request, grpc_headers| async move {\n let response = client\n .payment_setup_mandate(\n payment_register_request,\n connector_auth_metadata,\n grpc_headers,\n )\n .await\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to Setup Mandate payment\")?;\n\n let payment_register_response = response.into_inner();\n\n let ucs_data = handle_unified_connector_service_response_for_payment_register(\n payment_register_response.clone(),\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to deserialize UCS response\")?;\n\n // Extract and store access token if present\n if let Some(access_token) = get_access_token_from_ucs_response(\n state,\n merchant_context,\n &router_data.connector,\n merchant_connector_id.as_ref(),\n creds_identifier.clone(),\n payment_register_response.state.as_ref(),\n )\n .await\n {\n if let Err(error) = set_access_token_for_ucs(\n state,\n merchant_context,\n &connector_name,\n access_token,\n merchant_connector_id.as_ref(),\n creds_identifier,\n )\n .await\n {\n logger::error!(\n ?error,\n \"Failed to store UCS access token from setup mandate response\"\n );\n } else {\n logger::debug!(\n \"Successfully stored access token from UCS setup mandate response\"\n );\n }\n }\n let router_data_response =\n ucs_data.router_data_response.map(|(response, status)| {\n router_data.status = status;\n response\n });\n router_data.response = router_data_response;\n router_data.connector_http_status_code = Some(ucs_data.status_code);\n\n // Populate connector_customer_id if present\n ucs_data.connector_customer_id.map(|connector_customer_id| {\n router_data.connector_customer = Some(connector_customer_id);\n });\n\n Ok((router_data, payment_register_response))\n },\n ))\n .await?;\n\n // Copy back the updated data\n *self = updated_router_data;\n Ok(())\n }\n}", + "after_code": "impl Feature for types::SetupMandateRouterData {\n async fn decide_flows<'a>(\n mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: domain_payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::SetupMandate,\n types::SetupMandateRequestData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n // Change the authentication_type to ThreeDs, for google_pay wallet if card_holder_authenticated or account_verified in assurance_details is false\n if let hyperswitch_domain_models::payment_method_data::PaymentMethodData::Wallet(\n hyperswitch_domain_models::payment_method_data::WalletData::GooglePay(google_pay_data),\n ) = &self.request.payment_method_data\n {\n if let Some(assurance_details) = google_pay_data.info.assurance_details.as_ref() {\n // Step up the transaction to 3DS when either assurance_details.card_holder_authenticated or assurance_details.account_verified is false\n if !assurance_details.card_holder_authenticated\n || !assurance_details.account_verified\n {\n logger::info!(\"Googlepay transaction stepped up to 3DS\");\n self.auth_type = diesel_models::enums::AuthenticationType::ThreeDs;\n }\n }\n }\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action.clone(),\n connector_request,\n None,\n )\n .await\n .to_setup_mandate_failed_response()?;\n Ok(resp)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn add_session_token<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n ) -> RouterResult\n where\n Self: Sized,\n {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::AuthorizeSessionToken,\n types::AuthorizeSessionTokenData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n let authorize_data = &types::PaymentsAuthorizeSessionTokenRouterData::foreign_from((\n &self,\n types::AuthorizeSessionTokenData::foreign_from(&self),\n ));\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n authorize_data,\n payments::CallConnectorAction::Trigger,\n None,\n None,\n )\n .await\n .to_payment_failed_response()?;\n let mut router_data = self;\n router_data.session_token = resp.session_token;\n Ok(router_data)\n }\n\n async fn add_payment_method_token<'a>(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n tokenization_action: &payments::TokenizationAction,\n should_continue_payment: bool,\n ) -> RouterResult {\n if connector\n .connector\n .should_call_tokenization_before_setup_mandate()\n {\n let request = self.request.clone();\n tokenization::add_payment_method_token(\n state,\n connector,\n tokenization_action,\n self,\n types::PaymentMethodTokenizationData::try_from(request)?,\n should_continue_payment,\n )\n .await\n } else {\n Ok(types::PaymentMethodTokenResult {\n payment_method_token_result: Ok(None),\n is_payment_method_tokenization_performed: false,\n connector_response: None,\n })\n }\n }\n\n async fn create_connector_customer<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n ) -> RouterResult> {\n customers::create_connector_customer(\n state,\n connector,\n self,\n types::ConnectorCustomerData::try_from(self.request.to_owned())?,\n )\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::SetupMandate,\n types::SetupMandateRequestData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n Ok((\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?,\n true,\n ))\n }\n _ => Ok((None, true)),\n }\n }\n\n async fn preprocessing_steps<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n ) -> RouterResult {\n setup_mandate_preprocessing_steps(state, &self, true, connector).await\n }\n\n async fn call_unified_connector_service<'a>(\n &mut self,\n state: &SessionState,\n header_payload: &domain_payments::HeaderPayload,\n lineage_ids: grpc_client::LineageIds,\n #[cfg(feature = \"v1\")] merchant_connector_account: helpers::MerchantConnectorAccountType,\n #[cfg(feature = \"v2\")]\n merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n merchant_context: &domain::MerchantContext,\n _connector_data: &api::ConnectorData,\n unified_connector_service_execution_mode: enums::ExecutionMode,\n merchant_order_reference_id: Option,\n _call_connector_action: common_enums::CallConnectorAction,\n creds_identifier: Option,\n ) -> RouterResult<()> {\n let client = state\n .grpc_client\n .unified_connector_service_client\n .clone()\n .ok_or(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to fetch Unified Connector Service client\")?;\n\n let payment_register_request =\n payments_grpc::PaymentServiceRegisterRequest::foreign_try_from(&*self)\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct Payment Setup Mandate Request\")?;\n\n let merchant_connector_id = merchant_connector_account.get_mca_id();\n\n let connector_auth_metadata = build_unified_connector_service_auth_metadata(\n merchant_connector_account,\n merchant_context,\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct request metadata\")?;\n let merchant_reference_id = header_payload\n .x_reference_id\n .clone()\n .or(merchant_order_reference_id)\n .map(|id| id_type::PaymentReferenceId::from_str(id.as_str()))\n .transpose()\n .inspect_err(|err| logger::warn!(error=?err, \"Invalid Merchant ReferenceId found\"))\n .ok()\n .flatten()\n .map(ucs_types::UcsReferenceId::Payment);\n let header_payload = state\n .get_grpc_headers_ucs(unified_connector_service_execution_mode)\n .external_vault_proxy_metadata(None)\n .merchant_reference_id(merchant_reference_id)\n .lineage_ids(lineage_ids);\n let connector_name = self.connector.clone();\n let updated_router_data = Box::pin(ucs_logging_wrapper(\n self.clone(),\n state,\n payment_register_request,\n header_payload,\n |mut router_data, payment_register_request, grpc_headers| async move {\n let response = client\n .payment_setup_mandate(\n payment_register_request,\n connector_auth_metadata,\n grpc_headers,\n )\n .await\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to Setup Mandate payment\")?;\n\n let payment_register_response = response.into_inner();\n\n let ucs_data = handle_unified_connector_service_response_for_payment_register(\n payment_register_response.clone(),\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to deserialize UCS response\")?;\n\n // Extract and store access token if present\n if let Some(access_token) = get_access_token_from_ucs_response(\n state,\n merchant_context,\n &router_data.connector,\n merchant_connector_id.as_ref(),\n creds_identifier.clone(),\n payment_register_response.state.as_ref(),\n )\n .await\n {\n if let Err(error) = set_access_token_for_ucs(\n state,\n merchant_context,\n &connector_name,\n access_token,\n merchant_connector_id.as_ref(),\n creds_identifier,\n )\n .await\n {\n logger::error!(\n ?error,\n \"Failed to store UCS access token from setup mandate response\"\n );\n } else {\n logger::debug!(\n \"Successfully stored access token from UCS setup mandate response\"\n );\n }\n }\n let router_data_response =\n ucs_data.router_data_response.map(|(response, status)| {\n router_data.status = status;\n response\n });\n router_data.response = router_data_response;\n router_data.connector_http_status_code = Some(ucs_data.status_code);\n\n // Populate connector_customer_id if present\n ucs_data.connector_customer_id.map(|connector_customer_id| {\n router_data.connector_customer = Some(connector_customer_id);\n });\n\n Ok((router_data, payment_register_response))\n },\n ))\n .await?;\n\n // Copy back the updated data\n *self = updated_router_data;\n Ok(())\n }\n}", + "diff_span": { + "before": "", + "after": " _header_payload: domain_payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/routes/app.rs::AppState::function::get_session_state", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn get_session_state(\n self: Arc,\n tenant: &id_type::TenantId,\n locale: Option,\n err: F,\n ) -> Result\n where\n F: FnOnce() -> E + Copy,\n {\n let tenant_conf = self.conf.multitenancy.get_tenant(tenant).ok_or_else(err)?;\n let mut event_handler = self.event_handler.clone();\n event_handler.add_tenant(tenant_conf);\n let store = self.stores.get(tenant).ok_or_else(err)?.clone();\n Ok(SessionState {\n store,\n global_store: self.global_store.clone(),\n accounts_store: self.accounts_store.get(tenant).ok_or_else(err)?.clone(),\n conf: Arc::clone(&self.conf),\n api_client: self.api_client.clone(),\n event_handler,\n #[cfg(feature = \"olap\")]\n pool: self.pools.get(tenant).ok_or_else(err)?.clone(),\n file_storage_client: self.file_storage_client.clone(),\n request_id: self.request_id,\n base_url: tenant_conf.base_url.clone(),\n tenant: tenant_conf.clone(),\n #[cfg(feature = \"email\")]\n email_client: Arc::clone(&self.email_client),\n #[cfg(feature = \"olap\")]\n opensearch_client: self.opensearch_client.clone(),\n grpc_client: Arc::clone(&self.grpc_client),\n theme_storage_client: self.theme_storage_client.clone(),\n locale: locale.unwrap_or(common_utils::consts::DEFAULT_LOCALE.to_string()),\n crm_client: self.crm_client.clone(),\n infra_components: self.infra_components.clone(),\n enhancement: self.enhancement.clone(),\n superposition_service: self.superposition_service.clone(),\n })\n }", + "after_code": "pub fn get_session_state(\n self: Arc,\n tenant: &id_type::TenantId,\n locale: Option,\n err: F,\n ) -> Result\n where\n F: FnOnce() -> E + Copy,\n {\n let tenant_conf = self.conf.multitenancy.get_tenant(tenant).ok_or_else(err)?;\n let mut event_handler = self.event_handler.clone();\n event_handler.add_tenant(tenant_conf);\n let store = self.stores.get(tenant).ok_or_else(err)?.clone();\n Ok(SessionState {\n store,\n global_store: self.global_store.clone(),\n accounts_store: self.accounts_store.get(tenant).ok_or_else(err)?.clone(),\n conf: Arc::clone(&self.conf),\n api_client: self.api_client.clone(),\n event_handler,\n #[cfg(feature = \"olap\")]\n pool: self.pools.get(tenant).ok_or_else(err)?.clone(),\n file_storage_client: self.file_storage_client.clone(),\n request_id: self.request_id,\n base_url: tenant_conf.base_url.clone(),\n tenant: tenant_conf.clone(),\n #[cfg(feature = \"email\")]\n email_client: Arc::clone(&self.email_client),\n #[cfg(feature = \"olap\")]\n opensearch_client: self.opensearch_client.clone(),\n grpc_client: Arc::clone(&self.grpc_client),\n theme_storage_client: self.theme_storage_client.clone(),\n locale: locale.unwrap_or(common_utils::consts::DEFAULT_LOCALE.to_string()),\n crm_client: self.crm_client.clone(),\n infra_components: self.infra_components.clone(),\n enhancement: self.enhancement.clone(),\n superposition_service: self.superposition_service.clone(),\n })\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use self::settings::Tenant;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use self::settings::Tenant;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_payment_intent_profile_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> {\n Some(&self.payment_intent.profile_id)\n }", + "after_code": "fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> {\n Some(&self.payment_intent.profile_id)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::PaymentConfirmData", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl OperationSessionSetters for PaymentConfirmData {\n #[cfg(feature = \"v2\")]\n fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(straight_through_algorithm);\n }\n // Setters Implementation\n fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }\n fn set_client_secret(&mut self, client_secret: Option>) {\n todo!()\n }\n fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }\n\n fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }\n\n fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }\n\n fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }\n\n fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }\n\n fn set_pm_token(&mut self, _token: String) {\n todo!()\n }\n\n fn set_connector_customer_id(&mut self, _customer_id: Option) {\n // TODO: handle this case. Should we add connector_customer_id in paymentConfirmData?\n }\n\n fn push_sessions_token(&mut self, _token: api::SessionToken) {\n todo!()\n }\n\n fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n todo!()\n }\n\n fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }\n\n fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }\n\n #[track_caller]\n fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n self.payment_attempt.merchant_connector_id = merchant_connector_id;\n }\n\n fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }\n\n fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }\n\n fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }\n\n fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }\n\n fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }\n\n fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }\n\n fn set_connector_in_payment_attempt(&mut self, connector: Option) {\n self.payment_attempt.connector = connector;\n }\n\n fn set_connector_request_reference_id(&mut self, reference_id: Option) {\n self.payment_attempt.connector_request_reference_id = reference_id;\n }\n\n fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n self.payment_attempt.connector_response_reference_id = reference_id;\n }\n\n fn set_vault_session_details(\n &mut self,\n external_vault_session_details: Option,\n ) {\n todo!()\n }\n\n fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n todo!()\n }\n\n fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n todo!()\n }\n\n fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n todo!()\n }\n}", + "after_code": "impl OperationSessionSetters for PaymentConfirmData {\n #[cfg(feature = \"v2\")]\n fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(straight_through_algorithm);\n }\n // Setters Implementation\n fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }\n fn set_client_secret(&mut self, client_secret: Option>) {\n todo!()\n }\n fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }\n\n fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }\n\n fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }\n\n fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }\n\n fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }\n\n fn set_pm_token(&mut self, _token: String) {\n todo!()\n }\n\n fn set_connector_customer_id(&mut self, _customer_id: Option) {\n // TODO: handle this case. Should we add connector_customer_id in paymentConfirmData?\n }\n\n fn push_sessions_token(&mut self, _token: api::SessionToken) {\n todo!()\n }\n\n fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n todo!()\n }\n\n fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }\n\n fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }\n\n #[track_caller]\n fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n ) {\n self.payment_attempt.merchant_connector_id = merchant_connector_id;\n }\n\n fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }\n\n fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }\n\n fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }\n\n fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }\n\n fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }\n\n fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n self.payment_intent.setup_future_usage = setup_future_usage;\n }\n\n fn set_connector_in_payment_attempt(&mut self, connector: Option) {\n self.payment_attempt.connector = connector;\n }\n\n fn set_connector_request_reference_id(&mut self, reference_id: Option) {\n self.payment_attempt.connector_request_reference_id = reference_id;\n }\n\n fn set_connector_response_reference_id(&mut self, reference_id: Option) {\n self.payment_attempt.connector_response_reference_id = reference_id;\n }\n\n fn set_vault_session_details(\n &mut self,\n external_vault_session_details: Option,\n ) {\n todo!()\n }\n\n fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n todo!()\n }\n\n fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n todo!()\n }\n\n fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n todo!()\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ], + "after_imports": [ + "use std::future;", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_payment_attempt_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_attempt_connector(&self) -> Option<&str> {\n self.payment_attempt.connector.as_deref()\n }", + "after_code": "fn get_payment_attempt_connector(&self) -> Option<&str> {\n self.payment_attempt.connector.as_deref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_refunds", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_refunds(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_refunds(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_payment_intent_status", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }", + "after_code": "fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_currency", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_currency(&self) -> storage_enums::Currency {\n todo!()\n }", + "after_code": "fn get_currency(&self) -> storage_enums::Currency {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Cards", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Cards;", + "after_code": "pub struct Cards;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_payment_attempt_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_attempt_connector(&self) -> Option<&str> {\n todo!()\n }", + "after_code": "fn get_payment_attempt_connector(&self) -> Option<&str> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_refunds", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_refunds(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_refunds(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::list_payments_attempts", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn list_payments_attempts(&self) -> &Vec {\n &self.payment_attempt_list\n }", + "after_code": "fn list_payments_attempts(&self) -> &Vec {\n &self.payment_attempt_list\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_payment_link_response_from_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn get_payment_link_response_from_id(\n state: &SessionState,\n payment_link_id: &str,\n) -> CustomResult {\n let db = &*state.store;\n\n let payment_link_object = db\n .find_payment_link_by_payment_link_id(payment_link_id)\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentLinkNotFound)?;\n\n Ok(api_models::payments::PaymentLinkResponse {\n link: payment_link_object.link_to_pay.clone(),\n secure_link: payment_link_object.secure_link,\n payment_link_id: payment_link_object.payment_link_id,\n })\n}", + "after_code": "pub async fn get_payment_link_response_from_id(\n state: &SessionState,\n payment_link_id: &str,\n) -> CustomResult {\n let db = &*state.store;\n\n let payment_link_object = db\n .find_payment_link_by_payment_link_id(payment_link_id)\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentLinkNotFound)?;\n\n Ok(api_models::payments::PaymentLinkResponse {\n link: payment_link_object.link_to_pay.clone(),\n secure_link: payment_link_object.secure_link,\n payment_link_id: payment_link_object.payment_link_id,\n })\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::storage_impl::config::Database::function::from", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn from(val: Database) -> Self {\n Self {\n username: val.username,\n password: val.password,\n host: val.host,\n port: val.port,\n dbname: val.dbname,\n pool_size: val.pool_size,\n connection_timeout: val.connection_timeout,\n queue_strategy: val.queue_strategy,\n min_idle: val.min_idle,\n max_lifetime: val.max_lifetime,\n }\n }", + "after_code": "fn from(val: Database) -> Self {\n Self {\n username: val.username,\n password: val.password,\n host: val.host,\n port: val.port,\n dbname: val.dbname,\n pool_size: val.pool_size,\n connection_timeout: val.connection_timeout,\n queue_strategy: val.queue_strategy,\n min_idle: val.min_idle,\n max_lifetime: val.max_lifetime,\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::PaymentLink", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PaymentLink;", + "after_code": "pub struct PaymentLink;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_merchant_connector_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_merchant_connector_details(\n &self,\n ) -> Option {\n self.merchant_connector_details.clone()\n }", + "after_code": "fn get_merchant_connector_details(\n &self,\n ) -> Option {\n self.merchant_connector_details.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/setup_mandate_flow.rs::types::SetupMandateRouterData::function::decide_flows", + "file": "crates/router/src/core/payments/flows/setup_mandate_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "async fn decide_flows<'a>(\n mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: domain_payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::SetupMandate,\n types::SetupMandateRequestData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n // Change the authentication_type to ThreeDs, for google_pay wallet if card_holder_authenticated or account_verified in assurance_details is false\n if let hyperswitch_domain_models::payment_method_data::PaymentMethodData::Wallet(\n hyperswitch_domain_models::payment_method_data::WalletData::GooglePay(google_pay_data),\n ) = &self.request.payment_method_data\n {\n if let Some(assurance_details) = google_pay_data.info.assurance_details.as_ref() {\n // Step up the transaction to 3DS when either assurance_details.card_holder_authenticated or assurance_details.account_verified is false\n if !assurance_details.card_holder_authenticated\n || !assurance_details.account_verified\n {\n logger::info!(\"Googlepay transaction stepped up to 3DS\");\n self.auth_type = diesel_models::enums::AuthenticationType::ThreeDs;\n }\n }\n }\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action.clone(),\n connector_request,\n None,\n )\n .await\n .to_setup_mandate_failed_response()?;\n Ok(resp)\n }", + "after_code": "async fn decide_flows<'a>(\n mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: domain_payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::SetupMandate,\n types::SetupMandateRequestData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n // Change the authentication_type to ThreeDs, for google_pay wallet if card_holder_authenticated or account_verified in assurance_details is false\n if let hyperswitch_domain_models::payment_method_data::PaymentMethodData::Wallet(\n hyperswitch_domain_models::payment_method_data::WalletData::GooglePay(google_pay_data),\n ) = &self.request.payment_method_data\n {\n if let Some(assurance_details) = google_pay_data.info.assurance_details.as_ref() {\n // Step up the transaction to 3DS when either assurance_details.card_holder_authenticated or assurance_details.account_verified is false\n if !assurance_details.card_holder_authenticated\n || !assurance_details.account_verified\n {\n logger::info!(\"Googlepay transaction stepped up to 3DS\");\n self.auth_type = diesel_models::enums::AuthenticationType::ThreeDs;\n }\n }\n }\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action.clone(),\n connector_request,\n None,\n )\n .await\n .to_setup_mandate_failed_response()?;\n Ok(resp)\n }", + "diff_span": { + "before": "", + "after": " _header_payload: domain_payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_card_network", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n todo!()\n }", + "after_code": "fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_optional_external_vault_session_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_optional_external_vault_session_details(&self) -> Option {\n self.vault_session_details.clone()\n }", + "after_code": "fn get_optional_external_vault_session_details(&self) -> Option {\n self.vault_session_details.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::AppState::function::conf", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn conf(&self) -> settings::Settings {\n self.conf.as_ref().to_owned()\n }", + "after_code": "fn conf(&self) -> settings::Settings {\n self.conf.as_ref().to_owned()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::ThreeDsDecisionRule::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/three_ds_decision\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/execute\")\n .route(web::post().to(three_ds_decision_rule::execute_decision_rule)),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/three_ds_decision\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/execute\")\n .route(web::post().to(three_ds_decision_rule::execute_decision_rule)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::DecideWalletFlow", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl DecideWalletFlow {\n fn get_paze_payment_processing_details(&self) -> Option<&PazePaymentProcessingDetails> {\n if let Self::PazeDecrypt(details) = self {\n Some(details)\n } else {\n None\n }\n }\n\n fn get_apple_pay_payment_processing_details(\n &self,\n ) -> Option<&payments_api::PaymentProcessingDetails> {\n if let Self::ApplePayDecrypt(details) = self {\n Some(details)\n } else {\n None\n }\n }\n\n fn get_google_pay_payment_processing_details(\n &self,\n ) -> Option<&GooglePayPaymentProcessingDetails> {\n if let Self::GooglePayDecrypt(details) = self {\n Some(details)\n } else {\n None\n }\n }\n}", + "after_code": "impl DecideWalletFlow {\n fn get_paze_payment_processing_details(&self) -> Option<&PazePaymentProcessingDetails> {\n if let Self::PazeDecrypt(details) = self {\n Some(details)\n } else {\n None\n }\n }\n\n fn get_apple_pay_payment_processing_details(\n &self,\n ) -> Option<&payments_api::PaymentProcessingDetails> {\n if let Self::ApplePayDecrypt(details) = self {\n Some(details)\n } else {\n None\n }\n }\n\n fn get_google_pay_payment_processing_details(\n &self,\n ) -> Option<&GooglePayPaymentProcessingDetails> {\n if let Self::GooglePayDecrypt(details) = self {\n Some(details)\n } else {\n None\n }\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::Frm", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Frm {\n pub enabled: bool,\n}", + "after_code": "pub struct Frm {\n pub enabled: bool,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_client_secret", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_client_secret(&self) -> &Option> {\n &self.client_secret\n }", + "after_code": "fn get_client_secret(&self) -> &Option> {\n &self.client_secret\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::SessionState", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl hyperswitch_interfaces::api_client::ApiClientWrapper for SessionState {\n fn get_api_client(&self) -> &dyn crate::services::ApiClient {\n self.api_client.as_ref()\n }\n fn get_proxy(&self) -> hyperswitch_interfaces::types::Proxy {\n self.conf.proxy.clone()\n }\n fn get_request_id(&self) -> Option {\n self.request_id\n }\n fn get_request_id_str(&self) -> Option {\n self.request_id\n .map(|req_id| req_id.as_hyphenated().to_string())\n }\n fn get_tenant(&self) -> Tenant {\n self.tenant.clone()\n }\n fn get_connectors(&self) -> hyperswitch_domain_models::connector_endpoints::Connectors {\n self.conf.connectors.clone()\n }\n fn event_handler(&self) -> &dyn hyperswitch_interfaces::events::EventHandlerInterface {\n &self.event_handler\n }\n}", + "after_code": "impl hyperswitch_interfaces::api_client::ApiClientWrapper for SessionState {\n fn get_api_client(&self) -> &dyn crate::services::ApiClient {\n self.api_client.as_ref()\n }\n fn get_proxy(&self) -> hyperswitch_interfaces::types::Proxy {\n self.conf.proxy.clone()\n }\n fn get_request_id(&self) -> Option {\n self.request_id\n }\n fn get_request_id_str(&self) -> Option {\n self.request_id\n .map(|req_id| req_id.as_hyphenated().to_string())\n }\n fn get_tenant(&self) -> Tenant {\n self.tenant.clone()\n }\n fn get_connectors(&self) -> hyperswitch_domain_models::connector_endpoints::Connectors {\n self.conf.connectors.clone()\n }\n fn event_handler(&self) -> &dyn hyperswitch_interfaces::events::EventHandlerInterface {\n &self.event_handler\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use self::settings::Tenant;", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use super::proxy;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};", + "use router_env::tracing_actix_web::RequestId;" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use self::settings::Tenant;", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use super::proxy;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use router_env::tracing_actix_web::RequestId;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::payments_attempt_operation_core", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn payments_attempt_operation_core(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n payment_id: id_type::GlobalPaymentId,\n header_payload: HeaderPayload,\n) -> RouterResult<(D, Req, Option)>\nwhere\n F: Send + Clone + Sync,\n Req: Clone,\n Op: Operation + Send + Sync,\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n let operation: BoxedOperation<'_, F, Req, D> = Box::new(operation);\n\n tracing::Span::current().record(\n \"merchant_id\",\n merchant_context\n .get_merchant_account()\n .get_id()\n .get_string_repr(),\n );\n\n let _validate_result = operation\n .to_validate_request()?\n .validate_request(&req, &merchant_context)?;\n\n tracing::Span::current().record(\"global_payment_id\", payment_id.get_string_repr());\n\n let operations::GetTrackerResponse { mut payment_data } = operation\n .to_get_tracker()?\n .get_trackers(\n state,\n &payment_id,\n &req,\n &merchant_context,\n &profile,\n &header_payload,\n )\n .await?;\n\n let (_operation, customer) = operation\n .to_domain()?\n .get_customer_details(\n state,\n &mut payment_data,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::CustomerNotFound)\n .attach_printable(\"Failed while fetching/creating customer\")?;\n\n let (_operation, payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data,\n customer.clone(),\n merchant_context.get_merchant_account().storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n None,\n header_payload,\n )\n .await?;\n\n Ok((payment_data, req, customer))\n}", + "after_code": "pub async fn payments_attempt_operation_core(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n payment_id: id_type::GlobalPaymentId,\n header_payload: HeaderPayload,\n) -> RouterResult<(D, Req, Option)>\nwhere\n F: Send + Clone + Sync,\n Req: Clone,\n Op: Operation + Send + Sync,\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n let operation: BoxedOperation<'_, F, Req, D> = Box::new(operation);\n\n tracing::Span::current().record(\n \"merchant_id\",\n merchant_context\n .get_merchant_account()\n .get_id()\n .get_string_repr(),\n );\n\n let _validate_result = operation\n .to_validate_request()?\n .validate_request(&req, &merchant_context)?;\n\n tracing::Span::current().record(\"global_payment_id\", payment_id.get_string_repr());\n\n let operations::GetTrackerResponse { mut payment_data } = operation\n .to_get_tracker()?\n .get_trackers(\n state,\n &payment_id,\n &req,\n &merchant_context,\n &profile,\n &header_payload,\n )\n .await?;\n\n let (_operation, customer) = operation\n .to_domain()?\n .get_customer_details(\n state,\n &mut payment_data,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::CustomerNotFound)\n .attach_printable(\"Failed while fetching/creating customer\")?;\n\n let (_operation, payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data,\n customer.clone(),\n merchant_context.get_merchant_account().storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n None,\n header_payload,\n )\n .await?;\n\n Ok((payment_data, req, customer))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use router_env::{instrument, tracing};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use router_env::{instrument, tracing};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_pm_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_pm_token(&mut self, token: String) {\n self.pm_token = Some(token);\n }", + "after_code": "fn set_pm_token(&mut self, token: String) {\n self.pm_token = Some(token);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Disputes", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Disputes {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/disputes\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/list\").route(web::get().to(disputes::retrieve_disputes_list)))\n .service(\n web::resource(\"/profile/list\")\n .route(web::get().to(disputes::retrieve_disputes_list_profile)),\n )\n .service(web::resource(\"/filter\").route(web::get().to(disputes::get_disputes_filters)))\n .service(\n web::resource(\"/profile/filter\")\n .route(web::get().to(disputes::get_disputes_filters_profile)),\n )\n .service(\n web::resource(\"/accept/{dispute_id}\")\n .route(web::post().to(disputes::accept_dispute)),\n )\n .service(\n web::resource(\"/aggregate\").route(web::get().to(disputes::get_disputes_aggregate)),\n )\n .service(\n web::resource(\"/profile/aggregate\")\n .route(web::get().to(disputes::get_disputes_aggregate_profile)),\n )\n .service(\n web::resource(\"/evidence\")\n .route(web::post().to(disputes::submit_dispute_evidence))\n .route(web::put().to(disputes::attach_dispute_evidence))\n .route(web::delete().to(disputes::delete_dispute_evidence)),\n )\n .service(\n web::resource(\"/evidence/{dispute_id}\")\n .route(web::get().to(disputes::retrieve_dispute_evidence)),\n )\n .service(\n web::resource(\"/{dispute_id}\").route(web::get().to(disputes::retrieve_dispute)),\n )\n .service(\n web::resource(\"/{connector_id}/fetch\")\n .route(web::get().to(disputes::fetch_disputes)),\n )\n }\n}", + "after_code": "impl Disputes {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/disputes\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/list\").route(web::get().to(disputes::retrieve_disputes_list)))\n .service(\n web::resource(\"/profile/list\")\n .route(web::get().to(disputes::retrieve_disputes_list_profile)),\n )\n .service(web::resource(\"/filter\").route(web::get().to(disputes::get_disputes_filters)))\n .service(\n web::resource(\"/profile/filter\")\n .route(web::get().to(disputes::get_disputes_filters_profile)),\n )\n .service(\n web::resource(\"/accept/{dispute_id}\")\n .route(web::post().to(disputes::accept_dispute)),\n )\n .service(\n web::resource(\"/aggregate\").route(web::get().to(disputes::get_disputes_aggregate)),\n )\n .service(\n web::resource(\"/profile/aggregate\")\n .route(web::get().to(disputes::get_disputes_aggregate_profile)),\n )\n .service(\n web::resource(\"/evidence\")\n .route(web::post().to(disputes::submit_dispute_evidence))\n .route(web::put().to(disputes::attach_dispute_evidence))\n .route(web::delete().to(disputes::delete_dispute_evidence)),\n )\n .service(\n web::resource(\"/evidence/{dispute_id}\")\n .route(web::get().to(disputes::retrieve_dispute_evidence)),\n )\n .service(\n web::resource(\"/{dispute_id}\").route(web::get().to(disputes::retrieve_dispute)),\n )\n .service(\n web::resource(\"/{connector_id}/fetch\")\n .route(web::get().to(disputes::fetch_disputes)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Recon", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Recon {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/recon\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/{merchant_id}/update\")\n .route(web::post().to(recon_routes::update_merchant)),\n )\n .service(web::resource(\"/token\").route(web::get().to(recon_routes::get_recon_token)))\n .service(\n web::resource(\"/request\").route(web::post().to(recon_routes::request_for_recon)),\n )\n .service(\n web::resource(\"/verify_token\")\n .route(web::get().to(recon_routes::verify_recon_token)),\n )\n }\n}", + "after_code": "impl Recon {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/recon\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"/{merchant_id}/update\")\n .route(web::post().to(recon_routes::update_merchant)),\n )\n .service(web::resource(\"/token\").route(web::get().to(recon_routes::get_recon_token)))\n .service(\n web::resource(\"/request\").route(web::post().to(recon_routes::request_for_recon)),\n )\n .service(\n web::resource(\"/verify_token\")\n .route(web::get().to(recon_routes::verify_recon_token)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::PayoutLink", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PayoutLink;", + "after_code": "pub struct PayoutLink;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_attempts", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_attempts(&self) -> Option> {\n todo!()\n }", + "after_code": "fn get_attempts(&self) -> Option> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::ProfileNew", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ProfileNew;", + "after_code": "pub struct ProfileNew;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::mod::hashset_deserialization_test", + "file": "crates/router/src/configs/settings.rs", + "kind": "mod_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "mod hashset_deserialization_test {\n #![allow(clippy::unwrap_used)]\n use std::collections::HashSet;\n\n use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };\n\n use super::deserialize_hashset;\n\n #[test]\n fn test_payment_method_hashset_deserializer() {\n use diesel_models::enums::PaymentMethod;\n\n let deserializer: StrDeserializer<'_, ValueError> = \"wallet,card\".into_deserializer();\n let payment_methods = deserialize_hashset::<'_, _, PaymentMethod>(deserializer);\n let expected_payment_methods = HashSet::from([PaymentMethod::Wallet, PaymentMethod::Card]);\n\n assert!(payment_methods.is_ok());\n assert_eq!(payment_methods.unwrap(), expected_payment_methods);\n }\n\n #[test]\n fn test_payment_method_hashset_deserializer_with_spaces() {\n use diesel_models::enums::PaymentMethod;\n\n let deserializer: StrDeserializer<'_, ValueError> =\n \"wallet, card, bank_debit\".into_deserializer();\n let payment_methods = deserialize_hashset::<'_, _, PaymentMethod>(deserializer);\n let expected_payment_methods = HashSet::from([\n PaymentMethod::Wallet,\n PaymentMethod::Card,\n PaymentMethod::BankDebit,\n ]);\n\n assert!(payment_methods.is_ok());\n assert_eq!(payment_methods.unwrap(), expected_payment_methods);\n }\n\n #[test]\n fn test_payment_method_hashset_deserializer_error() {\n use diesel_models::enums::PaymentMethod;\n\n let deserializer: StrDeserializer<'_, ValueError> =\n \"wallet, card, unknown\".into_deserializer();\n let payment_methods = deserialize_hashset::<'_, _, PaymentMethod>(deserializer);\n\n assert!(payment_methods.is_err());\n }\n}", + "after_code": "mod hashset_deserialization_test {\n #![allow(clippy::unwrap_used)]\n use std::collections::HashSet;\n\n use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };\n\n use super::deserialize_hashset;\n\n #[test]\n fn test_payment_method_hashset_deserializer() {\n use diesel_models::enums::PaymentMethod;\n\n let deserializer: StrDeserializer<'_, ValueError> = \"wallet,card\".into_deserializer();\n let payment_methods = deserialize_hashset::<'_, _, PaymentMethod>(deserializer);\n let expected_payment_methods = HashSet::from([PaymentMethod::Wallet, PaymentMethod::Card]);\n\n assert!(payment_methods.is_ok());\n assert_eq!(payment_methods.unwrap(), expected_payment_methods);\n }\n\n #[test]\n fn test_payment_method_hashset_deserializer_with_spaces() {\n use diesel_models::enums::PaymentMethod;\n\n let deserializer: StrDeserializer<'_, ValueError> =\n \"wallet, card, bank_debit\".into_deserializer();\n let payment_methods = deserialize_hashset::<'_, _, PaymentMethod>(deserializer);\n let expected_payment_methods = HashSet::from([\n PaymentMethod::Wallet,\n PaymentMethod::Card,\n PaymentMethod::BankDebit,\n ]);\n\n assert!(payment_methods.is_ok());\n assert_eq!(payment_methods.unwrap(), expected_payment_methods);\n }\n\n #[test]\n fn test_payment_method_hashset_deserializer_error() {\n use diesel_models::enums::PaymentMethod;\n\n let deserializer: StrDeserializer<'_, ValueError> =\n \"wallet, card, unknown\".into_deserializer();\n let payment_methods = deserialize_hashset::<'_, _, PaymentMethod>(deserializer);\n\n assert!(payment_methods.is_err());\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::PaymentMethod;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use super::deserialize_hashset;", + "use serde::de::Error;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "use serde::Deserialize;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use super::deserialize_hashset;", + "use serde::de::Error;", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::list_payments_attempts", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn list_payments_attempts(&self) -> &Vec {\n todo!()\n }", + "after_code": "fn list_payments_attempts(&self) -> &Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Chat", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Chat {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/chat\").app_data(web::Data::new(state.clone()));\n if state.conf.chat.get_inner().enabled {\n route = route.service(\n web::scope(\"/ai\")\n .service(\n web::resource(\"/data\")\n .route(web::post().to(chat::get_data_from_hyperswitch_ai_workflow)),\n )\n .service(\n web::resource(\"/list\").route(web::get().to(chat::get_all_conversations)),\n ),\n );\n }\n route\n }\n}", + "after_code": "impl Chat {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/chat\").app_data(web::Data::new(state.clone()));\n if state.conf.chat.get_inner().enabled {\n route = route.service(\n web::scope(\"/ai\")\n .service(\n web::resource(\"/data\")\n .route(web::post().to(chat::get_data_from_hyperswitch_ai_workflow)),\n )\n .service(\n web::resource(\"/list\").route(web::get().to(chat::get_all_conversations)),\n ),\n );\n }\n route\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::call_decision_manager", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn call_decision_manager(\n state: &SessionState,\n record: common_types::payments::DecisionManagerRecord,\n payment_data: &PaymentConfirmData,\n) -> RouterResult>\nwhere\n F: Clone,\n{\n let payment_method_data = payment_data.get_payment_method_data();\n let payment_dsl_data = core_routing::PaymentsDslInput::new(\n None,\n payment_data.get_payment_attempt(),\n payment_data.get_payment_intent(),\n payment_method_data,\n payment_data.get_address(),\n None,\n payment_data.get_currency(),\n );\n\n let output = perform_decision_management(record, &payment_dsl_data)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Could not decode the conditional config\")?;\n\n Ok(output.override_3ds)\n}", + "after_code": "pub fn call_decision_manager(\n state: &SessionState,\n record: common_types::payments::DecisionManagerRecord,\n payment_data: &PaymentConfirmData,\n) -> RouterResult>\nwhere\n F: Clone,\n{\n let payment_method_data = payment_data.get_payment_method_data();\n let payment_dsl_data = core_routing::PaymentsDslInput::new(\n None,\n payment_data.get_payment_attempt(),\n payment_data.get_payment_intent(),\n payment_method_data,\n payment_data.get_address(),\n None,\n payment_data.get_currency(),\n );\n\n let output = perform_decision_management(record, &payment_dsl_data)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Could not decode the conditional config\")?;\n\n Ok(output.override_3ds)\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::WebhookSourceVerificationCall", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct WebhookSourceVerificationCall {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub connectors_with_webhook_source_verification_call: HashSet,\n}", + "after_code": "pub struct WebhookSourceVerificationCall {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub connectors_with_webhook_source_verification_call: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use super::deserialize_hashset;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use api_models::enums;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/core/payments/flows/psync_flow.rs::impl::types::RouterData", + "file": "crates/router/src/core/payments/flows/psync_flow.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": true, + "imports_changed": true, + "before_code": "impl RouterDataPSync\n for types::RouterData\n{\n async fn execute_connector_processing_step_for_each_capture(\n &self,\n state: &SessionState,\n pending_connector_capture_id_list: Vec,\n call_connector_action: payments::CallConnectorAction,\n connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PSync,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n >,\n return_raw_connector_response: Option,\n ) -> RouterResult {\n let mut capture_sync_response_map = HashMap::new();\n if let payments::CallConnectorAction::HandleResponse(_) = call_connector_action {\n // webhook consume flow, only call connector once. Since there will only be a single event in every webhook\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n self,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n } else {\n // in trigger, call connector for every capture_id\n for connector_capture_id in pending_connector_capture_id_list {\n // TEMPORARY FIX: remove the clone on router data after removing this function as an impl on trait RouterDataPSync\n // TRACKING ISSUE: https://github.com/juspay/hyperswitch/issues/4644\n let mut cloned_router_data = self.clone();\n cloned_router_data.request.connector_transaction_id =\n types::ResponseId::ConnectorTransactionId(connector_capture_id.clone());\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration.clone_box(),\n &cloned_router_data,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n match resp.response {\n Err(err) => {\n capture_sync_response_map.insert(connector_capture_id, types::CaptureSyncResponse::Error {\n code: err.code,\n message: err.message,\n reason: err.reason,\n status_code: err.status_code,\n amount: None,\n });\n },\n Ok(types::PaymentsResponseData::MultipleCaptureResponse { capture_sync_response_list })=> {\n capture_sync_response_map.extend(capture_sync_response_list.into_iter());\n }\n _ => Err(ApiErrorResponse::PreconditionFailed { message: \"Response type must be PaymentsResponseData::MultipleCaptureResponse for payment sync\".into() })?,\n };\n }\n let mut cloned_router_data = self.clone();\n cloned_router_data.response =\n Ok(types::PaymentsResponseData::MultipleCaptureResponse {\n capture_sync_response_list: capture_sync_response_map,\n });\n Ok(cloned_router_data)\n }\n }\n}", + "after_code": "impl RouterDataPSync\n for types::RouterData\n{\n async fn execute_connector_processing_step_for_each_capture(\n &self,\n state: &SessionState,\n pending_connector_capture_id_list: Vec,\n call_connector_action: payments::CallConnectorAction,\n connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PSync,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n >,\n return_raw_connector_response: Option,\n gateway_context: Option,\n ) -> RouterResult {\n let mut capture_sync_response_map = HashMap::new();\n if let payments::CallConnectorAction::HandleResponse(_) = call_connector_action {\n // webhook consume flow, only call connector once. Since there will only be a single event in every webhook\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n self,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n } else {\n // in trigger, call connector for every capture_id\n for connector_capture_id in pending_connector_capture_id_list {\n // TEMPORARY FIX: remove the clone on router data after removing this function as an impl on trait RouterDataPSync\n // TRACKING ISSUE: https://github.com/juspay/hyperswitch/issues/4644\n let mut cloned_router_data = self.clone();\n cloned_router_data.request.connector_transaction_id =\n types::ResponseId::ConnectorTransactionId(connector_capture_id.clone());\n let resp = if let Some(ref gateway_context) = gateway_context {\n gateway::execute_payment_gateway(\n state,\n connector_integration.clone_box(),\n &cloned_router_data,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n gateway_context.clone(),\n )\n .await\n } else {\n services::execute_connector_processing_step(\n state,\n connector_integration.clone_box(),\n &cloned_router_data,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n )\n .await\n }\n .to_payment_failed_response()?;\n match resp.response {\n Err(err) => {\n capture_sync_response_map.insert(connector_capture_id, types::CaptureSyncResponse::Error {\n code: err.code,\n message: err.message,\n reason: err.reason,\n status_code: err.status_code,\n amount: None,\n });\n },\n Ok(types::PaymentsResponseData::MultipleCaptureResponse { capture_sync_response_list })=> {\n capture_sync_response_map.extend(capture_sync_response_list.into_iter());\n }\n _ => Err(ApiErrorResponse::PreconditionFailed { message: \"Response type must be PaymentsResponseData::MultipleCaptureResponse for payment sync\".into() })?,\n };\n }\n let mut cloned_router_data = self.clone();\n cloned_router_data.response =\n Ok(types::PaymentsResponseData::MultipleCaptureResponse {\n capture_sync_response_list: capture_sync_response_map,\n });\n Ok(cloned_router_data)\n }\n }\n}", + "diff_span": { + "before": " cloned_router_data.request.connector_transaction_id =\n types::ResponseId::ConnectorTransactionId(connector_capture_id.clone());\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration.clone_box(),\n &cloned_router_data,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n match resp.response {", + "after": " >,\n return_raw_connector_response: Option,\n gateway_context: Option,\n ) -> RouterResult {\n let mut capture_sync_response_map = HashMap::new();\n if let payments::CallConnectorAction::HandleResponse(_) = call_connector_action {\n // webhook consume flow, only call connector once. Since there will only be a single event in every webhook\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n self,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n } else {\n // in trigger, call connector for every capture_id\n for connector_capture_id in pending_connector_capture_id_list {\n // TEMPORARY FIX: remove the clone on router data after removing this function as an impl on trait RouterDataPSync\n // TRACKING ISSUE: https://github.com/juspay/hyperswitch/issues/4644\n let mut cloned_router_data = self.clone();\n cloned_router_data.request.connector_transaction_id =\n types::ResponseId::ConnectorTransactionId(connector_capture_id.clone());\n let resp = if let Some(ref gateway_context) = gateway_context {\n gateway::execute_payment_gateway(\n state,\n connector_integration.clone_box(),\n &cloned_router_data,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n gateway_context.clone(),\n )\n .await\n } else {\n services::execute_connector_processing_step(\n state,\n connector_integration.clone_box(),\n &cloned_router_data,\n call_connector_action.clone(),\n None,\n return_raw_connector_response,\n )\n .await\n }\n .to_payment_failed_response()?;\n match resp.response {" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n};" + ], + "after_imports": [ + "use common_enums::{self, enums};", + "use hyperswitch_interfaces::{\n api::gateway,\n unified_connector_service::{\n get_payments_response_from_ucs_webhook_content,\n handle_unified_connector_service_response_for_payment_get,\n },\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_optional_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt> {\n Some(&self.payment_attempt)\n }", + "after_code": "fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt> {\n Some(&self.payment_attempt)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows.rs::trait::Feature", + "file": "crates/router/src/core/payments/flows.rs", + "kind": "trait_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "pub trait Feature {\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n business_profile: &domain::Profile,\n header_payload: domain_payments::HeaderPayload,\n return_raw_connector_response: Option,\n ) -> RouterResult\n where\n Self: Sized,\n F: Clone,\n dyn api::Connector: services::ConnectorIntegration;\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration;\n\n async fn add_session_token<'a>(\n self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n ) -> RouterResult\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n Ok(self)\n }\n\n async fn add_payment_method_token<'a>(\n &mut self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _tokenization_action: &payments::TokenizationAction,\n _should_continue_payment: bool,\n ) -> RouterResult\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n Ok(types::PaymentMethodTokenResult {\n payment_method_token_result: Ok(None),\n is_payment_method_tokenization_performed: false,\n connector_response: None,\n })\n }\n\n async fn preprocessing_steps<'a>(\n self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n ) -> RouterResult\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n Ok(self)\n }\n\n async fn postprocessing_steps<'a>(\n self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n ) -> RouterResult\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n Ok(self)\n }\n\n async fn create_connector_customer<'a>(\n &self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n ) -> RouterResult>\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n Ok(None)\n }\n\n /// Returns the connector request and a bool which specifies whether to proceed with further\n async fn build_flow_specific_connector_request(\n &mut self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n Ok((None, true))\n }\n\n async fn create_order_at_connector(\n &mut self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _should_continue_payment: bool,\n ) -> RouterResult>\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n Ok(None)\n }\n\n fn update_router_data_with_create_order_response(\n &mut self,\n _create_order_result: types::CreateOrderResult,\n ) {\n }\n\n fn get_current_flow_info(&self) -> Option> {\n None\n }\n\n async fn call_preprocessing_through_unified_connector_service<'a>(\n self,\n _state: &SessionState,\n _header_payload: &domain_payments::HeaderPayload,\n _lineage_ids: &grpc_client::LineageIds,\n #[cfg(feature = \"v1\")] _merchant_connector_account: helpers::MerchantConnectorAccountType,\n #[cfg(feature = \"v2\")]\n _merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n _merchant_context: &domain::MerchantContext,\n _connector_data: &api::ConnectorData,\n _unified_connector_service_execution_mode: ExecutionMode,\n _merchant_order_reference_id: Option,\n ) -> RouterResult<(Self, bool)>\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n // Default behaviour is to do nothing and continue further\n Ok((self, true))\n }\n\n async fn call_unified_connector_service<'a>(\n &mut self,\n _state: &SessionState,\n _header_payload: &domain_payments::HeaderPayload,\n _lineage_ids: grpc_client::LineageIds,\n #[cfg(feature = \"v1\")] _merchant_connector_account: helpers::MerchantConnectorAccountType,\n #[cfg(feature = \"v2\")]\n _merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n _merchant_context: &domain::MerchantContext,\n _connector_data: &api::ConnectorData,\n _unified_connector_service_execution_mode: ExecutionMode,\n _merchant_order_reference_id: Option,\n _call_connector_action: common_enums::CallConnectorAction,\n _creds_identifier: Option,\n ) -> RouterResult<()>\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n Ok(())\n }\n\n #[cfg(feature = \"v2\")]\n async fn call_unified_connector_service_with_external_vault_proxy<'a>(\n &mut self,\n _state: &SessionState,\n _header_payload: &domain_payments::HeaderPayload,\n _lineage_ids: grpc_client::LineageIds,\n _merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n _external_vault_merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n _merchant_context: &domain::MerchantContext,\n _unified_connector_service_execution_mode: ExecutionMode,\n _merchant_order_reference_id: Option,\n ) -> RouterResult<()>\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n Ok(())\n }\n}", + "after_code": "pub trait Feature {\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n business_profile: &domain::Profile,\n header_payload: domain_payments::HeaderPayload,\n return_raw_connector_response: Option,\n gateway_context: Option,\n ) -> RouterResult\n where\n Self: Sized,\n F: Clone,\n dyn api::Connector: services::ConnectorIntegration;\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration;\n\n async fn add_session_token<'a>(\n self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n ) -> RouterResult\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n Ok(self)\n }\n\n async fn add_payment_method_token<'a>(\n &mut self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _tokenization_action: &payments::TokenizationAction,\n _should_continue_payment: bool,\n ) -> RouterResult\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n Ok(types::PaymentMethodTokenResult {\n payment_method_token_result: Ok(None),\n is_payment_method_tokenization_performed: false,\n connector_response: None,\n })\n }\n\n async fn preprocessing_steps<'a>(\n self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n ) -> RouterResult\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n Ok(self)\n }\n\n async fn postprocessing_steps<'a>(\n self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n ) -> RouterResult\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n Ok(self)\n }\n\n async fn create_connector_customer<'a>(\n &self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n ) -> RouterResult>\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n Ok(None)\n }\n\n /// Returns the connector request and a bool which specifies whether to proceed with further\n async fn build_flow_specific_connector_request(\n &mut self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n Ok((None, true))\n }\n\n async fn create_order_at_connector(\n &mut self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _should_continue_payment: bool,\n ) -> RouterResult>\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n Ok(None)\n }\n\n fn update_router_data_with_create_order_response(\n &mut self,\n _create_order_result: types::CreateOrderResult,\n ) {\n }\n\n fn get_current_flow_info(&self) -> Option> {\n None\n }\n\n async fn call_preprocessing_through_unified_connector_service<'a>(\n self,\n _state: &SessionState,\n _header_payload: &domain_payments::HeaderPayload,\n _lineage_ids: &grpc_client::LineageIds,\n #[cfg(feature = \"v1\")] _merchant_connector_account: helpers::MerchantConnectorAccountType,\n #[cfg(feature = \"v2\")]\n _merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n _merchant_context: &domain::MerchantContext,\n _connector_data: &api::ConnectorData,\n _unified_connector_service_execution_mode: ExecutionMode,\n _merchant_order_reference_id: Option,\n ) -> RouterResult<(Self, bool)>\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n // Default behaviour is to do nothing and continue further\n Ok((self, true))\n }\n\n async fn call_unified_connector_service<'a>(\n &mut self,\n _state: &SessionState,\n _header_payload: &domain_payments::HeaderPayload,\n _lineage_ids: grpc_client::LineageIds,\n #[cfg(feature = \"v1\")] _merchant_connector_account: helpers::MerchantConnectorAccountType,\n #[cfg(feature = \"v2\")]\n _merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n _merchant_context: &domain::MerchantContext,\n _connector_data: &api::ConnectorData,\n _unified_connector_service_execution_mode: ExecutionMode,\n _merchant_order_reference_id: Option,\n _call_connector_action: common_enums::CallConnectorAction,\n _creds_identifier: Option,\n ) -> RouterResult<()>\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n Ok(())\n }\n\n #[cfg(feature = \"v2\")]\n async fn call_unified_connector_service_with_external_vault_proxy<'a>(\n &mut self,\n _state: &SessionState,\n _header_payload: &domain_payments::HeaderPayload,\n _lineage_ids: grpc_client::LineageIds,\n _merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n _external_vault_merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n _merchant_context: &domain::MerchantContext,\n _unified_connector_service_execution_mode: ExecutionMode,\n _merchant_order_reference_id: Option,\n ) -> RouterResult<()>\n where\n F: Clone,\n Self: Sized,\n dyn api::Connector: services::ConnectorIntegration,\n {\n Ok(())\n }\n}", + "diff_span": { + "before": "", + "after": " header_payload: domain_payments::HeaderPayload,\n return_raw_connector_response: Option,\n gateway_context: Option,\n ) -> RouterResult\n where" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_creds_identifier", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_creds_identifier(&self) -> Option<&str> {\n self.creds_identifier.as_deref()\n }", + "after_code": "fn get_creds_identifier(&self) -> Option<&str> {\n self.creds_identifier.as_deref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_connector_customer_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_connector_customer_id(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_connector_customer_id(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::ProfileAcquirer", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl ProfileAcquirer {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/profile_acquirer\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\").route(web::post().to(profile_acquirer::create_profile_acquirer)),\n )\n .service(\n web::resource(\"/{profile_id}/{profile_acquirer_id}\")\n .route(web::post().to(profile_acquirer::profile_acquirer_update)),\n )\n }\n}", + "after_code": "impl ProfileAcquirer {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/profile_acquirer\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\").route(web::post().to(profile_acquirer::create_profile_acquirer)),\n )\n .service(\n web::resource(\"/{profile_id}/{profile_acquirer_id}\")\n .route(web::post().to(profile_acquirer::profile_acquirer_update)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::routes::profile_acquirer;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::routes::profile_acquirer;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::BlockListCheck::function::should_run", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn should_run(\n &self,\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n ) -> CustomResult {\n let merchant_id = merchant_context.get_merchant_account().get_id();\n let blocklist_enabled_key = merchant_id.get_blocklist_guard_key();\n let blocklist_guard_enabled = state\n .store\n .find_config_by_key_unwrap_or(&blocklist_enabled_key, Some(\"false\".to_string()))\n .await;\n\n Ok(match blocklist_guard_enabled {\n Ok(config) => serde_json::from_str(&config.config).unwrap_or(false),\n\n // If it is not present in db we are defaulting it to false\n Err(inner) => {\n if !inner.current_context().is_db_not_found() {\n logger::error!(\"Error fetching guard blocklist enabled config {:?}\", inner);\n }\n false\n }\n })\n }", + "after_code": "async fn should_run(\n &self,\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n ) -> CustomResult {\n let merchant_id = merchant_context.get_merchant_account().get_id();\n let blocklist_enabled_key = merchant_id.get_blocklist_guard_key();\n let blocklist_guard_enabled = state\n .store\n .find_config_by_key_unwrap_or(&blocklist_enabled_key, Some(\"false\".to_string()))\n .await;\n\n Ok(match blocklist_guard_enabled {\n Ok(config) => serde_json::from_str(&config.config).unwrap_or(false),\n\n // If it is not present in db we are defaulting it to false\n Err(inner) => {\n if !inner.current_context().is_db_not_found() {\n logger::error!(\"Error fetching guard blocklist enabled config {:?}\", inner);\n }\n false\n }\n })\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_frm_message", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_frm_message(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_frm_message(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::route_connector_v2_for_payments", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn route_connector_v2_for_payments(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n business_profile: &domain::Profile,\n transaction_data: core_routing::PaymentsDslInput<'_>,\n routing_data: &mut storage::RoutingData,\n _mandate_type: Option,\n) -> RouterResult {\n let routing_algorithm_id = routing_data\n .algorithm_requested\n .as_ref()\n .or(business_profile.routing_algorithm_id.as_ref());\n\n let (connectors, _) = routing::perform_static_routing_v1(\n state,\n merchant_context.get_merchant_account().get_id(),\n routing_algorithm_id,\n business_profile,\n &TransactionData::Payment(transaction_data.clone()),\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)?;\n\n let connectors = routing::perform_eligibility_analysis_with_fallback(\n &state.clone(),\n merchant_context.get_merchant_key_store(),\n connectors,\n &TransactionData::Payment(transaction_data),\n None,\n business_profile,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed eligibility analysis and fallback\")?;\n\n connectors\n .first()\n .map(|conn| {\n routing_data.routed_through = Some(conn.connector.to_string());\n routing_data.merchant_connector_id = conn.merchant_connector_id.clone();\n api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &conn.connector.to_string(),\n api::GetToken::Connector,\n conn.merchant_connector_id.clone(),\n )\n })\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)?\n .map(|connector_data| ConnectorCallType::PreDetermined(connector_data.into()))\n}", + "after_code": "pub async fn route_connector_v2_for_payments(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n business_profile: &domain::Profile,\n transaction_data: core_routing::PaymentsDslInput<'_>,\n routing_data: &mut storage::RoutingData,\n _mandate_type: Option,\n) -> RouterResult {\n let routing_algorithm_id = routing_data\n .algorithm_requested\n .as_ref()\n .or(business_profile.routing_algorithm_id.as_ref());\n\n let (connectors, _) = routing::perform_static_routing_v1(\n state,\n merchant_context.get_merchant_account().get_id(),\n routing_algorithm_id,\n business_profile,\n &TransactionData::Payment(transaction_data.clone()),\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)?;\n\n let connectors = routing::perform_eligibility_analysis_with_fallback(\n &state.clone(),\n merchant_context.get_merchant_key_store(),\n connectors,\n &TransactionData::Payment(transaction_data),\n None,\n business_profile,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed eligibility analysis and fallback\")?;\n\n connectors\n .first()\n .map(|conn| {\n routing_data.routed_through = Some(conn.connector.to_string());\n routing_data.merchant_connector_id = conn.merchant_connector_id.clone();\n api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &conn.connector.to_string(),\n api::GetToken::Connector,\n conn.merchant_connector_id.clone(),\n )\n })\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)?\n .map(|connector_data| ConnectorCallType::PreDetermined(connector_data.into()))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Cards::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/cards\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/create\").route(web::post().to(create_cards_info)))\n .service(web::resource(\"/update\").route(web::post().to(update_cards_info)))\n .service(web::resource(\"/update-batch\").route(web::post().to(migrate_cards_info)))\n .service(web::resource(\"/{bin}\").route(web::get().to(card_iin_info)))\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/cards\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/create\").route(web::post().to(create_cards_info)))\n .service(web::resource(\"/update\").route(web::post().to(update_cards_info)))\n .service(web::resource(\"/update-batch\").route(web::post().to(migrate_cards_info)))\n .service(web::resource(\"/{bin}\").route(web::get().to(card_iin_info)))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::is_payment_method_type_allowed_for_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn is_payment_method_type_allowed_for_connector(\n current_pm_type: Option,\n pm_type_filter: Option,\n) -> bool {\n match (current_pm_type).zip(pm_type_filter) {\n Some((pm_type, type_filter)) => match type_filter {\n PaymentMethodTypeTokenFilter::AllAccepted => true,\n PaymentMethodTypeTokenFilter::EnableOnly(enabled) => enabled.contains(&pm_type),\n PaymentMethodTypeTokenFilter::DisableOnly(disabled) => !disabled.contains(&pm_type),\n },\n None => true, // Allow all types if payment_method_type is not present\n }\n}", + "after_code": "fn is_payment_method_type_allowed_for_connector(\n current_pm_type: Option,\n pm_type_filter: Option,\n) -> bool {\n match (current_pm_type).zip(pm_type_filter) {\n Some((pm_type, type_filter)) => match type_filter {\n PaymentMethodTypeTokenFilter::AllAccepted => true,\n PaymentMethodTypeTokenFilter::EnableOnly(enabled) => enabled.contains(&pm_type),\n PaymentMethodTypeTokenFilter::DisableOnly(disabled) => !disabled.contains(&pm_type),\n },\n None => true, // Allow all types if payment_method_type is not present\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_token_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_token_data(&self) -> Option<&storage::PaymentTokenData> {\n todo!()\n }", + "after_code": "fn get_token_data(&self) -> Option<&storage::PaymentTokenData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_payment_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }", + "after_code": "fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::LockerBasedRecipientConnectorList", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct LockerBasedRecipientConnectorList {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub connector_list: HashSet,\n}", + "after_code": "pub struct LockerBasedRecipientConnectorList {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub connector_list: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use super::deserialize_hashset;", + "use std::collections::{HashMap, HashSet};", + "use std::collections::HashSet;" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/approve_flow.rs::impl::types::RouterData", + "file": "crates/router/src/core/payments/flows/approve_flow.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": true, + "imports_changed": true, + "before_code": "impl Feature\n for types::RouterData\n{\n async fn decide_flows<'a>(\n self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _call_connector_action: payments::CallConnectorAction,\n _connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n Err(ApiErrorResponse::NotImplemented {\n message: NotImplementedMessage::Reason(\"Flow not supported\".to_string()),\n }\n .into())\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n Err(ApiErrorResponse::NotImplemented {\n message: NotImplementedMessage::Reason(\"Flow not supported\".to_string()),\n }\n .into())\n }\n}", + "after_code": "impl Feature\n for types::RouterData\n{\n async fn decide_flows<'a>(\n self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _call_connector_action: payments::CallConnectorAction,\n _connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n Err(ApiErrorResponse::NotImplemented {\n message: NotImplementedMessage::Reason(\"Flow not supported\".to_string()),\n }\n .into())\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n _state: &SessionState,\n _connector: &api::ConnectorData,\n _call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n Err(ApiErrorResponse::NotImplemented {\n message: NotImplementedMessage::Reason(\"Flow not supported\".to_string()),\n }\n .into())\n }\n}", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n Err(ApiErrorResponse::NotImplemented {" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::{ConstructFlowSpecificData, Feature};", + "use crate::{\n core::{\n errors::{ApiErrorResponse, NotImplementedMessage, RouterResult},\n payments::{self, access_token, helpers, transformers, PaymentData},\n },\n routes::SessionState,\n services,\n types::{self, api, domain},\n};" + ], + "after_imports": [ + "use super::{ConstructFlowSpecificData, Feature};", + "use crate::{\n core::{\n errors::{ApiErrorResponse, NotImplementedMessage, RouterResult},\n payments::{\n self, access_token, flows::gateway_context, helpers, transformers, PaymentData,\n },\n },\n routes::SessionState,\n services,\n types::{self, api, domain},\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_surcharge_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }", + "after_code": "fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::set_eligible_connector_for_nti_in_payment_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn set_eligible_connector_for_nti_in_payment_data(\n state: &SessionState,\n business_profile: &domain::Profile,\n key_store: &domain::MerchantKeyStore,\n payment_data: &mut D,\n connector_choice: api::ConnectorChoice,\n) -> RouterResult\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let (mandate_reference_id, card_details_for_network_transaction_id, eligible_connector_data) =\n match connector_choice {\n api::ConnectorChoice::StraightThrough(straight_through) => {\n get_eligible_connector_for_nti(\n state,\n key_store,\n payment_data,\n core_routing::StraightThroughAlgorithmTypeSingle(straight_through),\n business_profile,\n )\n .await?\n }\n api::ConnectorChoice::Decide => {\n get_eligible_connector_for_nti(\n state,\n key_store,\n payment_data,\n core_routing::DecideConnector,\n business_profile,\n )\n .await?\n }\n api::ConnectorChoice::SessionMultiple(_) => {\n Err(errors::ApiErrorResponse::InternalServerError).attach_printable(\n \"Invalid routing rule configured for nti and card details based mit flow\",\n )?\n }\n };\n\n // Set the eligible connector in the attempt\n payment_data\n .set_connector_in_payment_attempt(Some(eligible_connector_data.connector_name.to_string()));\n\n // Set `NetworkMandateId` as the MandateId\n payment_data.set_mandate_id(payments_api::MandateIds {\n mandate_id: None,\n mandate_reference_id: Some(mandate_reference_id),\n });\n\n // Set the card details received in the recurring details within the payment method data.\n payment_data.set_payment_method_data(Some(\n hyperswitch_domain_models::payment_method_data::PaymentMethodData::CardDetailsForNetworkTransactionId(card_details_for_network_transaction_id),\n ));\n\n Ok(eligible_connector_data)\n}", + "after_code": "pub async fn set_eligible_connector_for_nti_in_payment_data(\n state: &SessionState,\n business_profile: &domain::Profile,\n key_store: &domain::MerchantKeyStore,\n payment_data: &mut D,\n connector_choice: api::ConnectorChoice,\n) -> RouterResult\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let (mandate_reference_id, card_details_for_network_transaction_id, eligible_connector_data) =\n match connector_choice {\n api::ConnectorChoice::StraightThrough(straight_through) => {\n get_eligible_connector_for_nti(\n state,\n key_store,\n payment_data,\n core_routing::StraightThroughAlgorithmTypeSingle(straight_through),\n business_profile,\n )\n .await?\n }\n api::ConnectorChoice::Decide => {\n get_eligible_connector_for_nti(\n state,\n key_store,\n payment_data,\n core_routing::DecideConnector,\n business_profile,\n )\n .await?\n }\n api::ConnectorChoice::SessionMultiple(_) => {\n Err(errors::ApiErrorResponse::InternalServerError).attach_printable(\n \"Invalid routing rule configured for nti and card details based mit flow\",\n )?\n }\n };\n\n // Set the eligible connector in the attempt\n payment_data\n .set_connector_in_payment_attempt(Some(eligible_connector_data.connector_name.to_string()));\n\n // Set `NetworkMandateId` as the MandateId\n payment_data.set_mandate_id(payments_api::MandateIds {\n mandate_id: None,\n mandate_reference_id: Some(mandate_reference_id),\n });\n\n // Set the card details received in the recurring details within the payment method data.\n payment_data.set_payment_method_data(Some(\n hyperswitch_domain_models::payment_method_data::PaymentMethodData::CardDetailsForNetworkTransactionId(card_details_for_network_transaction_id),\n ));\n\n Ok(eligible_connector_data)\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::trait::OperationSessionSetters", + "file": "crates/router/src/core/payments.rs", + "kind": "trait_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub trait OperationSessionSetters {\n // Setter functions for PaymentData\n fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent);\n #[cfg(feature = \"v2\")]\n fn set_client_secret(&mut self, client_secret: Option>);\n fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt);\n fn set_payment_method_data(&mut self, payment_method_data: Option);\n fn set_payment_method_token(&mut self, payment_method_token: Option);\n fn set_email_if_not_present(&mut self, email: pii::Email);\n fn set_payment_method_id_in_attempt(&mut self, payment_method_id: Option);\n fn set_pm_token(&mut self, token: String);\n fn set_connector_customer_id(&mut self, customer_id: Option);\n fn push_sessions_token(&mut self, token: api::SessionToken);\n fn set_surcharge_details(&mut self, surcharge_details: Option);\n fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n );\n fn set_card_network(&mut self, card_network: enums::CardNetwork);\n fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n );\n #[cfg(feature = \"v1\")]\n fn set_capture_method_in_attempt(&mut self, capture_method: enums::CaptureMethod);\n fn set_frm_message(&mut self, frm_message: FraudCheck);\n fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus);\n fn set_authentication_type_in_attempt(\n &mut self,\n authentication_type: Option,\n );\n fn set_recurring_mandate_payment_data(\n &mut self,\n recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n );\n fn set_mandate_id(&mut self, mandate_id: api_models::payments::MandateIds);\n fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n );\n\n #[cfg(feature = \"v1\")]\n fn set_straight_through_algorithm_in_payment_attempt(\n &mut self,\n straight_through_algorithm: serde_json::Value,\n );\n\n #[cfg(feature = \"v2\")]\n fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n );\n\n fn set_connector_in_payment_attempt(&mut self, connector: Option);\n\n #[cfg(feature = \"v1\")]\n fn set_vault_operation(&mut self, vault_operation: domain_payments::VaultOperation);\n\n #[cfg(feature = \"v2\")]\n fn set_connector_request_reference_id(&mut self, reference_id: Option);\n\n fn set_connector_response_reference_id(&mut self, reference_id: Option);\n\n #[cfg(feature = \"v2\")]\n fn set_vault_session_details(\n &mut self,\n external_vault_session_details: Option,\n );\n fn set_routing_approach_in_attempt(&mut self, routing_approach: Option);\n\n fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n );\n #[cfg(feature = \"v2\")]\n fn set_cancellation_reason(&mut self, cancellation_reason: Option);\n}", + "after_code": "pub trait OperationSessionSetters {\n // Setter functions for PaymentData\n fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent);\n #[cfg(feature = \"v2\")]\n fn set_client_secret(&mut self, client_secret: Option>);\n fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt);\n fn set_payment_method_data(&mut self, payment_method_data: Option);\n fn set_payment_method_token(&mut self, payment_method_token: Option);\n fn set_email_if_not_present(&mut self, email: pii::Email);\n fn set_payment_method_id_in_attempt(&mut self, payment_method_id: Option);\n fn set_pm_token(&mut self, token: String);\n fn set_connector_customer_id(&mut self, customer_id: Option);\n fn push_sessions_token(&mut self, token: api::SessionToken);\n fn set_surcharge_details(&mut self, surcharge_details: Option);\n fn set_merchant_connector_id_in_attempt(\n &mut self,\n merchant_connector_id: Option,\n );\n fn set_card_network(&mut self, card_network: enums::CardNetwork);\n fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n );\n #[cfg(feature = \"v1\")]\n fn set_capture_method_in_attempt(&mut self, capture_method: enums::CaptureMethod);\n fn set_frm_message(&mut self, frm_message: FraudCheck);\n fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus);\n fn set_authentication_type_in_attempt(\n &mut self,\n authentication_type: Option,\n );\n fn set_recurring_mandate_payment_data(\n &mut self,\n recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n );\n fn set_mandate_id(&mut self, mandate_id: api_models::payments::MandateIds);\n fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n );\n\n #[cfg(feature = \"v1\")]\n fn set_straight_through_algorithm_in_payment_attempt(\n &mut self,\n straight_through_algorithm: serde_json::Value,\n );\n\n #[cfg(feature = \"v2\")]\n fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n straight_through_algorithm: storage::PaymentRoutingInfo,\n );\n\n fn set_connector_in_payment_attempt(&mut self, connector: Option);\n\n #[cfg(feature = \"v1\")]\n fn set_vault_operation(&mut self, vault_operation: domain_payments::VaultOperation);\n\n #[cfg(feature = \"v2\")]\n fn set_connector_request_reference_id(&mut self, reference_id: Option);\n\n fn set_connector_response_reference_id(&mut self, reference_id: Option);\n\n #[cfg(feature = \"v2\")]\n fn set_vault_session_details(\n &mut self,\n external_vault_session_details: Option,\n );\n fn set_routing_approach_in_attempt(&mut self, routing_approach: Option);\n\n fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n );\n #[cfg(feature = \"v2\")]\n fn set_cancellation_reason(&mut self, cancellation_reason: Option);\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ], + "after_imports": [ + "use std::future;", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_client_secret", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_client_secret(&self) -> &Option> {\n todo!()\n }", + "after_code": "fn get_client_secret(&self) -> &Option> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_mandate_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_mandate_id(&self) -> Option<&payments_api::MandateIds> {\n todo!()\n }", + "after_code": "fn get_mandate_id(&self) -> Option<&payments_api::MandateIds> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_connector_customer_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_customer_id(&mut self, _customer_id: Option) {\n // TODO: handle this case. Should we add connector_customer_id in paymentConfirmData?\n }", + "after_code": "fn set_connector_customer_id(&mut self, _customer_id: Option) {\n // TODO: handle this case. Should we add connector_customer_id in paymentConfirmData?\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::PaymentMethodSession::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/v2/payment-method-sessions\").app_data(web::Data::new(state));\n route = route.service(\n web::resource(\"\")\n .route(web::post().to(payment_methods::payment_methods_session_create)),\n );\n\n route =\n route.service(\n web::scope(\"/{payment_method_session_id}\")\n .service(\n web::resource(\"\")\n .route(web::get().to(payment_methods::payment_methods_session_retrieve))\n .route(web::put().to(payment_methods::payment_methods_session_update))\n .route(web::delete().to(\n payment_methods::payment_method_session_delete_saved_payment_method,\n )),\n )\n .service(web::resource(\"/list-payment-methods\").route(\n web::get().to(payment_methods::payment_method_session_list_payment_methods),\n ))\n .service(\n web::resource(\"/confirm\")\n .route(web::post().to(payment_methods::payment_method_session_confirm)),\n )\n .service(web::resource(\"/update-saved-payment-method\").route(\n web::put().to(\n payment_methods::payment_method_session_update_saved_payment_method,\n ),\n )),\n );\n\n route\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/v2/payment-method-sessions\").app_data(web::Data::new(state));\n route = route.service(\n web::resource(\"\")\n .route(web::post().to(payment_methods::payment_methods_session_create)),\n );\n\n route =\n route.service(\n web::scope(\"/{payment_method_session_id}\")\n .service(\n web::resource(\"\")\n .route(web::get().to(payment_methods::payment_methods_session_retrieve))\n .route(web::put().to(payment_methods::payment_methods_session_update))\n .route(web::delete().to(\n payment_methods::payment_method_session_delete_saved_payment_method,\n )),\n )\n .service(web::resource(\"/list-payment-methods\").route(\n web::get().to(payment_methods::payment_method_session_list_payment_methods),\n ))\n .service(\n web::resource(\"/confirm\")\n .route(web::post().to(payment_methods::payment_method_session_confirm)),\n )\n .service(web::resource(\"/update-saved-payment-method\").route(\n web::put().to(\n payment_methods::payment_method_session_update_saved_payment_method,\n ),\n )),\n );\n\n route\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::payment_methods;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use super::payment_methods;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::tokenize_in_router_when_confirm_false_or_external_authentication", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn tokenize_in_router_when_confirm_false_or_external_authentication(\n state: &SessionState,\n operation: &BoxedOperation<'_, F, Req, D>,\n payment_data: &mut D,\n validate_result: &operations::ValidateResult,\n merchant_key_store: &domain::MerchantKeyStore,\n customer: &Option,\n business_profile: &domain::Profile,\n) -> RouterResult\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n // On confirm is false and only router related\n let is_external_authentication_requested = payment_data\n .get_payment_intent()\n .request_external_three_ds_authentication;\n let payment_data =\n if !is_operation_confirm(operation) || is_external_authentication_requested == Some(true) {\n let (_operation, payment_method_data, pm_id) = operation\n .to_domain()?\n .make_pm_data(\n state,\n payment_data,\n validate_result.storage_scheme,\n merchant_key_store,\n customer,\n business_profile,\n false,\n )\n .await?;\n payment_data.set_payment_method_data(payment_method_data);\n if let Some(payment_method_id) = pm_id {\n payment_data.set_payment_method_id_in_attempt(Some(payment_method_id));\n }\n payment_data\n } else {\n payment_data\n };\n Ok(payment_data.to_owned())\n}", + "after_code": "pub async fn tokenize_in_router_when_confirm_false_or_external_authentication(\n state: &SessionState,\n operation: &BoxedOperation<'_, F, Req, D>,\n payment_data: &mut D,\n validate_result: &operations::ValidateResult,\n merchant_key_store: &domain::MerchantKeyStore,\n customer: &Option,\n business_profile: &domain::Profile,\n) -> RouterResult\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n // On confirm is false and only router related\n let is_external_authentication_requested = payment_data\n .get_payment_intent()\n .request_external_three_ds_authentication;\n let payment_data =\n if !is_operation_confirm(operation) || is_external_authentication_requested == Some(true) {\n let (_operation, payment_method_data, pm_id) = operation\n .to_domain()?\n .make_pm_data(\n state,\n payment_data,\n validate_result.storage_scheme,\n merchant_key_store,\n customer,\n business_profile,\n false,\n )\n .await?;\n payment_data.set_payment_method_data(payment_method_data);\n if let Some(payment_method_id) = pm_id {\n payment_data.set_payment_method_id_in_attempt(Some(payment_method_id));\n }\n payment_data\n } else {\n payment_data\n };\n Ok(payment_data.to_owned())\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::DummyConnector::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n let mut routes_with_restricted_access = web::scope(\"\");\n #[cfg(not(feature = \"external_access_dc\"))]\n {\n routes_with_restricted_access =\n routes_with_restricted_access.guard(actix_web::guard::Host(\"localhost\"));\n }\n routes_with_restricted_access = routes_with_restricted_access\n .service(web::resource(\"/payment\").route(web::post().to(dummy_connector_payment)));\n web::scope(\"/dummy-connector\")\n .app_data(web::Data::new(state))\n .service(routes_with_restricted_access)\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n let mut routes_with_restricted_access = web::scope(\"\");\n #[cfg(not(feature = \"external_access_dc\"))]\n {\n routes_with_restricted_access =\n routes_with_restricted_access.guard(actix_web::guard::Host(\"localhost\"));\n }\n routes_with_restricted_access = routes_with_restricted_access\n .service(web::resource(\"/payment\").route(web::post().to(dummy_connector_payment)));\n web::scope(\"/dummy-connector\")\n .app_data(web::Data::new(state))\n .service(routes_with_restricted_access)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_payment_method_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }", + "after_code": "fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::ActionTypesBuilder", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl ActionTypesBuilder {\n pub fn new() -> Self {\n Self {\n action_types: Vec::new(),\n }\n }\n\n pub fn with_mandate_flow(\n mut self,\n is_mandate_flow: bool,\n connector_mandate_details: Option<\n hyperswitch_domain_models::mandates::PaymentsMandateReference,\n >,\n ) -> Self {\n if is_mandate_flow {\n self.action_types.extend(\n connector_mandate_details\n .map(|details| ActionType::ConnectorMandate(details.to_owned())),\n );\n }\n self\n }\n\n pub async fn with_network_tokenization(\n mut self,\n state: &SessionState,\n is_network_token_with_ntid_flow: IsNtWithNtiFlow,\n is_nt_with_ntid_supported_connector: bool,\n payment_method_info: &domain::PaymentMethod,\n ) -> Self {\n match is_network_token_with_ntid_flow {\n IsNtWithNtiFlow::NtWithNtiSupported(network_transaction_id)\n if is_nt_with_ntid_supported_connector =>\n {\n self.action_types.extend(\n network_tokenization::do_status_check_for_network_token(\n state,\n payment_method_info,\n )\n .await\n .inspect_err(|e| {\n logger::error!(\"Status check for network token failed: {:?}\", e)\n })\n .ok()\n .map(|(token_exp_month, token_exp_year)| {\n ActionType::NetworkTokenWithNetworkTransactionId(NTWithNTIRef {\n token_exp_month,\n token_exp_year,\n network_transaction_id,\n })\n }),\n );\n }\n _ => (),\n }\n self\n }\n\n pub fn with_card_network_transaction_id(\n mut self,\n is_card_with_ntid_flow: bool,\n payment_method_info: &domain::PaymentMethod,\n ) -> Self {\n if is_card_with_ntid_flow {\n self.action_types.extend(\n payment_method_info\n .network_transaction_id\n .as_ref()\n .map(|ntid| ActionType::CardWithNetworkTransactionId(ntid.clone())),\n );\n }\n self\n }\n\n pub fn build(self) -> Vec {\n self.action_types\n }\n}", + "after_code": "impl ActionTypesBuilder {\n pub fn new() -> Self {\n Self {\n action_types: Vec::new(),\n }\n }\n\n pub fn with_mandate_flow(\n mut self,\n is_mandate_flow: bool,\n connector_mandate_details: Option<\n hyperswitch_domain_models::mandates::PaymentsMandateReference,\n >,\n ) -> Self {\n if is_mandate_flow {\n self.action_types.extend(\n connector_mandate_details\n .map(|details| ActionType::ConnectorMandate(details.to_owned())),\n );\n }\n self\n }\n\n pub async fn with_network_tokenization(\n mut self,\n state: &SessionState,\n is_network_token_with_ntid_flow: IsNtWithNtiFlow,\n is_nt_with_ntid_supported_connector: bool,\n payment_method_info: &domain::PaymentMethod,\n ) -> Self {\n match is_network_token_with_ntid_flow {\n IsNtWithNtiFlow::NtWithNtiSupported(network_transaction_id)\n if is_nt_with_ntid_supported_connector =>\n {\n self.action_types.extend(\n network_tokenization::do_status_check_for_network_token(\n state,\n payment_method_info,\n )\n .await\n .inspect_err(|e| {\n logger::error!(\"Status check for network token failed: {:?}\", e)\n })\n .ok()\n .map(|(token_exp_month, token_exp_year)| {\n ActionType::NetworkTokenWithNetworkTransactionId(NTWithNTIRef {\n token_exp_month,\n token_exp_year,\n network_transaction_id,\n })\n }),\n );\n }\n _ => (),\n }\n self\n }\n\n pub fn with_card_network_transaction_id(\n mut self,\n is_card_with_ntid_flow: bool,\n payment_method_info: &domain::PaymentMethod,\n ) -> Self {\n if is_card_with_ntid_flow {\n self.action_types.extend(\n payment_method_info\n .network_transaction_id\n .as_ref()\n .map(|ntid| ActionType::CardWithNetworkTransactionId(ntid.clone())),\n );\n }\n self\n }\n\n pub fn build(self) -> Vec {\n self.action_types\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/approve_flow.rs::PaymentData::function::construct_router_data", + "file": "crates/router/src/core/payments/flows/approve_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn construct_router_data<'a>(\n &self,\n state: &SessionState,\n connector_id: &str,\n merchant_context: &domain::MerchantContext,\n customer: &Option,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n merchant_recipient_data: Option,\n header_payload: Option,\n _payment_method: Option,\n _payment_method_type: Option,\n ) -> RouterResult {\n Box::pin(transformers::construct_payment_router_data::<\n api::Approve,\n types::PaymentsApproveData,\n >(\n state,\n self.clone(),\n connector_id,\n merchant_context,\n customer,\n merchant_connector_account,\n merchant_recipient_data,\n header_payload,\n None,\n None,\n ))\n .await\n }", + "after_code": "async fn construct_router_data<'a>(\n &self,\n state: &SessionState,\n connector_id: &str,\n merchant_context: &domain::MerchantContext,\n customer: &Option,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n merchant_recipient_data: Option,\n header_payload: Option,\n _payment_method: Option,\n _payment_method_type: Option,\n ) -> RouterResult {\n Box::pin(transformers::construct_payment_router_data::<\n api::Approve,\n types::PaymentsApproveData,\n >(\n state,\n self.clone(),\n connector_id,\n merchant_context,\n customer,\n merchant_connector_account,\n merchant_recipient_data,\n header_payload,\n None,\n None,\n ))\n .await\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use crate::{\n core::{\n errors::{ApiErrorResponse, NotImplementedMessage, RouterResult},\n payments::{self, access_token, helpers, transformers, PaymentData},\n },\n routes::SessionState,\n services,\n types::{self, api, domain},\n};" + ], + "after_imports": [ + "use crate::{\n core::{\n errors::{ApiErrorResponse, NotImplementedMessage, RouterResult},\n payments::{\n self, access_token, flows::gateway_context, helpers, transformers, PaymentData,\n },\n },\n routes::SessionState,\n services,\n types::{self, api, domain},\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_pm_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_pm_token(&mut self, _token: String) {\n todo!()\n }", + "after_code": "fn set_pm_token(&mut self, _token: String) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::get_tenant", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_tenant(&self) -> Tenant {\n self.tenant.clone()\n }", + "after_code": "fn get_tenant(&self) -> Tenant {\n self.tenant.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use self::settings::Tenant;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use self::settings::Tenant;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::complete_preprocessing_steps_if_required", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn complete_preprocessing_steps_if_required(\n state: &SessionState,\n connector: &api::ConnectorData,\n payment_data: &D,\n mut router_data: RouterData,\n operation: &BoxedOperation<'_, F, Q, D>,\n should_continue_payment: bool,\n) -> RouterResult<(RouterData, bool)>\nwhere\n F: Send + Clone + Sync,\n D: OperationSessionGetters + Send + Sync + Clone,\n Req: Send + Sync,\n RouterData: Feature + Send,\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n //TODO: For ACH transfers, if preprocessing_step is not required for connectors encountered in future, add the check\n let router_data_and_should_continue_payment = match payment_data.get_payment_method_data() {\n Some(domain::PaymentMethodData::BankTransfer(_)) => (router_data, should_continue_payment),\n Some(domain::PaymentMethodData::Wallet(_)) => {\n if is_preprocessing_required_for_wallets(connector.connector_name.to_string()) {\n (\n router_data.preprocessing_steps(state, connector).await?,\n false,\n )\n } else if connector.connector_name == router_types::Connector::Paysafe {\n match payment_data.get_payment_method_data() {\n Some(domain::PaymentMethodData::Wallet(domain::WalletData::ApplePay(_))) => {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n let is_error_in_response = router_data.response.is_err();\n (router_data, !is_error_in_response)\n }\n _ => (router_data, should_continue_payment),\n }\n } else {\n (router_data, should_continue_payment)\n }\n }\n Some(domain::PaymentMethodData::Card(_)) => {\n if connector.connector_name == router_types::Connector::Payme\n && !matches!(format!(\"{operation:?}\").as_str(), \"CompleteAuthorize\")\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n\n let is_error_in_response = router_data.response.is_err();\n // If is_error_in_response is true, should_continue_payment should be false, we should throw the error\n (router_data, !is_error_in_response)\n } else if connector.connector_name == router_types::Connector::Nmi\n && !matches!(format!(\"{operation:?}\").as_str(), \"CompleteAuthorize\")\n && router_data.auth_type == storage_enums::AuthenticationType::ThreeDs\n && !matches!(\n payment_data\n .get_payment_attempt()\n .external_three_ds_authentication_attempted,\n Some(true)\n )\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n\n (router_data, false)\n } else if connector.connector_name == router_types::Connector::Paysafe\n && router_data.auth_type == storage_enums::AuthenticationType::NoThreeDs\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n\n let is_error_in_response = router_data.response.is_err();\n // If is_error_in_response is true, should_continue_payment should be false, we should throw the error\n (router_data, !is_error_in_response)\n } else if (connector.connector_name == router_types::Connector::Cybersource\n || connector.connector_name == router_types::Connector::Barclaycard)\n && is_operation_complete_authorize(&operation)\n && router_data.auth_type == storage_enums::AuthenticationType::ThreeDs\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n\n // Should continue the flow only if no redirection_data is returned else a response with redirection form shall be returned\n let should_continue = matches!(\n router_data.response,\n Ok(router_types::PaymentsResponseData::TransactionResponse {\n ref redirection_data,\n ..\n }) if redirection_data.is_none()\n ) && router_data.status\n != common_enums::AttemptStatus::AuthenticationFailed;\n (router_data, should_continue)\n } else if router_data.auth_type == common_enums::AuthenticationType::ThreeDs\n && ((connector.connector_name == router_types::Connector::Nexixpay\n && is_operation_complete_authorize(&operation))\n || (((connector.connector_name == router_types::Connector::Nuvei && {\n #[cfg(feature = \"v1\")]\n {\n payment_data\n .get_payment_intent()\n .request_external_three_ds_authentication\n != Some(true)\n }\n #[cfg(feature = \"v2\")]\n {\n payment_data\n .get_payment_intent()\n .request_external_three_ds_authentication\n != Some(true).into()\n }\n }) || connector.connector_name == router_types::Connector::Shift4)\n && !is_operation_complete_authorize(&operation)))\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n (router_data, should_continue_payment)\n } else if connector.connector_name == router_types::Connector::Xendit\n && is_operation_confirm(&operation)\n {\n match payment_data.get_payment_intent().split_payments {\n Some(common_types::payments::SplitPaymentsRequest::XenditSplitPayment(\n common_types::payments::XenditSplitRequest::MultipleSplits(_),\n )) => {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n let is_error_in_response = router_data.response.is_err();\n (router_data, !is_error_in_response)\n }\n _ => (router_data, should_continue_payment),\n }\n } else if connector.connector_name == router_types::Connector::Redsys\n && router_data.auth_type == common_enums::AuthenticationType::ThreeDs\n && is_operation_confirm(&operation)\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n let should_continue = match router_data.response {\n Ok(router_types::PaymentsResponseData::TransactionResponse {\n ref connector_metadata,\n ..\n }) => {\n let three_ds_invoke_data: Option<\n api_models::payments::PaymentsConnectorThreeDsInvokeData,\n > = connector_metadata.clone().and_then(|metadata| {\n metadata\n .parse_value(\"PaymentsConnectorThreeDsInvokeData\")\n .ok() // \"ThreeDsInvokeData was not found; proceeding with the payment flow without triggering the ThreeDS invoke action\"\n });\n three_ds_invoke_data.is_none()\n }\n _ => false,\n };\n (router_data, should_continue)\n } else {\n (router_data, should_continue_payment)\n }\n }\n Some(domain::PaymentMethodData::GiftCard(gift_card_data)) => {\n if connector.connector_name == router_types::Connector::Adyen\n && matches!(gift_card_data.deref(), domain::GiftCardData::Givex(..))\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n\n let is_error_in_response = router_data.response.is_err();\n // If is_error_in_response is true, should_continue_payment should be false, we should throw the error\n (router_data, !is_error_in_response)\n } else {\n (router_data, should_continue_payment)\n }\n }\n Some(domain::PaymentMethodData::BankDebit(_)) => {\n if connector.connector_name == router_types::Connector::Gocardless\n || connector.connector_name == router_types::Connector::Nordea\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n let is_error_in_response = router_data.response.is_err();\n // If is_error_in_response is true, should_continue_payment should be false, we should throw the error\n (router_data, !is_error_in_response)\n } else {\n (router_data, should_continue_payment)\n }\n }\n _ => {\n // 3DS validation for paypal cards after verification (authorize call)\n if connector.connector_name == router_types::Connector::Paypal\n && payment_data.get_payment_attempt().get_payment_method()\n == Some(storage_enums::PaymentMethod::Card)\n && matches!(format!(\"{operation:?}\").as_str(), \"CompleteAuthorize\")\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n let is_error_in_response = router_data.response.is_err();\n // If is_error_in_response is true, should_continue_payment should be false, we should throw the error\n (router_data, !is_error_in_response)\n } else {\n (router_data, should_continue_payment)\n }\n }\n };\n\n Ok(router_data_and_should_continue_payment)\n}", + "after_code": "async fn complete_preprocessing_steps_if_required(\n state: &SessionState,\n connector: &api::ConnectorData,\n payment_data: &D,\n mut router_data: RouterData,\n operation: &BoxedOperation<'_, F, Q, D>,\n should_continue_payment: bool,\n) -> RouterResult<(RouterData, bool)>\nwhere\n F: Send + Clone + Sync,\n D: OperationSessionGetters + Send + Sync + Clone,\n Req: Send + Sync,\n RouterData: Feature + Send,\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n //TODO: For ACH transfers, if preprocessing_step is not required for connectors encountered in future, add the check\n let router_data_and_should_continue_payment = match payment_data.get_payment_method_data() {\n Some(domain::PaymentMethodData::BankTransfer(_)) => (router_data, should_continue_payment),\n Some(domain::PaymentMethodData::Wallet(_)) => {\n if is_preprocessing_required_for_wallets(connector.connector_name.to_string()) {\n (\n router_data.preprocessing_steps(state, connector).await?,\n false,\n )\n } else if connector.connector_name == router_types::Connector::Paysafe {\n match payment_data.get_payment_method_data() {\n Some(domain::PaymentMethodData::Wallet(domain::WalletData::ApplePay(_))) => {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n let is_error_in_response = router_data.response.is_err();\n (router_data, !is_error_in_response)\n }\n _ => (router_data, should_continue_payment),\n }\n } else {\n (router_data, should_continue_payment)\n }\n }\n Some(domain::PaymentMethodData::Card(_)) => {\n if connector.connector_name == router_types::Connector::Payme\n && !matches!(format!(\"{operation:?}\").as_str(), \"CompleteAuthorize\")\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n\n let is_error_in_response = router_data.response.is_err();\n // If is_error_in_response is true, should_continue_payment should be false, we should throw the error\n (router_data, !is_error_in_response)\n } else if connector.connector_name == router_types::Connector::Nmi\n && !matches!(format!(\"{operation:?}\").as_str(), \"CompleteAuthorize\")\n && router_data.auth_type == storage_enums::AuthenticationType::ThreeDs\n && !matches!(\n payment_data\n .get_payment_attempt()\n .external_three_ds_authentication_attempted,\n Some(true)\n )\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n\n (router_data, false)\n } else if connector.connector_name == router_types::Connector::Paysafe\n && router_data.auth_type == storage_enums::AuthenticationType::NoThreeDs\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n\n let is_error_in_response = router_data.response.is_err();\n // If is_error_in_response is true, should_continue_payment should be false, we should throw the error\n (router_data, !is_error_in_response)\n } else if (connector.connector_name == router_types::Connector::Cybersource\n || connector.connector_name == router_types::Connector::Barclaycard)\n && is_operation_complete_authorize(&operation)\n && router_data.auth_type == storage_enums::AuthenticationType::ThreeDs\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n\n // Should continue the flow only if no redirection_data is returned else a response with redirection form shall be returned\n let should_continue = matches!(\n router_data.response,\n Ok(router_types::PaymentsResponseData::TransactionResponse {\n ref redirection_data,\n ..\n }) if redirection_data.is_none()\n ) && router_data.status\n != common_enums::AttemptStatus::AuthenticationFailed;\n (router_data, should_continue)\n } else if router_data.auth_type == common_enums::AuthenticationType::ThreeDs\n && ((connector.connector_name == router_types::Connector::Nexixpay\n && is_operation_complete_authorize(&operation))\n || (((connector.connector_name == router_types::Connector::Nuvei && {\n #[cfg(feature = \"v1\")]\n {\n payment_data\n .get_payment_intent()\n .request_external_three_ds_authentication\n != Some(true)\n }\n #[cfg(feature = \"v2\")]\n {\n payment_data\n .get_payment_intent()\n .request_external_three_ds_authentication\n != Some(true).into()\n }\n }) || connector.connector_name == router_types::Connector::Shift4)\n && !is_operation_complete_authorize(&operation)))\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n (router_data, should_continue_payment)\n } else if connector.connector_name == router_types::Connector::Xendit\n && is_operation_confirm(&operation)\n {\n match payment_data.get_payment_intent().split_payments {\n Some(common_types::payments::SplitPaymentsRequest::XenditSplitPayment(\n common_types::payments::XenditSplitRequest::MultipleSplits(_),\n )) => {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n let is_error_in_response = router_data.response.is_err();\n (router_data, !is_error_in_response)\n }\n _ => (router_data, should_continue_payment),\n }\n } else if connector.connector_name == router_types::Connector::Redsys\n && router_data.auth_type == common_enums::AuthenticationType::ThreeDs\n && is_operation_confirm(&operation)\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n let should_continue = match router_data.response {\n Ok(router_types::PaymentsResponseData::TransactionResponse {\n ref connector_metadata,\n ..\n }) => {\n let three_ds_invoke_data: Option<\n api_models::payments::PaymentsConnectorThreeDsInvokeData,\n > = connector_metadata.clone().and_then(|metadata| {\n metadata\n .parse_value(\"PaymentsConnectorThreeDsInvokeData\")\n .ok() // \"ThreeDsInvokeData was not found; proceeding with the payment flow without triggering the ThreeDS invoke action\"\n });\n three_ds_invoke_data.is_none()\n }\n _ => false,\n };\n (router_data, should_continue)\n } else {\n (router_data, should_continue_payment)\n }\n }\n Some(domain::PaymentMethodData::GiftCard(gift_card_data)) => {\n if connector.connector_name == router_types::Connector::Adyen\n && matches!(gift_card_data.deref(), domain::GiftCardData::Givex(..))\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n\n let is_error_in_response = router_data.response.is_err();\n // If is_error_in_response is true, should_continue_payment should be false, we should throw the error\n (router_data, !is_error_in_response)\n } else {\n (router_data, should_continue_payment)\n }\n }\n Some(domain::PaymentMethodData::BankDebit(_)) => {\n if connector.connector_name == router_types::Connector::Gocardless\n || connector.connector_name == router_types::Connector::Nordea\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n let is_error_in_response = router_data.response.is_err();\n // If is_error_in_response is true, should_continue_payment should be false, we should throw the error\n (router_data, !is_error_in_response)\n } else {\n (router_data, should_continue_payment)\n }\n }\n _ => {\n // 3DS validation for paypal cards after verification (authorize call)\n if connector.connector_name == router_types::Connector::Paypal\n && payment_data.get_payment_attempt().get_payment_method()\n == Some(storage_enums::PaymentMethod::Card)\n && matches!(format!(\"{operation:?}\").as_str(), \"CompleteAuthorize\")\n {\n router_data = router_data.preprocessing_steps(state, connector).await?;\n let is_error_in_response = router_data.response.is_err();\n // If is_error_in_response is true, should_continue_payment should be false, we should throw the error\n (router_data, !is_error_in_response)\n } else {\n (router_data, should_continue_payment)\n }\n }\n };\n\n Ok(router_data_and_should_continue_payment)\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use std::future;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Mandates::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/mandates\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n route =\n route.service(web::resource(\"/list\").route(web::get().to(retrieve_mandates_list)));\n route = route.service(web::resource(\"/{id}\").route(web::get().to(get_mandate)));\n }\n #[cfg(feature = \"oltp\")]\n {\n route =\n route.service(web::resource(\"/revoke/{id}\").route(web::post().to(revoke_mandate)));\n }\n route\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/mandates\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n route =\n route.service(web::resource(\"/list\").route(web::get().to(retrieve_mandates_list)));\n route = route.service(web::resource(\"/{id}\").route(web::get().to(get_mandate)));\n }\n #[cfg(feature = \"oltp\")]\n {\n route =\n route.service(web::resource(\"/revoke/{id}\").route(web::post().to(revoke_mandate)));\n }\n route\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::ListDiputeSupportedConnectors", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ListDiputeSupportedConnectors {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub connector_list: HashSet,\n}", + "after_code": "pub struct ListDiputeSupportedConnectors {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub connector_list: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use super::deserialize_hashset;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use api_models::enums;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::list_payments_attempts", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn list_payments_attempts(&self) -> &Vec {\n todo!()\n }", + "after_code": "fn list_payments_attempts(&self) -> &Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_ephemeral_key", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_ephemeral_key(&self) -> Option {\n self.ephemeral_key.clone()\n }", + "after_code": "fn get_ephemeral_key(&self) -> Option {\n self.ephemeral_key.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_creds_identifier", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_creds_identifier(&self) -> Option<&str> {\n None\n }", + "after_code": "fn get_creds_identifier(&self) -> Option<&str> {\n None\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::impl::TenantConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl<'de> Deserialize<'de> for TenantConfig {\n fn deserialize>(deserializer: D) -> Result {\n #[derive(Deserialize)]\n struct Inner {\n base_url: String,\n schema: String,\n accounts_schema: String,\n redis_key_prefix: String,\n clickhouse_database: String,\n user: TenantUserConfig,\n }\n\n let hashmap = >::deserialize(deserializer)?;\n\n Ok(Self(\n hashmap\n .into_iter()\n .map(|(key, value)| {\n (\n key.clone(),\n Tenant {\n tenant_id: key,\n base_url: value.base_url,\n schema: value.schema,\n accounts_schema: value.accounts_schema,\n redis_key_prefix: value.redis_key_prefix,\n clickhouse_database: value.clickhouse_database,\n user: value.user,\n },\n )\n })\n .collect(),\n ))\n }\n}", + "after_code": "impl<'de> Deserialize<'de> for TenantConfig {\n fn deserialize>(deserializer: D) -> Result {\n #[derive(Deserialize)]\n struct Inner {\n base_url: String,\n schema: String,\n accounts_schema: String,\n redis_key_prefix: String,\n clickhouse_database: String,\n user: TenantUserConfig,\n }\n\n let hashmap = >::deserialize(deserializer)?;\n\n Ok(Self(\n hashmap\n .into_iter()\n .map(|(key, value)| {\n (\n key.clone(),\n Tenant {\n tenant_id: key,\n base_url: value.base_url,\n schema: value.schema,\n accounts_schema: value.accounts_schema,\n redis_key_prefix: value.redis_key_prefix,\n clickhouse_database: value.clickhouse_database,\n user: value.user,\n },\n )\n })\n .collect(),\n ))\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use serde::de::Error;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::Error;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::EphemeralKey::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(config: AppState) -> Scope {\n web::scope(\"/v2/client-secret\")\n .app_data(web::Data::new(config))\n .service(web::resource(\"\").route(web::post().to(client_secret_create)))\n .service(web::resource(\"/{id}\").route(web::delete().to(client_secret_delete)))\n }", + "after_code": "pub fn server(config: AppState) -> Scope {\n web::scope(\"/v2/client-secret\")\n .app_data(web::Data::new(config))\n .service(web::resource(\"\").route(web::post().to(client_secret_create)))\n .service(web::resource(\"/{id}\").route(web::delete().to(client_secret_delete)))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::GooglePayWallet", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl WalletFlow for GooglePayWallet\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n fn check_predecrypted_token(\n &self,\n payment_data: &D,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let google_pay_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_google_pay_wallet_data());\n\n let result = if let Some(data) = google_pay_wallet_data {\n match &data.tokenization_data {\n common_payments_types::GpayTokenizationData::Encrypted(_) => None,\n common_payments_types::GpayTokenizationData::Decrypted(\n google_pay_predecrypt_data,\n ) => {\n helpers::validate_card_expiry(\n &google_pay_predecrypt_data.card_exp_month,\n &google_pay_predecrypt_data.card_exp_year,\n )?;\n Some(PaymentMethodToken::GooglePayDecrypt(Box::new(\n google_pay_predecrypt_data.clone(),\n )))\n }\n }\n } else {\n None\n };\n Ok(result)\n }\n fn decide_wallet_flow(\n &self,\n state: &SessionState,\n _payment_data: &D,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n ) -> CustomResult, errors::ApiErrorResponse> {\n Ok(\n get_google_pay_connector_wallet_details(state, merchant_connector_account)\n .map(DecideWalletFlow::GooglePayDecrypt),\n )\n }\n\n async fn decrypt_wallet_token(\n &self,\n wallet_flow: &DecideWalletFlow,\n payment_data: &D,\n ) -> CustomResult {\n let google_pay_payment_processing_details = wallet_flow\n .get_google_pay_payment_processing_details()\n .get_required_value(\"Google Pay payment processing details\")\n .attach_printable(\n \"Google Pay payment processing details not found in Google Pay decryption flow\",\n )?;\n\n let google_pay_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_google_pay_wallet_data())\n .get_required_value(\"Paze wallet token\").attach_printable(\n \"Google Pay wallet data not found in the payment method data during the Google Pay decryption flow\",\n )?;\n\n let decryptor = helpers::GooglePayTokenDecryptor::new(\n google_pay_payment_processing_details\n .google_pay_root_signing_keys\n .clone(),\n google_pay_payment_processing_details\n .google_pay_recipient_id\n .clone(),\n google_pay_payment_processing_details\n .google_pay_private_key\n .clone(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to create google pay token decryptor\")?;\n\n // should_verify_token is set to false to disable verification of token\n let google_pay_data_internal = decryptor\n .decrypt_token(\n google_pay_wallet_data\n .tokenization_data\n .get_encrypted_google_pay_token()\n .change_context(errors::ApiErrorResponse::InternalServerError)?\n .clone(),\n false,\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to decrypt google pay token\")?;\n let google_pay_data =\n common_types::payments::GPayPredecryptData::from(google_pay_data_internal);\n Ok(PaymentMethodToken::GooglePayDecrypt(Box::new(\n google_pay_data,\n )))\n }\n}", + "after_code": "impl WalletFlow for GooglePayWallet\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + Send + Sync + Clone,\n{\n fn check_predecrypted_token(\n &self,\n payment_data: &D,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let google_pay_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_google_pay_wallet_data());\n\n let result = if let Some(data) = google_pay_wallet_data {\n match &data.tokenization_data {\n common_payments_types::GpayTokenizationData::Encrypted(_) => None,\n common_payments_types::GpayTokenizationData::Decrypted(\n google_pay_predecrypt_data,\n ) => {\n helpers::validate_card_expiry(\n &google_pay_predecrypt_data.card_exp_month,\n &google_pay_predecrypt_data.card_exp_year,\n )?;\n Some(PaymentMethodToken::GooglePayDecrypt(Box::new(\n google_pay_predecrypt_data.clone(),\n )))\n }\n }\n } else {\n None\n };\n Ok(result)\n }\n fn decide_wallet_flow(\n &self,\n state: &SessionState,\n _payment_data: &D,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n ) -> CustomResult, errors::ApiErrorResponse> {\n Ok(\n get_google_pay_connector_wallet_details(state, merchant_connector_account)\n .map(DecideWalletFlow::GooglePayDecrypt),\n )\n }\n\n async fn decrypt_wallet_token(\n &self,\n wallet_flow: &DecideWalletFlow,\n payment_data: &D,\n ) -> CustomResult {\n let google_pay_payment_processing_details = wallet_flow\n .get_google_pay_payment_processing_details()\n .get_required_value(\"Google Pay payment processing details\")\n .attach_printable(\n \"Google Pay payment processing details not found in Google Pay decryption flow\",\n )?;\n\n let google_pay_wallet_data = payment_data\n .get_payment_method_data()\n .and_then(|payment_method_data| payment_method_data.get_wallet_data())\n .and_then(|wallet_data| wallet_data.get_google_pay_wallet_data())\n .get_required_value(\"Paze wallet token\").attach_printable(\n \"Google Pay wallet data not found in the payment method data during the Google Pay decryption flow\",\n )?;\n\n let decryptor = helpers::GooglePayTokenDecryptor::new(\n google_pay_payment_processing_details\n .google_pay_root_signing_keys\n .clone(),\n google_pay_payment_processing_details\n .google_pay_recipient_id\n .clone(),\n google_pay_payment_processing_details\n .google_pay_private_key\n .clone(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to create google pay token decryptor\")?;\n\n // should_verify_token is set to false to disable verification of token\n let google_pay_data_internal = decryptor\n .decrypt_token(\n google_pay_wallet_data\n .tokenization_data\n .get_encrypted_google_pay_token()\n .change_context(errors::ApiErrorResponse::InternalServerError)?\n .clone(),\n false,\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed to decrypt google pay token\")?;\n let google_pay_data =\n common_types::payments::GPayPredecryptData::from(google_pay_data_internal);\n Ok(PaymentMethodToken::GooglePayDecrypt(Box::new(\n google_pay_data,\n )))\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::ApplepayMerchantConfigs", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ApplepayMerchantConfigs {\n pub merchant_cert: Secret,\n pub merchant_cert_key: Secret,\n pub common_merchant_identifier: Secret,\n pub applepay_endpoint: String,\n}", + "after_code": "pub struct ApplepayMerchantConfigs {\n pub merchant_cert: Secret,\n pub merchant_cert_key: Secret,\n pub common_merchant_identifier: Secret,\n pub applepay_endpoint: String,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_payment_method_id_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_id_in_attempt(&mut self, payment_method_id: Option) {\n self.payment_attempt.payment_method_id = payment_method_id;\n }", + "after_code": "fn set_payment_method_id_in_attempt(&mut self, payment_method_id: Option) {\n self.payment_attempt.payment_method_id = payment_method_id;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_currency", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_currency(&self) -> storage_enums::Currency {\n todo!()\n }", + "after_code": "fn get_currency(&self) -> storage_enums::Currency {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::UserAuthMethodSettings", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct UserAuthMethodSettings {\n pub encryption_key: Secret,\n}", + "after_code": "pub struct UserAuthMethodSettings {\n pub encryption_key: Secret,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Blocklist::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/blocklist\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\")\n .route(web::get().to(blocklist::list_blocked_payment_methods))\n .route(web::post().to(blocklist::add_entry_to_blocklist))\n .route(web::delete().to(blocklist::remove_entry_from_blocklist)),\n )\n .service(\n web::resource(\"/toggle\").route(web::post().to(blocklist::toggle_blocklist_guard)),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/blocklist\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\")\n .route(web::get().to(blocklist::list_blocked_payment_methods))\n .route(web::post().to(blocklist::add_entry_to_blocklist))\n .route(web::delete().to(blocklist::remove_entry_from_blocklist)),\n )\n .service(\n web::resource(\"/toggle\").route(web::post().to(blocklist::toggle_blocklist_guard)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::payment_methods;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use super::payment_methods;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_payment_method_info", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod> {\n todo!()\n }", + "after_code": "fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_mandate_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_mandate_id(&mut self, mandate_id: api_models::payments::MandateIds) {\n self.mandate_id = Some(mandate_id);\n }", + "after_code": "fn set_mandate_id(&mut self, mandate_id: api_models::payments::MandateIds) {\n self.mandate_id = Some(mandate_id);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::TenantConfig::function::deserialize", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn deserialize>(deserializer: D) -> Result {\n #[derive(Deserialize)]\n struct Inner {\n base_url: String,\n schema: String,\n accounts_schema: String,\n redis_key_prefix: String,\n clickhouse_database: String,\n user: TenantUserConfig,\n }\n\n let hashmap = >::deserialize(deserializer)?;\n\n Ok(Self(\n hashmap\n .into_iter()\n .map(|(key, value)| {\n (\n key.clone(),\n Tenant {\n tenant_id: key,\n base_url: value.base_url,\n schema: value.schema,\n accounts_schema: value.accounts_schema,\n redis_key_prefix: value.redis_key_prefix,\n clickhouse_database: value.clickhouse_database,\n user: value.user,\n },\n )\n })\n .collect(),\n ))\n }", + "after_code": "fn deserialize>(deserializer: D) -> Result {\n #[derive(Deserialize)]\n struct Inner {\n base_url: String,\n schema: String,\n accounts_schema: String,\n redis_key_prefix: String,\n clickhouse_database: String,\n user: TenantUserConfig,\n }\n\n let hashmap = >::deserialize(deserializer)?;\n\n Ok(Self(\n hashmap\n .into_iter()\n .map(|(key, value)| {\n (\n key.clone(),\n Tenant {\n tenant_id: key,\n base_url: value.base_url,\n schema: value.schema,\n accounts_schema: value.accounts_schema,\n redis_key_prefix: value.redis_key_prefix,\n clickhouse_database: value.clickhouse_database,\n user: value.user,\n },\n )\n })\n .collect(),\n ))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "use serde::de::Error;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use serde::Deserialize;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::Error;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::ChatSettings", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ChatSettings {\n pub enabled: bool,\n pub hyperswitch_ai_host: String,\n pub encryption_key: Secret,\n}", + "after_code": "pub struct ChatSettings {\n pub enabled: bool,\n pub hyperswitch_ai_host: String,\n pub encryption_key: Secret,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::Refund", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Refund {\n pub max_attempts: usize,\n pub max_age: i64,\n}", + "after_code": "pub struct Refund {\n pub max_attempts: usize,\n pub max_age: i64,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::PaymentAttemptListData", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl OperationSessionGetters for PaymentAttemptListData {\n #[track_caller]\n fn get_payment_attempt(&self) -> &storage::PaymentAttempt {\n todo!()\n }\n #[cfg(feature = \"v2\")]\n fn list_payments_attempts(&self) -> &Vec {\n &self.payment_attempt_list\n }\n fn get_client_secret(&self) -> &Option> {\n todo!()\n }\n fn get_payment_intent(&self) -> &storage::PaymentIntent {\n todo!()\n }\n\n fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod> {\n todo!()\n }\n\n fn get_payment_method_token(&self) -> Option<&PaymentMethodToken> {\n todo!()\n }\n\n fn get_mandate_id(&self) -> Option<&payments_api::MandateIds> {\n todo!()\n }\n\n // what is this address find out and not required remove this\n fn get_address(&self) -> &PaymentAddress {\n todo!()\n }\n\n fn get_creds_identifier(&self) -> Option<&str> {\n None\n }\n\n fn get_token(&self) -> Option<&str> {\n todo!()\n }\n\n fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData> {\n todo!()\n }\n\n fn get_payment_link_data(&self) -> Option {\n todo!()\n }\n\n fn get_ephemeral_key(&self) -> Option {\n todo!()\n }\n\n fn get_setup_mandate(&self) -> Option<&MandateData> {\n todo!()\n }\n\n fn get_poll_config(&self) -> Option {\n todo!()\n }\n\n fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>\n {\n todo!()\n }\n\n fn get_frm_message(&self) -> Option {\n todo!()\n }\n\n fn get_refunds(&self) -> Vec {\n todo!()\n }\n\n fn get_disputes(&self) -> Vec {\n todo!()\n }\n\n fn get_authorizations(&self) -> Vec {\n todo!()\n }\n\n fn get_attempts(&self) -> Option> {\n todo!()\n }\n\n fn get_recurring_details(&self) -> Option<&RecurringDetails> {\n todo!()\n }\n\n fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> {\n todo!()\n }\n\n fn get_currency(&self) -> storage_enums::Currency {\n todo!()\n }\n\n fn get_amount(&self) -> api::Amount {\n todo!()\n }\n\n fn get_payment_attempt_connector(&self) -> Option<&str> {\n todo!()\n }\n\n fn get_merchant_connector_id_in_attempt(&self) -> Option {\n todo!()\n }\n\n fn get_connector_customer_id(&self) -> Option {\n todo!()\n }\n\n fn get_billing_address(&self) -> Option {\n todo!()\n }\n\n fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData> {\n todo!()\n }\n\n fn get_sessions_token(&self) -> Vec {\n todo!()\n }\n\n fn get_token_data(&self) -> Option<&storage::PaymentTokenData> {\n todo!()\n }\n\n fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails> {\n todo!()\n }\n\n fn get_force_sync(&self) -> Option {\n todo!()\n }\n\n fn get_capture_method(&self) -> Option {\n todo!()\n }\n\n #[cfg(feature = \"v2\")]\n fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt> {\n todo!()\n }\n\n fn get_pre_routing_result(\n &self,\n ) -> Option> {\n None\n }\n fn get_merchant_connector_details(\n &self,\n ) -> Option {\n todo!()\n }\n\n fn get_optional_external_vault_session_details(&self) -> Option {\n todo!()\n }\n}", + "after_code": "impl OperationSessionGetters for PaymentAttemptListData {\n #[track_caller]\n fn get_payment_attempt(&self) -> &storage::PaymentAttempt {\n todo!()\n }\n #[cfg(feature = \"v2\")]\n fn list_payments_attempts(&self) -> &Vec {\n &self.payment_attempt_list\n }\n fn get_client_secret(&self) -> &Option> {\n todo!()\n }\n fn get_payment_intent(&self) -> &storage::PaymentIntent {\n todo!()\n }\n\n fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod> {\n todo!()\n }\n\n fn get_payment_method_token(&self) -> Option<&PaymentMethodToken> {\n todo!()\n }\n\n fn get_mandate_id(&self) -> Option<&payments_api::MandateIds> {\n todo!()\n }\n\n // what is this address find out and not required remove this\n fn get_address(&self) -> &PaymentAddress {\n todo!()\n }\n\n fn get_creds_identifier(&self) -> Option<&str> {\n None\n }\n\n fn get_token(&self) -> Option<&str> {\n todo!()\n }\n\n fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData> {\n todo!()\n }\n\n fn get_payment_link_data(&self) -> Option {\n todo!()\n }\n\n fn get_ephemeral_key(&self) -> Option {\n todo!()\n }\n\n fn get_setup_mandate(&self) -> Option<&MandateData> {\n todo!()\n }\n\n fn get_poll_config(&self) -> Option {\n todo!()\n }\n\n fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>\n {\n todo!()\n }\n\n fn get_frm_message(&self) -> Option {\n todo!()\n }\n\n fn get_refunds(&self) -> Vec {\n todo!()\n }\n\n fn get_disputes(&self) -> Vec {\n todo!()\n }\n\n fn get_authorizations(&self) -> Vec {\n todo!()\n }\n\n fn get_attempts(&self) -> Option> {\n todo!()\n }\n\n fn get_recurring_details(&self) -> Option<&RecurringDetails> {\n todo!()\n }\n\n fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> {\n todo!()\n }\n\n fn get_currency(&self) -> storage_enums::Currency {\n todo!()\n }\n\n fn get_amount(&self) -> api::Amount {\n todo!()\n }\n\n fn get_payment_attempt_connector(&self) -> Option<&str> {\n todo!()\n }\n\n fn get_merchant_connector_id_in_attempt(&self) -> Option {\n todo!()\n }\n\n fn get_connector_customer_id(&self) -> Option {\n todo!()\n }\n\n fn get_billing_address(&self) -> Option {\n todo!()\n }\n\n fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData> {\n todo!()\n }\n\n fn get_sessions_token(&self) -> Vec {\n todo!()\n }\n\n fn get_token_data(&self) -> Option<&storage::PaymentTokenData> {\n todo!()\n }\n\n fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails> {\n todo!()\n }\n\n fn get_force_sync(&self) -> Option {\n todo!()\n }\n\n fn get_capture_method(&self) -> Option {\n todo!()\n }\n\n #[cfg(feature = \"v2\")]\n fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt> {\n todo!()\n }\n\n fn get_pre_routing_result(\n &self,\n ) -> Option> {\n None\n }\n fn get_merchant_connector_details(\n &self,\n ) -> Option {\n todo!()\n }\n\n fn get_optional_external_vault_session_details(&self) -> Option {\n todo!()\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_payment_method_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }", + "after_code": "fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::is_network_transaction_id_flow", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn is_network_transaction_id_flow(\n state: &SessionState,\n is_connector_agnostic_mit_enabled: Option,\n connector: enums::Connector,\n payment_method_info: &domain::PaymentMethod,\n) -> bool {\n let ntid_supported_connectors = &state\n .conf\n .network_transaction_id_supported_connectors\n .connector_list;\n\n is_connector_agnostic_mit_enabled == Some(true)\n && payment_method_info.get_payment_method_type() == Some(storage_enums::PaymentMethod::Card)\n && ntid_supported_connectors.contains(&connector)\n && payment_method_info.network_transaction_id.is_some()\n}", + "after_code": "pub fn is_network_transaction_id_flow(\n state: &SessionState,\n is_connector_agnostic_mit_enabled: Option,\n connector: enums::Connector,\n payment_method_info: &domain::PaymentMethod,\n) -> bool {\n let ntid_supported_connectors = &state\n .conf\n .network_transaction_id_supported_connectors\n .connector_list;\n\n is_connector_agnostic_mit_enabled == Some(true)\n && payment_method_info.get_payment_method_type() == Some(storage_enums::PaymentMethod::Card)\n && ntid_supported_connectors.contains(&connector)\n && payment_method_info.network_transaction_id.is_some()\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_frm_message", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_frm_message(&mut self, frm_message: FraudCheck) {\n self.frm_message = Some(frm_message);\n }", + "after_code": "fn set_frm_message(&mut self, frm_message: FraudCheck) {\n self.frm_message = Some(frm_message);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::EphemeralConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct EphemeralConfig {\n pub validity: i64,\n}", + "after_code": "pub struct EphemeralConfig {\n pub validity: i64,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/routes/app.rs::WebhookEvents::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(config: AppState) -> Scope {\n web::scope(\"/events\")\n .app_data(web::Data::new(config))\n .service(web::scope(\"/profile/list\").service(web::resource(\"\").route(\n web::post().to(webhook_events::list_initial_webhook_delivery_attempts_with_jwtauth),\n )))\n .service(\n web::scope(\"/{merchant_id}\")\n .service(web::resource(\"\").route(\n web::post().to(webhook_events::list_initial_webhook_delivery_attempts),\n ))\n .service(\n web::scope(\"/{event_id}\")\n .service(web::resource(\"attempts\").route(\n web::get().to(webhook_events::list_webhook_delivery_attempts),\n ))\n .service(web::resource(\"retry\").route(\n web::post().to(webhook_events::retry_webhook_delivery_attempt),\n )),\n ),\n )\n }", + "after_code": "pub fn server(config: AppState) -> Scope {\n web::scope(\"/events\")\n .app_data(web::Data::new(config))\n .service(web::scope(\"/profile/list\").service(web::resource(\"\").route(\n web::post().to(webhook_events::list_initial_webhook_delivery_attempts_with_jwtauth),\n )))\n .service(\n web::scope(\"/{merchant_id}\")\n .service(web::resource(\"\").route(\n web::post().to(webhook_events::list_initial_webhook_delivery_attempts),\n ))\n .service(\n web::scope(\"/{event_id}\")\n .service(web::resource(\"attempts\").route(\n web::get().to(webhook_events::list_webhook_delivery_attempts),\n ))\n .service(web::resource(\"retry\").route(\n web::post().to(webhook_events::retry_webhook_delivery_attempt),\n )),\n ),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_extended_card_info", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn get_extended_card_info(\n state: SessionState,\n merchant_id: id_type::MerchantId,\n payment_id: id_type::PaymentId,\n) -> RouterResponse {\n let redis_conn = state\n .store\n .get_redis_conn()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get redis connection\")?;\n\n let key = helpers::get_redis_key_for_extended_card_info(&merchant_id, &payment_id);\n let payload = redis_conn\n .get_key::(&key.into())\n .await\n .change_context(errors::ApiErrorResponse::ExtendedCardInfoNotFound)?;\n\n Ok(services::ApplicationResponse::Json(\n payments_api::ExtendedCardInfoResponse { payload },\n ))\n}", + "after_code": "pub async fn get_extended_card_info(\n state: SessionState,\n merchant_id: id_type::MerchantId,\n payment_id: id_type::PaymentId,\n) -> RouterResponse {\n let redis_conn = state\n .store\n .get_redis_conn()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get redis connection\")?;\n\n let key = helpers::get_redis_key_for_extended_card_info(&merchant_id, &payment_id);\n let payload = redis_conn\n .get_key::(&key.into())\n .await\n .change_context(errors::ApiErrorResponse::ExtendedCardInfoNotFound)?;\n\n Ok(services::ApplicationResponse::Json(\n payments_api::ExtendedCardInfoResponse { payload },\n ))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::trait::PaymentRedirectFlow", + "file": "crates/router/src/core/payments.rs", + "kind": "trait_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub trait PaymentRedirectFlow: Sync {\n // Associated type for call_payment_flow response\n type PaymentFlowResponse;\n\n #[cfg(feature = \"v1\")]\n #[allow(clippy::too_many_arguments)]\n async fn call_payment_flow(\n &self,\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n req: PaymentsRedirectResponseData,\n connector_action: CallConnectorAction,\n connector: String,\n payment_id: id_type::PaymentId,\n ) -> RouterResult;\n\n #[cfg(feature = \"v2\")]\n #[allow(clippy::too_many_arguments)]\n async fn call_payment_flow(\n &self,\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n req: PaymentsRedirectResponseData,\n ) -> RouterResult;\n\n fn get_payment_action(&self) -> services::PaymentAction;\n\n #[cfg(feature = \"v1\")]\n fn generate_response(\n &self,\n payment_flow_response: &Self::PaymentFlowResponse,\n payment_id: id_type::PaymentId,\n connector: String,\n ) -> RouterResult>;\n\n #[cfg(feature = \"v2\")]\n fn generate_response(\n &self,\n payment_flow_response: &Self::PaymentFlowResponse,\n ) -> RouterResult>;\n\n #[cfg(feature = \"v1\")]\n async fn handle_payments_redirect_response(\n &self,\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n req: PaymentsRedirectResponseData,\n ) -> RouterResponse {\n metrics::REDIRECTION_TRIGGERED.add(\n 1,\n router_env::metric_attributes!(\n (\n \"connector\",\n req.connector.to_owned().unwrap_or(\"null\".to_string()),\n ),\n (\n \"merchant_id\",\n merchant_context.get_merchant_account().get_id().clone()\n ),\n ),\n );\n let connector = req.connector.clone().get_required_value(\"connector\")?;\n\n let query_params = req.param.clone().get_required_value(\"param\")?;\n\n #[cfg(feature = \"v1\")]\n let resource_id = api::PaymentIdTypeExt::get_payment_intent_id(&req.resource_id)\n .change_context(errors::ApiErrorResponse::MissingRequiredField {\n field_name: \"payment_id\",\n })?;\n\n #[cfg(feature = \"v2\")]\n //TODO: Will get the global payment id from the resource id, we need to handle this in the further flow\n let resource_id: id_type::PaymentId = todo!();\n\n // This connector data is ephemeral, the call payment flow will get new connector data\n // with merchant account details, so the connector_id can be safely set to None here\n let connector_data = api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &connector,\n api::GetToken::Connector,\n None,\n )?;\n\n let flow_type = connector_data\n .connector\n .get_flow_type(\n &query_params,\n req.json_payload.clone(),\n self.get_payment_action(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to decide the response flow\")?;\n\n let payment_flow_response = self\n .call_payment_flow(\n &state,\n req_state,\n merchant_context,\n req.clone(),\n flow_type,\n connector.clone(),\n resource_id.clone(),\n )\n .await?;\n\n self.generate_response(&payment_flow_response, resource_id, connector)\n }\n\n #[cfg(feature = \"v2\")]\n #[allow(clippy::too_many_arguments)]\n async fn handle_payments_redirect_response(\n &self,\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n request: PaymentsRedirectResponseData,\n ) -> RouterResponse {\n metrics::REDIRECTION_TRIGGERED.add(\n 1,\n router_env::metric_attributes!((\n \"merchant_id\",\n merchant_context.get_merchant_account().get_id().clone()\n )),\n );\n\n let payment_flow_response = self\n .call_payment_flow(&state, req_state, merchant_context, profile, request)\n .await?;\n\n self.generate_response(&payment_flow_response)\n }\n}", + "after_code": "pub trait PaymentRedirectFlow: Sync {\n // Associated type for call_payment_flow response\n type PaymentFlowResponse;\n\n #[cfg(feature = \"v1\")]\n #[allow(clippy::too_many_arguments)]\n async fn call_payment_flow(\n &self,\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n req: PaymentsRedirectResponseData,\n connector_action: CallConnectorAction,\n connector: String,\n payment_id: id_type::PaymentId,\n ) -> RouterResult;\n\n #[cfg(feature = \"v2\")]\n #[allow(clippy::too_many_arguments)]\n async fn call_payment_flow(\n &self,\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n req: PaymentsRedirectResponseData,\n ) -> RouterResult;\n\n fn get_payment_action(&self) -> services::PaymentAction;\n\n #[cfg(feature = \"v1\")]\n fn generate_response(\n &self,\n payment_flow_response: &Self::PaymentFlowResponse,\n payment_id: id_type::PaymentId,\n connector: String,\n ) -> RouterResult>;\n\n #[cfg(feature = \"v2\")]\n fn generate_response(\n &self,\n payment_flow_response: &Self::PaymentFlowResponse,\n ) -> RouterResult>;\n\n #[cfg(feature = \"v1\")]\n async fn handle_payments_redirect_response(\n &self,\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n req: PaymentsRedirectResponseData,\n ) -> RouterResponse {\n metrics::REDIRECTION_TRIGGERED.add(\n 1,\n router_env::metric_attributes!(\n (\n \"connector\",\n req.connector.to_owned().unwrap_or(\"null\".to_string()),\n ),\n (\n \"merchant_id\",\n merchant_context.get_merchant_account().get_id().clone()\n ),\n ),\n );\n let connector = req.connector.clone().get_required_value(\"connector\")?;\n\n let query_params = req.param.clone().get_required_value(\"param\")?;\n\n #[cfg(feature = \"v1\")]\n let resource_id = api::PaymentIdTypeExt::get_payment_intent_id(&req.resource_id)\n .change_context(errors::ApiErrorResponse::MissingRequiredField {\n field_name: \"payment_id\",\n })?;\n\n #[cfg(feature = \"v2\")]\n //TODO: Will get the global payment id from the resource id, we need to handle this in the further flow\n let resource_id: id_type::PaymentId = todo!();\n\n // This connector data is ephemeral, the call payment flow will get new connector data\n // with merchant account details, so the connector_id can be safely set to None here\n let connector_data = api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &connector,\n api::GetToken::Connector,\n None,\n )?;\n\n let flow_type = connector_data\n .connector\n .get_flow_type(\n &query_params,\n req.json_payload.clone(),\n self.get_payment_action(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to decide the response flow\")?;\n\n let payment_flow_response = self\n .call_payment_flow(\n &state,\n req_state,\n merchant_context,\n req.clone(),\n flow_type,\n connector.clone(),\n resource_id.clone(),\n )\n .await?;\n\n self.generate_response(&payment_flow_response, resource_id, connector)\n }\n\n #[cfg(feature = \"v2\")]\n #[allow(clippy::too_many_arguments)]\n async fn handle_payments_redirect_response(\n &self,\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n request: PaymentsRedirectResponseData,\n ) -> RouterResponse {\n metrics::REDIRECTION_TRIGGERED.add(\n 1,\n router_env::metric_attributes!((\n \"merchant_id\",\n merchant_context.get_merchant_account().get_id().clone()\n )),\n );\n\n let payment_flow_response = self\n .call_payment_flow(&state, req_state, merchant_context, profile, request)\n .await?;\n\n self.generate_response(&payment_flow_response)\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_payment_link_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_link_data(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_payment_link_data(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::is_operation_complete_authorize", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn is_operation_complete_authorize(operation: &Op) -> bool {\n matches!(format!(\"{operation:?}\").as_str(), \"CompleteAuthorize\")\n}", + "after_code": "pub fn is_operation_complete_authorize(operation: &Op) -> bool {\n matches!(format!(\"{operation:?}\").as_str(), \"CompleteAuthorize\")\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_payment_attempt_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_attempt_connector(&self) -> Option<&str> {\n todo!()\n }", + "after_code": "fn get_payment_attempt_connector(&self) -> Option<&str> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_client_secret", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_client_secret(&self) -> &Option> {\n todo!()\n }", + "after_code": "fn get_client_secret(&self) -> &Option> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::PazePaymentProcessingDetails", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PazePaymentProcessingDetails {\n pub paze_private_key: Secret,\n pub paze_private_key_passphrase: Secret,\n}", + "after_code": "pub struct PazePaymentProcessingDetails {\n pub paze_private_key: Secret,\n pub paze_private_key_passphrase: Secret,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_card_network", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_card_network(&mut self, _card_network: enums::CardNetwork) {\n todo!()\n }", + "after_code": "fn set_card_network(&mut self, _card_network: enums::CardNetwork) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::list_payments_attempts", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn list_payments_attempts(&self) -> &Vec {\n todo!()\n }", + "after_code": "fn list_payments_attempts(&self) -> &Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_connector_customer_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_customer_id(&mut self, _customer_id: Option) {\n // TODO: handle this case. Should we add connector_customer_id in PaymentCancelData?\n }", + "after_code": "fn set_connector_customer_id(&mut self, _customer_id: Option) {\n // TODO: handle this case. Should we add connector_customer_id in PaymentCancelData?\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::PaymentEvent", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl EventInfo for PaymentEvent {\n type Data = Self;\n fn data(&self) -> error_stack::Result {\n Ok(self.clone())\n }\n\n fn key(&self) -> String {\n \"payment\".to_string()\n }\n}", + "after_code": "impl EventInfo for PaymentEvent {\n type Data = Self;\n fn data(&self) -> error_stack::Result {\n Ok(self.clone())\n }\n\n fn key(&self) -> String {\n \"payment\".to_string()\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use events::EventInfo;" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use events::EventInfo;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_payment_method_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_token(&self) -> Option<&PaymentMethodToken> {\n todo!()\n }", + "after_code": "fn get_payment_method_token(&self) -> Option<&PaymentMethodToken> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_multiple_capture_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData> {\n todo!()\n }", + "after_code": "fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::Conversion", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Conversion {\n #[serde(with = \"rust_decimal::serde::str\")]\n pub to_factor: Decimal,\n #[serde(with = \"rust_decimal::serde::str\")]\n pub from_factor: Decimal,\n}", + "after_code": "pub struct Conversion {\n #[serde(with = \"rust_decimal::serde::str\")]\n pub to_factor: Decimal,\n #[serde(with = \"rust_decimal::serde::str\")]\n pub from_factor: Decimal,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use rust_decimal::Decimal;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use rust_decimal::Decimal;", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_whole_connector_response", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_whole_connector_response(&self) -> Option> {\n self.whole_connector_response.clone()\n }", + "after_code": "fn get_whole_connector_response(&self) -> Option> {\n self.whole_connector_response.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::PayoutRequiredFields", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PayoutRequiredFields(pub HashMap);", + "after_code": "pub struct PayoutRequiredFields(pub HashMap);", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use api_models::enums;", + "use diesel_models::enums::PaymentMethod;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }", + "after_code": "fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::PaymentRedirectSync", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PaymentRedirectSync;", + "after_code": "pub struct PaymentRedirectSync;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Refunds", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Refunds {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/v2/refunds\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n route =\n route.service(web::resource(\"/list\").route(web::post().to(refunds::refunds_list)));\n }\n #[cfg(feature = \"oltp\")]\n {\n route = route\n .service(web::resource(\"\").route(web::post().to(refunds::refunds_create)))\n .service(\n web::resource(\"/{id}\")\n .route(web::get().to(refunds::refunds_retrieve))\n .route(web::post().to(refunds::refunds_retrieve_with_gateway_creds)),\n )\n .service(\n web::resource(\"/{id}/update-metadata\")\n .route(web::put().to(refunds::refunds_metadata_update)),\n );\n }\n\n route\n }\n}", + "after_code": "impl Refunds {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/v2/refunds\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n route =\n route.service(web::resource(\"/list\").route(web::post().to(refunds::refunds_list)));\n }\n #[cfg(feature = \"oltp\")]\n {\n route = route\n .service(web::resource(\"\").route(web::post().to(refunds::refunds_create)))\n .service(\n web::resource(\"/{id}\")\n .route(web::get().to(refunds::refunds_retrieve))\n .route(web::post().to(refunds::refunds_retrieve_with_gateway_creds)),\n )\n .service(\n web::resource(\"/{id}/update-metadata\")\n .route(web::put().to(refunds::refunds_metadata_update)),\n );\n }\n\n route\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::refunds;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::refunds;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::is_confirm", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn is_confirm<'a, F: Clone + Send, R, Op>(\n operation: &'a Op,\n confirm: Option,\n) -> BoxedOperation<'a, F, R, PaymentData>\nwhere\n PaymentConfirm: Operation>,\n &'a PaymentConfirm: Operation>,\n Op: Operation> + Send + Sync,\n &'a Op: Operation>,\n{\n if confirm.unwrap_or(false) {\n Box::new(&PaymentConfirm)\n } else {\n Box::new(operation)\n }\n}", + "after_code": "pub fn is_confirm<'a, F: Clone + Send, R, Op>(\n operation: &'a Op,\n confirm: Option,\n) -> BoxedOperation<'a, F, R, PaymentData>\nwhere\n PaymentConfirm: Operation>,\n &'a PaymentConfirm: Operation>,\n Op: Operation> + Send + Sync,\n &'a Op: Operation>,\n{\n if confirm.unwrap_or(false) {\n Box::new(&PaymentConfirm)\n } else {\n Box::new(operation)\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::CardTestingCheck::function::should_run", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn should_run(\n &self,\n _state: &SessionState,\n _merchant_context: &domain::MerchantContext,\n ) -> CustomResult {\n // This check is always run as there is no runtime config enablement\n Ok(true)\n }", + "after_code": "async fn should_run(\n &self,\n _state: &SessionState,\n _merchant_context: &domain::MerchantContext,\n ) -> CustomResult {\n // This check is always run as there is no runtime config enablement\n Ok(true)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_frm_message", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_frm_message(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_frm_message(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::decide_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn decide_connector(\n state: SessionState,\n merchant_context: &domain::MerchantContext,\n business_profile: &domain::Profile,\n payment_data: &mut D,\n request_straight_through: Option,\n routing_data: &mut storage::RoutingData,\n eligible_connectors: Option>,\n mandate_type: Option,\n) -> RouterResult\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n // If the connector was already decided previously, use the same connector\n // This is in case of flows like payments_sync, payments_cancel where the successive operations\n // with the connector have to be made using the same connector account.\n if let Some(ref connector_name) = payment_data.get_payment_attempt().connector {\n // Connector was already decided previously, use the same connector\n let connector_data = api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n connector_name,\n api::GetToken::Connector,\n payment_data\n .get_payment_attempt()\n .merchant_connector_id\n .clone(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Invalid connector name received in 'routed_through'\")?;\n\n routing_data.routed_through = Some(connector_name.clone());\n logger::debug!(\"euclid_routing: predetermined connector present in attempt\");\n return Ok(ConnectorCallType::PreDetermined(connector_data.into()));\n }\n\n if let Some(mandate_connector_details) = payment_data.get_mandate_connector().as_ref() {\n let connector_data = api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &mandate_connector_details.connector,\n api::GetToken::Connector,\n mandate_connector_details.merchant_connector_id.clone(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Invalid connector name received in 'routed_through'\")?;\n\n routing_data.routed_through = Some(mandate_connector_details.connector.clone());\n\n routing_data\n .merchant_connector_id\n .clone_from(&mandate_connector_details.merchant_connector_id);\n\n logger::debug!(\"euclid_routing: predetermined mandate connector\");\n return Ok(ConnectorCallType::PreDetermined(connector_data.into()));\n }\n\n if let Some((pre_routing_results, storage_pm_type)) =\n routing_data.routing_info.pre_routing_results.as_ref().zip(\n payment_data\n .get_payment_attempt()\n .payment_method_type\n .as_ref(),\n )\n {\n if let (Some(routable_connector_choice), None) = (\n pre_routing_results.get(storage_pm_type),\n &payment_data.get_token_data(),\n ) {\n let routable_connector_list = match routable_connector_choice {\n storage::PreRoutingConnectorChoice::Single(routable_connector) => {\n vec![routable_connector.clone()]\n }\n storage::PreRoutingConnectorChoice::Multiple(routable_connector_list) => {\n routable_connector_list.clone()\n }\n };\n\n let mut pre_routing_connector_data_list = vec![];\n\n let first_routable_connector = routable_connector_list\n .first()\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)?;\n\n routing_data.routed_through = Some(first_routable_connector.connector.to_string());\n\n routing_data\n .merchant_connector_id\n .clone_from(&first_routable_connector.merchant_connector_id);\n\n for connector_choice in routable_connector_list.clone() {\n let connector_data = api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &connector_choice.connector.to_string(),\n api::GetToken::Connector,\n connector_choice.merchant_connector_id.clone(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Invalid connector name received\")?\n .into();\n\n pre_routing_connector_data_list.push(connector_data);\n }\n\n #[cfg(feature = \"retry\")]\n let should_do_retry = retry::config_should_call_gsm(\n &*state.store,\n merchant_context.get_merchant_account().get_id(),\n business_profile,\n )\n .await;\n\n #[cfg(feature = \"retry\")]\n if payment_data.get_payment_attempt().payment_method_type\n == Some(storage_enums::PaymentMethodType::ApplePay)\n && should_do_retry\n {\n let retryable_connector_data = helpers::get_apple_pay_retryable_connectors(\n &state,\n merchant_context,\n payment_data,\n &pre_routing_connector_data_list,\n first_routable_connector\n .merchant_connector_id\n .clone()\n .as_ref(),\n business_profile.clone(),\n )\n .await?;\n\n if let Some(connector_data_list) = retryable_connector_data {\n if connector_data_list.len() > 1 {\n logger::info!(\"Constructed apple pay retryable connector list\");\n return Ok(ConnectorCallType::Retryable(connector_data_list));\n }\n }\n }\n\n logger::debug!(\"euclid_routing: pre-routing connector present\");\n\n let first_pre_routing_connector_data_list = pre_routing_connector_data_list\n .first()\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)?;\n\n helpers::override_setup_future_usage_to_on_session(&*state.store, payment_data).await?;\n\n return Ok(ConnectorCallType::PreDetermined(\n first_pre_routing_connector_data_list.clone(),\n ));\n }\n }\n\n if let Some(routing_algorithm) = request_straight_through {\n let (mut connectors, check_eligibility) = routing::perform_straight_through_routing(\n &routing_algorithm,\n payment_data.get_creds_identifier(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed execution of straight through routing\")?;\n\n payment_data.set_routing_approach_in_attempt(Some(\n common_enums::RoutingApproach::StraightThroughRouting,\n ));\n\n if check_eligibility {\n let transaction_data = core_routing::PaymentsDslInput::new(\n payment_data.get_setup_mandate(),\n payment_data.get_payment_attempt(),\n payment_data.get_payment_intent(),\n payment_data.get_payment_method_data(),\n payment_data.get_address(),\n payment_data.get_recurring_details(),\n payment_data.get_currency(),\n );\n\n connectors = routing::perform_eligibility_analysis_with_fallback(\n &state.clone(),\n merchant_context.get_merchant_key_store(),\n connectors,\n &TransactionData::Payment(transaction_data),\n eligible_connectors,\n business_profile,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed eligibility analysis and fallback\")?;\n }\n\n let connector_data = connectors\n .into_iter()\n .map(|conn| {\n api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &conn.connector.to_string(),\n api::GetToken::Connector,\n conn.merchant_connector_id.clone(),\n )\n .map(|connector_data| connector_data.into())\n })\n .collect::, _>>()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Invalid connector name received\")?;\n\n logger::debug!(\"euclid_routing: straight through connector present\");\n return decide_multiplex_connector_for_normal_or_recurring_payment(\n &state,\n payment_data,\n routing_data,\n connector_data,\n mandate_type,\n business_profile.is_connector_agnostic_mit_enabled,\n business_profile.is_network_tokenization_enabled,\n )\n .await;\n }\n\n if let Some(ref routing_algorithm) = routing_data.routing_info.algorithm {\n let (mut connectors, check_eligibility) = routing::perform_straight_through_routing(\n routing_algorithm,\n payment_data.get_creds_identifier(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed execution of straight through routing\")?;\n\n if check_eligibility {\n let transaction_data = core_routing::PaymentsDslInput::new(\n payment_data.get_setup_mandate(),\n payment_data.get_payment_attempt(),\n payment_data.get_payment_intent(),\n payment_data.get_payment_method_data(),\n payment_data.get_address(),\n payment_data.get_recurring_details(),\n payment_data.get_currency(),\n );\n\n connectors = routing::perform_eligibility_analysis_with_fallback(\n &state,\n merchant_context.get_merchant_key_store(),\n connectors,\n &TransactionData::Payment(transaction_data),\n eligible_connectors,\n business_profile,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed eligibility analysis and fallback\")?;\n }\n\n logger::debug!(\"euclid_routing: single connector present in algorithm data\");\n let connector_data = connectors\n .into_iter()\n .map(|conn| {\n api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &conn.connector.to_string(),\n api::GetToken::Connector,\n conn.merchant_connector_id,\n )\n .map(|connector_data| connector_data.into())\n })\n .collect::, _>>()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Invalid connector name received\")?;\n\n return decide_multiplex_connector_for_normal_or_recurring_payment(\n &state,\n payment_data,\n routing_data,\n connector_data,\n mandate_type,\n business_profile.is_connector_agnostic_mit_enabled,\n business_profile.is_network_tokenization_enabled,\n )\n .await;\n }\n\n let new_pd = payment_data.clone();\n let transaction_data = core_routing::PaymentsDslInput::new(\n new_pd.get_setup_mandate(),\n new_pd.get_payment_attempt(),\n new_pd.get_payment_intent(),\n new_pd.get_payment_method_data(),\n new_pd.get_address(),\n new_pd.get_recurring_details(),\n new_pd.get_currency(),\n );\n\n route_connector_v1_for_payments(\n &state,\n merchant_context,\n business_profile,\n payment_data,\n transaction_data,\n routing_data,\n eligible_connectors,\n mandate_type,\n )\n .await\n}", + "after_code": "pub async fn decide_connector(\n state: SessionState,\n merchant_context: &domain::MerchantContext,\n business_profile: &domain::Profile,\n payment_data: &mut D,\n request_straight_through: Option,\n routing_data: &mut storage::RoutingData,\n eligible_connectors: Option>,\n mandate_type: Option,\n) -> RouterResult\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n // If the connector was already decided previously, use the same connector\n // This is in case of flows like payments_sync, payments_cancel where the successive operations\n // with the connector have to be made using the same connector account.\n if let Some(ref connector_name) = payment_data.get_payment_attempt().connector {\n // Connector was already decided previously, use the same connector\n let connector_data = api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n connector_name,\n api::GetToken::Connector,\n payment_data\n .get_payment_attempt()\n .merchant_connector_id\n .clone(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Invalid connector name received in 'routed_through'\")?;\n\n routing_data.routed_through = Some(connector_name.clone());\n logger::debug!(\"euclid_routing: predetermined connector present in attempt\");\n return Ok(ConnectorCallType::PreDetermined(connector_data.into()));\n }\n\n if let Some(mandate_connector_details) = payment_data.get_mandate_connector().as_ref() {\n let connector_data = api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &mandate_connector_details.connector,\n api::GetToken::Connector,\n mandate_connector_details.merchant_connector_id.clone(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Invalid connector name received in 'routed_through'\")?;\n\n routing_data.routed_through = Some(mandate_connector_details.connector.clone());\n\n routing_data\n .merchant_connector_id\n .clone_from(&mandate_connector_details.merchant_connector_id);\n\n logger::debug!(\"euclid_routing: predetermined mandate connector\");\n return Ok(ConnectorCallType::PreDetermined(connector_data.into()));\n }\n\n if let Some((pre_routing_results, storage_pm_type)) =\n routing_data.routing_info.pre_routing_results.as_ref().zip(\n payment_data\n .get_payment_attempt()\n .payment_method_type\n .as_ref(),\n )\n {\n if let (Some(routable_connector_choice), None) = (\n pre_routing_results.get(storage_pm_type),\n &payment_data.get_token_data(),\n ) {\n let routable_connector_list = match routable_connector_choice {\n storage::PreRoutingConnectorChoice::Single(routable_connector) => {\n vec![routable_connector.clone()]\n }\n storage::PreRoutingConnectorChoice::Multiple(routable_connector_list) => {\n routable_connector_list.clone()\n }\n };\n\n let mut pre_routing_connector_data_list = vec![];\n\n let first_routable_connector = routable_connector_list\n .first()\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)?;\n\n routing_data.routed_through = Some(first_routable_connector.connector.to_string());\n\n routing_data\n .merchant_connector_id\n .clone_from(&first_routable_connector.merchant_connector_id);\n\n for connector_choice in routable_connector_list.clone() {\n let connector_data = api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &connector_choice.connector.to_string(),\n api::GetToken::Connector,\n connector_choice.merchant_connector_id.clone(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Invalid connector name received\")?\n .into();\n\n pre_routing_connector_data_list.push(connector_data);\n }\n\n #[cfg(feature = \"retry\")]\n let should_do_retry = retry::config_should_call_gsm(\n &*state.store,\n merchant_context.get_merchant_account().get_id(),\n business_profile,\n )\n .await;\n\n #[cfg(feature = \"retry\")]\n if payment_data.get_payment_attempt().payment_method_type\n == Some(storage_enums::PaymentMethodType::ApplePay)\n && should_do_retry\n {\n let retryable_connector_data = helpers::get_apple_pay_retryable_connectors(\n &state,\n merchant_context,\n payment_data,\n &pre_routing_connector_data_list,\n first_routable_connector\n .merchant_connector_id\n .clone()\n .as_ref(),\n business_profile.clone(),\n )\n .await?;\n\n if let Some(connector_data_list) = retryable_connector_data {\n if connector_data_list.len() > 1 {\n logger::info!(\"Constructed apple pay retryable connector list\");\n return Ok(ConnectorCallType::Retryable(connector_data_list));\n }\n }\n }\n\n logger::debug!(\"euclid_routing: pre-routing connector present\");\n\n let first_pre_routing_connector_data_list = pre_routing_connector_data_list\n .first()\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)?;\n\n helpers::override_setup_future_usage_to_on_session(&*state.store, payment_data).await?;\n\n return Ok(ConnectorCallType::PreDetermined(\n first_pre_routing_connector_data_list.clone(),\n ));\n }\n }\n\n if let Some(routing_algorithm) = request_straight_through {\n let (mut connectors, check_eligibility) = routing::perform_straight_through_routing(\n &routing_algorithm,\n payment_data.get_creds_identifier(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed execution of straight through routing\")?;\n\n payment_data.set_routing_approach_in_attempt(Some(\n common_enums::RoutingApproach::StraightThroughRouting,\n ));\n\n if check_eligibility {\n let transaction_data = core_routing::PaymentsDslInput::new(\n payment_data.get_setup_mandate(),\n payment_data.get_payment_attempt(),\n payment_data.get_payment_intent(),\n payment_data.get_payment_method_data(),\n payment_data.get_address(),\n payment_data.get_recurring_details(),\n payment_data.get_currency(),\n );\n\n connectors = routing::perform_eligibility_analysis_with_fallback(\n &state.clone(),\n merchant_context.get_merchant_key_store(),\n connectors,\n &TransactionData::Payment(transaction_data),\n eligible_connectors,\n business_profile,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed eligibility analysis and fallback\")?;\n }\n\n let connector_data = connectors\n .into_iter()\n .map(|conn| {\n api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &conn.connector.to_string(),\n api::GetToken::Connector,\n conn.merchant_connector_id.clone(),\n )\n .map(|connector_data| connector_data.into())\n })\n .collect::, _>>()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Invalid connector name received\")?;\n\n logger::debug!(\"euclid_routing: straight through connector present\");\n return decide_multiplex_connector_for_normal_or_recurring_payment(\n &state,\n payment_data,\n routing_data,\n connector_data,\n mandate_type,\n business_profile.is_connector_agnostic_mit_enabled,\n business_profile.is_network_tokenization_enabled,\n )\n .await;\n }\n\n if let Some(ref routing_algorithm) = routing_data.routing_info.algorithm {\n let (mut connectors, check_eligibility) = routing::perform_straight_through_routing(\n routing_algorithm,\n payment_data.get_creds_identifier(),\n )\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed execution of straight through routing\")?;\n\n if check_eligibility {\n let transaction_data = core_routing::PaymentsDslInput::new(\n payment_data.get_setup_mandate(),\n payment_data.get_payment_attempt(),\n payment_data.get_payment_intent(),\n payment_data.get_payment_method_data(),\n payment_data.get_address(),\n payment_data.get_recurring_details(),\n payment_data.get_currency(),\n );\n\n connectors = routing::perform_eligibility_analysis_with_fallback(\n &state,\n merchant_context.get_merchant_key_store(),\n connectors,\n &TransactionData::Payment(transaction_data),\n eligible_connectors,\n business_profile,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"failed eligibility analysis and fallback\")?;\n }\n\n logger::debug!(\"euclid_routing: single connector present in algorithm data\");\n let connector_data = connectors\n .into_iter()\n .map(|conn| {\n api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &conn.connector.to_string(),\n api::GetToken::Connector,\n conn.merchant_connector_id,\n )\n .map(|connector_data| connector_data.into())\n })\n .collect::, _>>()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Invalid connector name received\")?;\n\n return decide_multiplex_connector_for_normal_or_recurring_payment(\n &state,\n payment_data,\n routing_data,\n connector_data,\n mandate_type,\n business_profile.is_connector_agnostic_mit_enabled,\n business_profile.is_network_tokenization_enabled,\n )\n .await;\n }\n\n let new_pd = payment_data.clone();\n let transaction_data = core_routing::PaymentsDslInput::new(\n new_pd.get_setup_mandate(),\n new_pd.get_payment_attempt(),\n new_pd.get_payment_intent(),\n new_pd.get_payment_method_data(),\n new_pd.get_address(),\n new_pd.get_recurring_details(),\n new_pd.get_currency(),\n );\n\n route_connector_v1_for_payments(\n &state,\n merchant_context,\n business_profile,\n payment_data,\n transaction_data,\n routing_data,\n eligible_connectors,\n mandate_type,\n )\n .await\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use std::future;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_disputes", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_disputes(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_disputes(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_payment_method_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }", + "after_code": "fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::ProfileAcquirer::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/profile_acquirer\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\").route(web::post().to(profile_acquirer::create_profile_acquirer)),\n )\n .service(\n web::resource(\"/{profile_id}/{profile_acquirer_id}\")\n .route(web::post().to(profile_acquirer::profile_acquirer_update)),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/profile_acquirer\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\").route(web::post().to(profile_acquirer::create_profile_acquirer)),\n )\n .service(\n web::resource(\"/{profile_id}/{profile_acquirer_id}\")\n .route(web::post().to(profile_acquirer::profile_acquirer_update)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::routes::profile_acquirer;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::routes::profile_acquirer;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::PaymentEligibilityData", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl PaymentEligibilityData {\n pub async fn from_request(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n payments_eligibility_request: &api_models::payments::PaymentsEligibilityRequest,\n ) -> CustomResult {\n let key_manager_state = &(state).into();\n let payment_method_data = payments_eligibility_request\n .payment_method_data\n .payment_method_data\n .clone()\n .map(domain::PaymentMethodData::from);\n let browser_info = payments_eligibility_request\n .browser_info\n .clone()\n .map(|browser_info| {\n serde_json::to_value(browser_info)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Unable to encode payout method data\")\n })\n .transpose()?\n .map(pii::SecretSerdeValue::new);\n let payment_intent = state\n .store\n .find_payment_intent_by_payment_id_merchant_id(\n key_manager_state,\n &payments_eligibility_request.payment_id,\n merchant_context.get_merchant_account().get_id(),\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n Ok(Self {\n payment_method_data,\n browser_info,\n payment_intent,\n })\n }\n}", + "after_code": "impl PaymentEligibilityData {\n pub async fn from_request(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n payments_eligibility_request: &api_models::payments::PaymentsEligibilityRequest,\n ) -> CustomResult {\n let key_manager_state = &(state).into();\n let payment_method_data = payments_eligibility_request\n .payment_method_data\n .payment_method_data\n .clone()\n .map(domain::PaymentMethodData::from);\n let browser_info = payments_eligibility_request\n .browser_info\n .clone()\n .map(|browser_info| {\n serde_json::to_value(browser_info)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Unable to encode payout method data\")\n })\n .transpose()?\n .map(pii::SecretSerdeValue::new);\n let payment_intent = state\n .store\n .find_payment_intent_by_payment_id_merchant_id(\n key_manager_state,\n &payments_eligibility_request.payment_id,\n merchant_context.get_merchant_account().get_id(),\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n Ok(Self {\n payment_method_data,\n browser_info,\n payment_intent,\n })\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_disputes", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_disputes(&self) -> Vec {\n self.disputes.clone()\n }", + "after_code": "fn get_disputes(&self) -> Vec {\n self.disputes.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_routing_approach_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_authentication_type_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::proxy_for_payments_core", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn proxy_for_payments_core(\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n payment_id: id_type::GlobalPaymentId,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n return_raw_connector_response: Option,\n) -> RouterResponse\nwhere\n F: Send + Clone + Sync,\n Req: Send + Sync + Authenticate,\n FData: Send + Sync + Clone,\n Op: Operation + ValidateStatusForOperation + Send + Sync + Clone,\n Req: Debug,\n D: OperationSessionGetters\n + OperationSessionSetters\n + transformers::GenerateResponse\n + Send\n + Sync\n + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature,\n\n dyn api::Connector:\n services::api::ConnectorIntegration,\n\n PaymentResponse: Operation,\n\n RouterData:\n hyperswitch_domain_models::router_data::TrackerPostUpdateObjects,\n{\n operation\n .to_validate_request()?\n .validate_request(&req, &merchant_context)?;\n\n let get_tracker_response = operation\n .to_get_tracker()?\n .get_trackers(\n &state,\n &payment_id,\n &req,\n &merchant_context,\n &profile,\n &header_payload,\n )\n .await?;\n\n let (payment_data, _req, connector_http_status_code, external_latency) =\n proxy_for_payments_operation_core::<_, _, _, _, _>(\n &state,\n req_state,\n merchant_context.clone(),\n profile.clone(),\n operation.clone(),\n req,\n get_tracker_response,\n call_connector_action,\n header_payload.clone(),\n return_raw_connector_response,\n )\n .await?;\n\n payment_data.generate_response(\n &state,\n connector_http_status_code,\n external_latency,\n header_payload.x_hs_latency,\n &merchant_context,\n &profile,\n None,\n )\n}", + "after_code": "pub async fn proxy_for_payments_core(\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n operation: Op,\n req: Req,\n payment_id: id_type::GlobalPaymentId,\n call_connector_action: CallConnectorAction,\n header_payload: HeaderPayload,\n return_raw_connector_response: Option,\n) -> RouterResponse\nwhere\n F: Send + Clone + Sync,\n Req: Send + Sync + Authenticate,\n FData: Send + Sync + Clone,\n Op: Operation + ValidateStatusForOperation + Send + Sync + Clone,\n Req: Debug,\n D: OperationSessionGetters\n + OperationSessionSetters\n + transformers::GenerateResponse\n + Send\n + Sync\n + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature,\n\n dyn api::Connector:\n services::api::ConnectorIntegration,\n\n PaymentResponse: Operation,\n\n RouterData:\n hyperswitch_domain_models::router_data::TrackerPostUpdateObjects,\n{\n operation\n .to_validate_request()?\n .validate_request(&req, &merchant_context)?;\n\n let get_tracker_response = operation\n .to_get_tracker()?\n .get_trackers(\n &state,\n &payment_id,\n &req,\n &merchant_context,\n &profile,\n &header_payload,\n )\n .await?;\n\n let (payment_data, _req, connector_http_status_code, external_latency) =\n proxy_for_payments_operation_core::<_, _, _, _, _>(\n &state,\n req_state,\n merchant_context.clone(),\n profile.clone(),\n operation.clone(),\n req,\n get_tracker_response,\n call_connector_action,\n header_payload.clone(),\n return_raw_connector_response,\n )\n .await?;\n\n payment_data.generate_response(\n &state,\n connector_http_status_code,\n external_latency,\n header_payload.x_hs_latency,\n &merchant_context,\n &profile,\n None,\n )\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use operations::ValidateStatusForOperation;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use operations::ValidateStatusForOperation;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Poll::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(config: AppState) -> Scope {\n web::scope(\"/poll\")\n .app_data(web::Data::new(config))\n .service(\n web::resource(\"/status/{poll_id}\").route(web::get().to(poll::retrieve_poll_status)),\n )\n }", + "after_code": "pub fn server(config: AppState) -> Scope {\n web::scope(\"/poll\")\n .app_data(web::Data::new(config))\n .service(\n web::resource(\"/status/{poll_id}\").route(web::get().to(poll::retrieve_poll_status)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::poll;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use super::poll;", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::CardTestingCheck::function::transform", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn transform(output: CheckResult) -> Option {\n output.into()\n }", + "after_code": "fn transform(output: CheckResult) -> Option {\n output.into()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_payment_method_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }", + "after_code": "fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::EligibilityHandler", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct EligibilityHandler {\n state: SessionState,\n merchant_context: domain::MerchantContext,\n payment_eligibility_data: PaymentEligibilityData,\n business_profile: domain::Profile,\n}", + "after_code": "pub struct EligibilityHandler {\n state: SessionState,\n merchant_context: domain::MerchantContext,\n payment_eligibility_data: PaymentEligibilityData,\n business_profile: domain::Profile,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_eligible_connector_for_nti", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn get_eligible_connector_for_nti(\n state: &SessionState,\n key_store: &domain::MerchantKeyStore,\n payment_data: &D,\n connector_choice: T,\n\n business_profile: &domain::Profile,\n) -> RouterResult<(\n api_models::payments::MandateReferenceId,\n hyperswitch_domain_models::payment_method_data::CardDetailsForNetworkTransactionId,\n api::ConnectorData,\n)>\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n // Since this flow will only be used in the MIT flow, recurring details are mandatory.\n let recurring_payment_details = payment_data\n .get_recurring_details()\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\"Failed to fetch recurring details for mit\")?;\n\n let (mandate_reference_id, card_details_for_network_transaction_id)= hyperswitch_domain_models::payment_method_data::CardDetailsForNetworkTransactionId::get_nti_and_card_details_for_mit_flow(recurring_payment_details.clone()).get_required_value(\"network transaction id and card details\").attach_printable(\"Failed to fetch network transaction id and card details for mit\")?;\n\n helpers::validate_card_expiry(\n &card_details_for_network_transaction_id.card_exp_month,\n &card_details_for_network_transaction_id.card_exp_year,\n )?;\n\n let network_transaction_id_supported_connectors = &state\n .conf\n .network_transaction_id_supported_connectors\n .connector_list\n .iter()\n .map(|value| value.to_string())\n .collect::>();\n\n let eligible_connector_data_list = connector_choice\n .get_routable_connectors(&*state.store, business_profile)\n .await?\n .filter_network_transaction_id_flow_supported_connectors(\n network_transaction_id_supported_connectors.to_owned(),\n )\n .construct_dsl_and_perform_eligibility_analysis(\n state,\n key_store,\n payment_data,\n business_profile.get_id(),\n )\n .await\n .attach_printable(\"Failed to fetch eligible connector data\")?;\n\n let eligible_connector_data = eligible_connector_data_list\n .first()\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\n \"No eligible connector found for the network transaction id based mit flow\",\n )?;\n Ok((\n mandate_reference_id,\n card_details_for_network_transaction_id,\n eligible_connector_data.clone(),\n ))\n}", + "after_code": "async fn get_eligible_connector_for_nti(\n state: &SessionState,\n key_store: &domain::MerchantKeyStore,\n payment_data: &D,\n connector_choice: T,\n\n business_profile: &domain::Profile,\n) -> RouterResult<(\n api_models::payments::MandateReferenceId,\n hyperswitch_domain_models::payment_method_data::CardDetailsForNetworkTransactionId,\n api::ConnectorData,\n)>\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n // Since this flow will only be used in the MIT flow, recurring details are mandatory.\n let recurring_payment_details = payment_data\n .get_recurring_details()\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\"Failed to fetch recurring details for mit\")?;\n\n let (mandate_reference_id, card_details_for_network_transaction_id)= hyperswitch_domain_models::payment_method_data::CardDetailsForNetworkTransactionId::get_nti_and_card_details_for_mit_flow(recurring_payment_details.clone()).get_required_value(\"network transaction id and card details\").attach_printable(\"Failed to fetch network transaction id and card details for mit\")?;\n\n helpers::validate_card_expiry(\n &card_details_for_network_transaction_id.card_exp_month,\n &card_details_for_network_transaction_id.card_exp_year,\n )?;\n\n let network_transaction_id_supported_connectors = &state\n .conf\n .network_transaction_id_supported_connectors\n .connector_list\n .iter()\n .map(|value| value.to_string())\n .collect::>();\n\n let eligible_connector_data_list = connector_choice\n .get_routable_connectors(&*state.store, business_profile)\n .await?\n .filter_network_transaction_id_flow_supported_connectors(\n network_transaction_id_supported_connectors.to_owned(),\n )\n .construct_dsl_and_perform_eligibility_analysis(\n state,\n key_store,\n payment_data,\n business_profile.get_id(),\n )\n .await\n .attach_printable(\"Failed to fetch eligible connector data\")?;\n\n let eligible_connector_data = eligible_connector_data_list\n .first()\n .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\n \"No eligible connector found for the network transaction id based mit flow\",\n )?;\n Ok((\n mandate_reference_id,\n card_details_for_network_transaction_id,\n eligible_connector_data.clone(),\n ))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_payment_method_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData> {\n self.payment_method_data.as_ref()\n }", + "after_code": "fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData> {\n self.payment_method_data.as_ref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::enum::PaymentFlow", + "file": "crates/router/src/configs/settings.rs", + "kind": "enum_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub enum PaymentFlow {\n Mandates,\n}", + "after_code": "pub enum PaymentFlow {\n Mandates,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments/flows/session_update_flow.rs::impl::types::RouterData<\n api::SdkSessionUpdate,\n types::SdkPaymentsSessionUpdateData,\n types::PaymentsResponseData,\n >", + "file": "crates/router/src/core/payments/flows/session_update_flow.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "impl Feature\n for types::RouterData<\n api::SdkSessionUpdate,\n types::SdkPaymentsSessionUpdateData,\n types::PaymentsResponseData,\n >\n{\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::SdkSessionUpdate,\n types::SdkPaymentsSessionUpdateData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::SdkSessionUpdate,\n types::SdkPaymentsSessionUpdateData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n}", + "after_code": "impl Feature\n for types::RouterData<\n api::SdkSessionUpdate,\n types::SdkPaymentsSessionUpdateData,\n types::PaymentsResponseData,\n >\n{\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::SdkSessionUpdate,\n types::SdkPaymentsSessionUpdateData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::SdkSessionUpdate,\n types::SdkPaymentsSessionUpdateData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n}", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_co_badged_card_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }", + "after_code": "fn set_co_badged_card_data(\n &mut self,\n debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_frm_message", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_frm_message(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_frm_message(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_payment_link_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_link_data(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_payment_link_data(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_payment_method_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_token(&self) -> Option<&PaymentMethodToken> {\n self.payment_method_token.as_ref()\n }", + "after_code": "fn get_payment_method_token(&self) -> Option<&PaymentMethodToken> {\n self.payment_method_token.as_ref()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_connector_request_reference_id_in_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n todo!()\n }", + "after_code": "fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::mod::payment_methods", + "file": "crates/router/src/core/payments.rs", + "kind": "mod_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub mod payment_methods;", + "after_code": "pub mod payment_methods;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/cancel_post_capture_flow.rs::impl::types::RouterData<\n api::PostCaptureVoid,\n types::PaymentsCancelPostCaptureData,\n types::PaymentsResponseData,\n >", + "file": "crates/router/src/core/payments/flows/cancel_post_capture_flow.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "impl Feature\n for types::RouterData<\n api::PostCaptureVoid,\n types::PaymentsCancelPostCaptureData,\n types::PaymentsResponseData,\n >\n{\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n metrics::PAYMENT_CANCEL_COUNT.add(\n 1,\n router_env::metric_attributes!((\"connector\", connector.connector_name.to_string())),\n );\n\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PostCaptureVoid,\n types::PaymentsCancelPostCaptureData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n Ok(resp)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PostCaptureVoid,\n types::PaymentsCancelPostCaptureData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n}", + "after_code": "impl Feature\n for types::RouterData<\n api::PostCaptureVoid,\n types::PaymentsCancelPostCaptureData,\n types::PaymentsResponseData,\n >\n{\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n metrics::PAYMENT_CANCEL_COUNT.add(\n 1,\n router_env::metric_attributes!((\"connector\", connector.connector_name.to_string())),\n );\n\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PostCaptureVoid,\n types::PaymentsCancelPostCaptureData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n Ok(resp)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::PostCaptureVoid,\n types::PaymentsCancelPostCaptureData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n}", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n metrics::PAYMENT_CANCEL_COUNT.add(" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/routes/app.rs::impl::MerchantConnectorAccount", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl MerchantConnectorAccount {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/account\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n use super::admin::*;\n\n route = route\n .service(\n web::resource(\"/connectors/verify\")\n .route(web::post().to(super::verify_connector::payment_connector_verify)),\n )\n .service(\n web::resource(\"/{merchant_id}/connectors\")\n .route(web::post().to(connector_create))\n .route(web::get().to(connector_list)),\n )\n .service(\n web::resource(\"/{merchant_id}/connectors/{merchant_connector_id}\")\n .route(web::get().to(connector_retrieve))\n .route(web::post().to(connector_update))\n .route(web::delete().to(connector_delete)),\n );\n }\n #[cfg(feature = \"oltp\")]\n {\n route = route.service(\n web::resource(\"/payment_methods\")\n .route(web::get().to(payment_methods::list_payment_method_api)),\n );\n }\n route\n }\n}", + "after_code": "impl MerchantConnectorAccount {\n pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/account\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n use super::admin::*;\n\n route = route\n .service(\n web::resource(\"/connectors/verify\")\n .route(web::post().to(super::verify_connector::payment_connector_verify)),\n )\n .service(\n web::resource(\"/{merchant_id}/connectors\")\n .route(web::post().to(connector_create))\n .route(web::get().to(connector_list)),\n )\n .service(\n web::resource(\"/{merchant_id}/connectors/{merchant_connector_id}\")\n .route(web::get().to(connector_retrieve))\n .route(web::post().to(connector_update))\n .route(web::delete().to(connector_delete)),\n );\n }\n #[cfg(feature = \"oltp\")]\n {\n route = route.service(\n web::resource(\"/payment_methods\")\n .route(web::get().to(payment_methods::list_payment_method_api)),\n );\n }\n route\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use super::dummy_connector::*;", + "use super::payout_link::*;", + "use super::payouts::*;", + "use super::admin::*;", + "use actix_web::{web, Scope};", + "use super::recovery_webhooks::*;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::webhooks::*;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use super::payment_methods;", + "use super::ephemeral_key::*;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use super::dummy_connector::*;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use super::payout_link::*;", + "use super::payouts::*;", + "use super::admin::*;", + "use actix_web::{web, Scope};", + "use super::recovery_webhooks::*;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::webhooks::*;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use super::payment_methods;", + "use super::ephemeral_key::*;", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_authentication", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>\n {\n todo!()\n }", + "after_code": "fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>\n {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::Settings::function::with_config_path", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn with_config_path(config_path: Option) -> ApplicationResult {\n // Configuration values are picked up in the following priority order (1 being least\n // priority):\n // 1. Defaults from the implementation of the `Default` trait.\n // 2. Values from config file. The config file accessed depends on the environment\n // specified by the `RUN_ENV` environment variable. `RUN_ENV` can be one of\n // `development`, `sandbox` or `production`. If nothing is specified for `RUN_ENV`,\n // `/config/development.toml` file is read.\n // 3. Environment variables prefixed with `ROUTER` and each level separated by double\n // underscores.\n //\n // Values in config file override the defaults in `Default` trait, and the values set using\n // environment variables override both the defaults and the config file values.\n\n let environment = env::which();\n let config_path = router_env::Config::config_path(&environment.to_string(), config_path);\n\n let config = router_env::Config::builder(&environment.to_string())\n .change_context(ApplicationError::ConfigurationError)?\n .add_source(File::from(config_path).required(false));\n\n #[cfg(feature = \"v2\")]\n let config = {\n let required_fields_config_file =\n router_env::Config::get_config_directory().join(REQUIRED_FIELDS_CONFIG_FILE);\n config.add_source(File::from(required_fields_config_file).required(false))\n };\n\n let config = config\n .add_source(\n Environment::with_prefix(\"ROUTER\")\n .try_parsing(true)\n .separator(\"__\")\n .list_separator(\",\")\n .with_list_parse_key(\"log.telemetry.route_to_trace\")\n .with_list_parse_key(\"redis.cluster_urls\")\n .with_list_parse_key(\"events.kafka.brokers\")\n .with_list_parse_key(\"connectors.supported.wallets\")\n .with_list_parse_key(\"connector_request_reference_id_config.merchant_ids_send_payment_id_as_connector_request_id\"),\n\n )\n .build()\n .change_context(ApplicationError::ConfigurationError)?;\n\n let mut settings: Self = serde_path_to_error::deserialize(config)\n .attach_printable(\"Unable to deserialize application configuration\")\n .change_context(ApplicationError::ConfigurationError)?;\n #[cfg(feature = \"v1\")]\n {\n settings.required_fields = RequiredFields::new(&settings.bank_config);\n }\n Ok(settings)\n }", + "after_code": "pub fn with_config_path(config_path: Option) -> ApplicationResult {\n // Configuration values are picked up in the following priority order (1 being least\n // priority):\n // 1. Defaults from the implementation of the `Default` trait.\n // 2. Values from config file. The config file accessed depends on the environment\n // specified by the `RUN_ENV` environment variable. `RUN_ENV` can be one of\n // `development`, `sandbox` or `production`. If nothing is specified for `RUN_ENV`,\n // `/config/development.toml` file is read.\n // 3. Environment variables prefixed with `ROUTER` and each level separated by double\n // underscores.\n //\n // Values in config file override the defaults in `Default` trait, and the values set using\n // environment variables override both the defaults and the config file values.\n\n let environment = env::which();\n let config_path = router_env::Config::config_path(&environment.to_string(), config_path);\n\n let config = router_env::Config::builder(&environment.to_string())\n .change_context(ApplicationError::ConfigurationError)?\n .add_source(File::from(config_path).required(false));\n\n #[cfg(feature = \"v2\")]\n let config = {\n let required_fields_config_file =\n router_env::Config::get_config_directory().join(REQUIRED_FIELDS_CONFIG_FILE);\n config.add_source(File::from(required_fields_config_file).required(false))\n };\n\n let config = config\n .add_source(\n Environment::with_prefix(\"ROUTER\")\n .try_parsing(true)\n .separator(\"__\")\n .list_separator(\",\")\n .with_list_parse_key(\"log.telemetry.route_to_trace\")\n .with_list_parse_key(\"redis.cluster_urls\")\n .with_list_parse_key(\"events.kafka.brokers\")\n .with_list_parse_key(\"connectors.supported.wallets\")\n .with_list_parse_key(\"connector_request_reference_id_config.merchant_ids_send_payment_id_as_connector_request_id\"),\n\n )\n .build()\n .change_context(ApplicationError::ConfigurationError)?;\n\n let mut settings: Self = serde_path_to_error::deserialize(config)\n .attach_printable(\"Unable to deserialize application configuration\")\n .change_context(ApplicationError::ConfigurationError)?;\n #[cfg(feature = \"v1\")]\n {\n settings.required_fields = RequiredFields::new(&settings.bank_config);\n }\n Ok(settings)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use config::{Environment, File};", + "use serde::de::Error;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use config::{Environment, File};", + "use serde::de::Error;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_token_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_token_data(&self) -> Option<&storage::PaymentTokenData> {\n todo!()\n }", + "after_code": "fn get_token_data(&self) -> Option<&storage::PaymentTokenData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Organization", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Organization;", + "after_code": "pub struct Organization;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_payment_method_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }", + "after_code": "fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::ApiKeys", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ApiKeys {\n /// Hex-encoded 32-byte long (64 characters long when hex-encoded) key used for calculating\n /// hashes of API keys\n pub hash_key: Secret,\n\n // Specifies the number of days before API key expiry when email reminders should be sent\n #[cfg(feature = \"email\")]\n pub expiry_reminder_days: Vec,\n\n #[cfg(feature = \"partial-auth\")]\n pub checksum_auth_context: Secret,\n\n #[cfg(feature = \"partial-auth\")]\n pub checksum_auth_key: Secret,\n\n #[cfg(feature = \"partial-auth\")]\n pub enable_partial_auth: bool,\n}", + "after_code": "pub struct ApiKeys {\n /// Hex-encoded 32-byte long (64 characters long when hex-encoded) key used for calculating\n /// hashes of API keys\n pub hash_key: Secret,\n\n // Specifies the number of days before API key expiry when email reminders should be sent\n #[cfg(feature = \"email\")]\n pub expiry_reminder_days: Vec,\n\n #[cfg(feature = \"partial-auth\")]\n pub checksum_auth_context: Secret,\n\n #[cfg(feature = \"partial-auth\")]\n pub checksum_auth_key: Secret,\n\n #[cfg(feature = \"partial-auth\")]\n pub enable_partial_auth: bool,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_frm_message", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }", + "after_code": "fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_multiple_capture_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData> {\n todo!()\n }", + "after_code": "fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_amount", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_amount(&self) -> api::Amount {\n todo!()\n }", + "after_code": "fn get_amount(&self) -> api::Amount {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Poll", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Poll;", + "after_code": "pub struct Poll;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Health", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Health;", + "after_code": "pub struct Health;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::add_request_id", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn add_request_id(&mut self, request_id: RequestId) {\n self.api_client.add_request_id(request_id);\n self.store.add_request_id(request_id.to_string());\n self.request_id.replace(request_id);\n }", + "after_code": "fn add_request_id(&mut self, request_id: RequestId) {\n self.api_client.add_request_id(request_id);\n self.store.add_request_id(request_id.to_string());\n self.request_id.replace(request_id);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};", + "use router_env::tracing_actix_web::RequestId;" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use router_env::tracing_actix_web::RequestId;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PazeWallet::function::decide_wallet_flow", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn decide_wallet_flow(\n &self,\n state: &SessionState,\n _payment_data: &D,\n _merchant_connector_account: &helpers::MerchantConnectorAccountType,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let paze_keys = state\n .conf\n .paze_decrypt_keys\n .as_ref()\n .get_required_value(\"Paze decrypt keys\")\n .attach_printable(\"Paze decrypt keys not found in the configuration\")?;\n\n let wallet_flow = DecideWalletFlow::PazeDecrypt(PazePaymentProcessingDetails {\n paze_private_key: paze_keys.get_inner().paze_private_key.clone(),\n paze_private_key_passphrase: paze_keys.get_inner().paze_private_key_passphrase.clone(),\n });\n Ok(Some(wallet_flow))\n }", + "after_code": "fn decide_wallet_flow(\n &self,\n state: &SessionState,\n _payment_data: &D,\n _merchant_connector_account: &helpers::MerchantConnectorAccountType,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let paze_keys = state\n .conf\n .paze_decrypt_keys\n .as_ref()\n .get_required_value(\"Paze decrypt keys\")\n .attach_printable(\"Paze decrypt keys not found in the configuration\")?;\n\n let wallet_flow = DecideWalletFlow::PazeDecrypt(PazePaymentProcessingDetails {\n paze_private_key: paze_keys.get_inner().paze_private_key.clone(),\n paze_private_key_passphrase: paze_keys.get_inner().paze_private_key_passphrase.clone(),\n });\n Ok(Some(wallet_flow))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_creds_identifier", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_creds_identifier(&self) -> Option<&str> {\n None\n }", + "after_code": "fn get_creds_identifier(&self) -> Option<&str> {\n None\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_mandate_reference_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn get_mandate_reference_id(\n action_type: Option,\n connector_routing_data: api::ConnectorRoutingData,\n payment_data: &mut D,\n payment_method_info: &domain::PaymentMethod,\n) -> RouterResult>\nwhere\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let mandate_reference_id = match action_type {\n Some(ActionType::NetworkTokenWithNetworkTransactionId(network_token_data)) => {\n logger::info!(\"using network token with network_transaction_id for MIT flow\");\n\n Some(payments_api::MandateReferenceId::NetworkTokenWithNTI(\n network_token_data.into(),\n ))\n }\n Some(ActionType::CardWithNetworkTransactionId(network_transaction_id)) => {\n logger::info!(\"using card with network_transaction_id for MIT flow\");\n\n Some(payments_api::MandateReferenceId::NetworkMandateId(\n network_transaction_id,\n ))\n }\n Some(ActionType::ConnectorMandate(connector_mandate_details)) => {\n logger::info!(\"using connector_mandate_id for MIT flow\");\n let merchant_connector_id = connector_routing_data\n .connector_data\n .merchant_connector_id\n .as_ref()\n .ok_or_else(|| {\n report!(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\"No eligible connector found for token-based MIT flow: no connector mandate details\")\n })?;\n\n let mandate_reference_record = connector_mandate_details\n .get(merchant_connector_id)\n .ok_or_else(|| {\n report!(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\"No mandate record found for merchant connector ID\")\n })?;\n\n if let Some(mandate_currency) =\n mandate_reference_record.original_payment_authorized_currency\n {\n if mandate_currency != payment_data.get_currency() {\n return Err(report!(errors::ApiErrorResponse::MandateValidationFailed {\n reason: \"Cross currency mandates not supported\".into(),\n }));\n }\n }\n\n payment_data.set_recurring_mandate_payment_data(mandate_reference_record.into());\n\n Some(payments_api::MandateReferenceId::ConnectorMandateId(\n api_models::payments::ConnectorMandateReferenceId::new(\n Some(mandate_reference_record.connector_mandate_id.clone()),\n Some(payment_method_info.get_id().clone()),\n None,\n mandate_reference_record.mandate_metadata.clone(),\n mandate_reference_record\n .connector_mandate_request_reference_id\n .clone(),\n ),\n ))\n }\n None => None,\n };\n Ok(mandate_reference_id)\n}", + "after_code": "pub fn get_mandate_reference_id(\n action_type: Option,\n connector_routing_data: api::ConnectorRoutingData,\n payment_data: &mut D,\n payment_method_info: &domain::PaymentMethod,\n) -> RouterResult>\nwhere\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let mandate_reference_id = match action_type {\n Some(ActionType::NetworkTokenWithNetworkTransactionId(network_token_data)) => {\n logger::info!(\"using network token with network_transaction_id for MIT flow\");\n\n Some(payments_api::MandateReferenceId::NetworkTokenWithNTI(\n network_token_data.into(),\n ))\n }\n Some(ActionType::CardWithNetworkTransactionId(network_transaction_id)) => {\n logger::info!(\"using card with network_transaction_id for MIT flow\");\n\n Some(payments_api::MandateReferenceId::NetworkMandateId(\n network_transaction_id,\n ))\n }\n Some(ActionType::ConnectorMandate(connector_mandate_details)) => {\n logger::info!(\"using connector_mandate_id for MIT flow\");\n let merchant_connector_id = connector_routing_data\n .connector_data\n .merchant_connector_id\n .as_ref()\n .ok_or_else(|| {\n report!(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\"No eligible connector found for token-based MIT flow: no connector mandate details\")\n })?;\n\n let mandate_reference_record = connector_mandate_details\n .get(merchant_connector_id)\n .ok_or_else(|| {\n report!(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)\n .attach_printable(\"No mandate record found for merchant connector ID\")\n })?;\n\n if let Some(mandate_currency) =\n mandate_reference_record.original_payment_authorized_currency\n {\n if mandate_currency != payment_data.get_currency() {\n return Err(report!(errors::ApiErrorResponse::MandateValidationFailed {\n reason: \"Cross currency mandates not supported\".into(),\n }));\n }\n }\n\n payment_data.set_recurring_mandate_payment_data(mandate_reference_record.into());\n\n Some(payments_api::MandateReferenceId::ConnectorMandateId(\n api_models::payments::ConnectorMandateReferenceId::new(\n Some(mandate_reference_record.connector_mandate_id.clone()),\n Some(payment_method_info.get_id().clone()),\n None,\n mandate_reference_record.mandate_metadata.clone(),\n mandate_reference_record\n .connector_mandate_request_reference_id\n .clone(),\n ),\n ))\n }\n None => None,\n };\n Ok(mandate_reference_id)\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use error_stack::{report, ResultExt};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use error_stack::{report, ResultExt};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::mod::vault_session", + "file": "crates/router/src/core/payments.rs", + "kind": "mod_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub mod vault_session;", + "after_code": "pub mod vault_session;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_authentication", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>\n {\n todo!()\n }", + "after_code": "fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>\n {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_optional_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt> {\n Some(&self.payment_attempt)\n }", + "after_code": "fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt> {\n Some(&self.payment_attempt)\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_card_network", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n match &mut self.payment_method_data {\n Some(domain::PaymentMethodData::Card(card)) => {\n logger::debug!(\"Setting card network: {:?}\", card_network);\n card.card_network = Some(card_network);\n }\n Some(domain::PaymentMethodData::Wallet(wallet_data)) => match wallet_data {\n hyperswitch_domain_models::payment_method_data::WalletData::ApplePay(wallet) => {\n logger::debug!(\"Setting Apple Pay card network: {:?}\", card_network);\n wallet.payment_method.network = card_network.to_string();\n }\n _ => {\n logger::debug!(\"Wallet type does not support setting card network.\");\n }\n },\n _ => {\n logger::warn!(\"Payment method data does not support setting card network.\");\n }\n }\n }", + "after_code": "fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n match &mut self.payment_method_data {\n Some(domain::PaymentMethodData::Card(card)) => {\n logger::debug!(\"Setting card network: {:?}\", card_network);\n card.card_network = Some(card_network);\n }\n Some(domain::PaymentMethodData::Wallet(wallet_data)) => match wallet_data {\n hyperswitch_domain_models::payment_method_data::WalletData::ApplePay(wallet) => {\n logger::debug!(\"Setting Apple Pay card network: {:?}\", card_network);\n wallet.payment_method.network = card_network.to_string();\n }\n _ => {\n logger::debug!(\"Wallet type does not support setting card network.\");\n }\n },\n _ => {\n logger::warn!(\"Payment method data does not support setting card network.\");\n }\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_force_sync", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_force_sync(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_force_sync(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentRedirectCompleteAuthorize::function::call_payment_flow", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn call_payment_flow(\n &self,\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n req: PaymentsRedirectResponseData,\n connector_action: CallConnectorAction,\n _connector: String,\n _payment_id: id_type::PaymentId,\n ) -> RouterResult {\n let key_manager_state = &state.into();\n let payment_confirm_req = api::PaymentsRequest {\n payment_id: Some(req.resource_id.clone()),\n merchant_id: req.merchant_id.clone(),\n merchant_connector_details: req.creds_identifier.map(|creds_id| {\n api::MerchantConnectorDetailsWrap {\n creds_identifier: creds_id,\n encoded_data: None,\n }\n }),\n feature_metadata: Some(api_models::payments::FeatureMetadata {\n redirect_response: Some(api_models::payments::RedirectResponse {\n param: req.param.map(Secret::new),\n json_payload: Some(req.json_payload.unwrap_or(serde_json::json!({})).into()),\n }),\n search_tags: None,\n apple_pay_recurring_details: None,\n }),\n ..Default::default()\n };\n let response = Box::pin(payments_core::<\n api::CompleteAuthorize,\n api::PaymentsResponse,\n _,\n _,\n _,\n _,\n >(\n state.clone(),\n req_state,\n merchant_context.clone(),\n None,\n operations::payment_complete_authorize::CompleteAuthorize,\n payment_confirm_req,\n services::api::AuthFlow::Merchant,\n connector_action,\n None,\n None,\n HeaderPayload::default(),\n ))\n .await?;\n let payments_response = match response {\n services::ApplicationResponse::Json(response) => Ok(response),\n services::ApplicationResponse::JsonWithHeaders((response, _)) => Ok(response),\n _ => Err(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get the response in json\"),\n }?;\n let profile_id = payments_response\n .profile_id\n .as_ref()\n .get_required_value(\"profile_id\")?;\n let business_profile = state\n .store\n .find_business_profile_by_profile_id(\n key_manager_state,\n merchant_context.get_merchant_key_store(),\n profile_id,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::ProfileNotFound {\n id: profile_id.get_string_repr().to_owned(),\n })?;\n Ok(router_types::RedirectPaymentFlowResponse {\n payments_response,\n business_profile,\n })\n }", + "after_code": "async fn call_payment_flow(\n &self,\n state: &SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n req: PaymentsRedirectResponseData,\n connector_action: CallConnectorAction,\n _connector: String,\n _payment_id: id_type::PaymentId,\n ) -> RouterResult {\n let key_manager_state = &state.into();\n let payment_confirm_req = api::PaymentsRequest {\n payment_id: Some(req.resource_id.clone()),\n merchant_id: req.merchant_id.clone(),\n merchant_connector_details: req.creds_identifier.map(|creds_id| {\n api::MerchantConnectorDetailsWrap {\n creds_identifier: creds_id,\n encoded_data: None,\n }\n }),\n feature_metadata: Some(api_models::payments::FeatureMetadata {\n redirect_response: Some(api_models::payments::RedirectResponse {\n param: req.param.map(Secret::new),\n json_payload: Some(req.json_payload.unwrap_or(serde_json::json!({})).into()),\n }),\n search_tags: None,\n apple_pay_recurring_details: None,\n }),\n ..Default::default()\n };\n let response = Box::pin(payments_core::<\n api::CompleteAuthorize,\n api::PaymentsResponse,\n _,\n _,\n _,\n _,\n >(\n state.clone(),\n req_state,\n merchant_context.clone(),\n None,\n operations::payment_complete_authorize::CompleteAuthorize,\n payment_confirm_req,\n services::api::AuthFlow::Merchant,\n connector_action,\n None,\n None,\n HeaderPayload::default(),\n ))\n .await?;\n let payments_response = match response {\n services::ApplicationResponse::Json(response) => Ok(response),\n services::ApplicationResponse::JsonWithHeaders((response, _)) => Ok(response),\n _ => Err(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to get the response in json\"),\n }?;\n let profile_id = payments_response\n .profile_id\n .as_ref()\n .get_required_value(\"profile_id\")?;\n let business_profile = state\n .store\n .find_business_profile_by_profile_id(\n key_manager_state,\n merchant_context.get_merchant_key_store(),\n profile_id,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::ProfileNotFound {\n id: profile_id.get_string_repr().to_owned(),\n })?;\n Ok(router_types::RedirectPaymentFlowResponse {\n payments_response,\n business_profile,\n })\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::MultipleApiVersionSupportedConnectors", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct MultipleApiVersionSupportedConnectors {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub supported_connectors: HashSet,\n}", + "after_code": "pub struct MultipleApiVersionSupportedConnectors {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub supported_connectors: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use super::deserialize_hashset;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use api_models::enums;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Subscription", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Subscription;", + "after_code": "pub struct Subscription;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_connector_choice", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn get_connector_choice(\n operation: &BoxedOperation<'_, F, Req, D>,\n state: &SessionState,\n req: &Req,\n merchant_context: &domain::MerchantContext,\n business_profile: &domain::Profile,\n payment_data: &mut D,\n eligible_connectors: Option>,\n mandate_type: Option,\n) -> RouterResult>\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let connector_choice = operation\n .to_domain()?\n .get_connector(\n merchant_context,\n &state.clone(),\n req,\n payment_data.get_payment_intent(),\n )\n .await?;\n\n let connector = if should_call_connector(operation, payment_data) {\n Some(match connector_choice {\n api::ConnectorChoice::SessionMultiple(connectors) => {\n let routing_output = perform_session_token_routing(\n state.clone(),\n merchant_context,\n business_profile,\n payment_data,\n connectors,\n )\n .await?;\n ConnectorCallType::SessionMultiple(routing_output)\n }\n\n api::ConnectorChoice::StraightThrough(straight_through) => {\n connector_selection(\n state,\n merchant_context,\n business_profile,\n payment_data,\n Some(straight_through),\n eligible_connectors,\n mandate_type,\n )\n .await?\n }\n\n api::ConnectorChoice::Decide => {\n connector_selection(\n state,\n merchant_context,\n business_profile,\n payment_data,\n None,\n eligible_connectors,\n mandate_type,\n )\n .await?\n }\n })\n } else if let api::ConnectorChoice::StraightThrough(algorithm) = connector_choice {\n update_straight_through_routing(payment_data, algorithm)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to update straight through routing algorithm\")?;\n\n None\n } else {\n None\n };\n Ok(connector)\n}", + "after_code": "pub async fn get_connector_choice(\n operation: &BoxedOperation<'_, F, Req, D>,\n state: &SessionState,\n req: &Req,\n merchant_context: &domain::MerchantContext,\n business_profile: &domain::Profile,\n payment_data: &mut D,\n eligible_connectors: Option>,\n mandate_type: Option,\n) -> RouterResult>\nwhere\n F: Send + Clone,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let connector_choice = operation\n .to_domain()?\n .get_connector(\n merchant_context,\n &state.clone(),\n req,\n payment_data.get_payment_intent(),\n )\n .await?;\n\n let connector = if should_call_connector(operation, payment_data) {\n Some(match connector_choice {\n api::ConnectorChoice::SessionMultiple(connectors) => {\n let routing_output = perform_session_token_routing(\n state.clone(),\n merchant_context,\n business_profile,\n payment_data,\n connectors,\n )\n .await?;\n ConnectorCallType::SessionMultiple(routing_output)\n }\n\n api::ConnectorChoice::StraightThrough(straight_through) => {\n connector_selection(\n state,\n merchant_context,\n business_profile,\n payment_data,\n Some(straight_through),\n eligible_connectors,\n mandate_type,\n )\n .await?\n }\n\n api::ConnectorChoice::Decide => {\n connector_selection(\n state,\n merchant_context,\n business_profile,\n payment_data,\n None,\n eligible_connectors,\n mandate_type,\n )\n .await?\n }\n })\n } else if let api::ConnectorChoice::StraightThrough(algorithm) = connector_choice {\n update_straight_through_routing(payment_data, algorithm)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to update straight through routing algorithm\")?;\n\n None\n } else {\n None\n };\n Ok(connector)\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::LockSettings", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct LockSettings {\n pub redis_lock_expiry_seconds: u32,\n pub delay_between_retries_in_milliseconds: u32,\n pub lock_retries: u32,\n}", + "after_code": "pub struct LockSettings {\n pub redis_lock_expiry_seconds: u32,\n pub delay_between_retries_in_milliseconds: u32,\n pub lock_retries: u32,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentAttemptListData::function::get_payment_method_info", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod> {\n todo!()\n }", + "after_code": "fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_routing_approach_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n self.payment_attempt.routing_approach = routing_approach;\n }", + "after_code": "fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n self.payment_attempt.routing_approach = routing_approach;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::UserDeprecated::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n // TODO: Deprecated. Remove this in favour of /v2/users\n let mut route = web::scope(\"/v2/user\").app_data(web::Data::new(state));\n\n route = route.service(\n web::resource(\"/create_merchant\")\n .route(web::post().to(user::user_merchant_account_create)),\n );\n route = route.service(\n web::scope(\"/list\")\n .service(\n web::resource(\"/merchant\")\n .route(web::get().to(user::list_merchants_for_user_in_org)),\n )\n .service(\n web::resource(\"/profile\")\n .route(web::get().to(user::list_profiles_for_user_in_org_and_merchant)),\n ),\n );\n\n route = route.service(\n web::scope(\"/switch\")\n .service(\n web::resource(\"/merchant\")\n .route(web::post().to(user::switch_merchant_for_user_in_org)),\n )\n .service(\n web::resource(\"/profile\")\n .route(web::post().to(user::switch_profile_for_user_in_org_and_merchant)),\n ),\n );\n\n route = route.service(\n web::resource(\"/data\")\n .route(web::get().to(user::get_multiple_dashboard_metadata))\n .route(web::post().to(user::set_dashboard_metadata)),\n );\n\n route\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n // TODO: Deprecated. Remove this in favour of /v2/users\n let mut route = web::scope(\"/v2/user\").app_data(web::Data::new(state));\n\n route = route.service(\n web::resource(\"/create_merchant\")\n .route(web::post().to(user::user_merchant_account_create)),\n );\n route = route.service(\n web::scope(\"/list\")\n .service(\n web::resource(\"/merchant\")\n .route(web::get().to(user::list_merchants_for_user_in_org)),\n )\n .service(\n web::resource(\"/profile\")\n .route(web::get().to(user::list_profiles_for_user_in_org_and_merchant)),\n ),\n );\n\n route = route.service(\n web::scope(\"/switch\")\n .service(\n web::resource(\"/merchant\")\n .route(web::post().to(user::switch_merchant_for_user_in_org)),\n )\n .service(\n web::resource(\"/profile\")\n .route(web::post().to(user::switch_profile_for_user_in_org_and_merchant)),\n ),\n );\n\n route = route.service(\n web::resource(\"/data\")\n .route(web::get().to(user::get_multiple_dashboard_metadata))\n .route(web::post().to(user::set_dashboard_metadata)),\n );\n\n route\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::call_create_connector_customer_if_required", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn call_create_connector_customer_if_required(\n state: &SessionState,\n customer: &Option,\n merchant_context: &domain::MerchantContext,\n merchant_connector_account: &domain::MerchantConnectorAccountTypeDetails,\n payment_data: &mut D,\n) -> RouterResult>\nwhere\n F: Send + Clone + Sync,\n Req: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n let connector_name = payment_data.get_payment_attempt().connector.clone();\n\n match connector_name {\n Some(connector_name) => {\n let connector = api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &connector_name,\n api::GetToken::Connector,\n merchant_connector_account.get_id(),\n )?;\n\n let (should_call_connector, existing_connector_customer_id) =\n customers::should_call_connector_create_customer(\n &connector,\n customer,\n payment_data.get_payment_attempt(),\n merchant_connector_account,\n );\n\n if should_call_connector {\n // Create customer at connector and update the customer table to store this data\n let router_data = payment_data\n .construct_router_data(\n state,\n connector.connector.id(),\n merchant_context,\n customer,\n merchant_connector_account,\n None,\n None,\n )\n .await?;\n\n let connector_customer_id = router_data\n .create_connector_customer(state, &connector)\n .await?;\n\n let customer_update = customers::update_connector_customer_in_customers(\n merchant_connector_account,\n customer.as_ref(),\n connector_customer_id.clone(),\n )\n .await;\n\n payment_data.set_connector_customer_id(connector_customer_id);\n Ok(customer_update)\n } else {\n // Customer already created in previous calls use the same value, no need to update\n payment_data.set_connector_customer_id(\n existing_connector_customer_id.map(ToOwned::to_owned),\n );\n Ok(None)\n }\n }\n None => Ok(None),\n }\n}", + "after_code": "pub async fn call_create_connector_customer_if_required(\n state: &SessionState,\n customer: &Option,\n merchant_context: &domain::MerchantContext,\n merchant_connector_account: &domain::MerchantConnectorAccountTypeDetails,\n payment_data: &mut D,\n) -> RouterResult>\nwhere\n F: Send + Clone + Sync,\n Req: Send + Sync,\n\n // To create connector flow specific interface data\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n D: ConstructFlowSpecificData,\n RouterData: Feature + Send,\n\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n{\n let connector_name = payment_data.get_payment_attempt().connector.clone();\n\n match connector_name {\n Some(connector_name) => {\n let connector = api::ConnectorData::get_connector_by_name(\n &state.conf.connectors,\n &connector_name,\n api::GetToken::Connector,\n merchant_connector_account.get_id(),\n )?;\n\n let (should_call_connector, existing_connector_customer_id) =\n customers::should_call_connector_create_customer(\n &connector,\n customer,\n payment_data.get_payment_attempt(),\n merchant_connector_account,\n );\n\n if should_call_connector {\n // Create customer at connector and update the customer table to store this data\n let router_data = payment_data\n .construct_router_data(\n state,\n connector.connector.id(),\n merchant_context,\n customer,\n merchant_connector_account,\n None,\n None,\n )\n .await?;\n\n let connector_customer_id = router_data\n .create_connector_customer(state, &connector)\n .await?;\n\n let customer_update = customers::update_connector_customer_in_customers(\n merchant_connector_account,\n customer.as_ref(),\n connector_customer_id.clone(),\n )\n .await;\n\n payment_data.set_connector_customer_id(connector_customer_id);\n Ok(customer_update)\n } else {\n // Customer already created in previous calls use the same value, no need to update\n payment_data.set_connector_customer_id(\n existing_connector_customer_id.map(ToOwned::to_owned),\n );\n Ok(None)\n }\n }\n None => Ok(None),\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Health", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Health {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/health\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::get().to(health)))\n .service(web::resource(\"/ready\").route(web::get().to(deep_health_check)))\n }\n}", + "after_code": "impl Health {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/health\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::get().to(health)))\n .service(web::resource(\"/ready\").route(web::get().to(deep_health_check)))\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::push_sessions_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn push_sessions_token(&mut self, token: api::SessionToken) {\n self.sessions_token.push(token);\n }", + "after_code": "fn push_sessions_token(&mut self, token: api::SessionToken) {\n self.sessions_token.push(token);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_surcharge_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }", + "after_code": "fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::PaymentMethods", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PaymentMethods;", + "after_code": "pub struct PaymentMethods;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_authentication", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>\n {\n todo!()\n }", + "after_code": "fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>\n {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_mandate_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_mandate_id(&self) -> Option<&payments_api::MandateIds> {\n todo!()\n }", + "after_code": "fn get_mandate_id(&self) -> Option<&payments_api::MandateIds> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_recurring_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_recurring_details(&self) -> Option<&RecurringDetails> {\n todo!()\n }", + "after_code": "fn get_recurring_details(&self) -> Option<&RecurringDetails> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::TokenizationConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct TokenizationConfig(pub HashMap);", + "after_code": "pub struct TokenizationConfig(pub HashMap);", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use diesel_models::enums::PaymentMethod;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use diesel_models::enums::{PaymentMethod, PaymentMethodType};", + "use diesel_models::enums::PaymentMethod;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_ephemeral_key", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_ephemeral_key(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_ephemeral_key(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_pm_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_pm_token(&mut self, _token: String) {\n !todo!()\n }", + "after_code": "fn set_pm_token(&mut self, _token: String) {\n !todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::store", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn store(&self) -> Box {\n self.store.to_owned()\n }", + "after_code": "fn store(&self) -> Box {\n self.store.to_owned()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_google_pay_connector_wallet_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_google_pay_connector_wallet_details(\n state: &SessionState,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n) -> Option {\n let google_pay_root_signing_keys = state\n .conf\n .google_pay_decrypt_keys\n .as_ref()\n .map(|google_pay_keys| google_pay_keys.google_pay_root_signing_keys.clone());\n match merchant_connector_account.get_connector_wallets_details() {\n Some(wallet_details) => {\n let google_pay_wallet_details = wallet_details\n .parse_value::(\n \"GooglePayWalletDetails\",\n )\n .map_err(|error| {\n logger::warn!(?error, \"Failed to Parse Value to GooglePayWalletDetails\")\n });\n\n google_pay_wallet_details\n .ok()\n .and_then(\n |google_pay_wallet_details| {\n match google_pay_wallet_details\n .google_pay\n .provider_details {\n api_models::payments::GooglePayProviderDetails::GooglePayMerchantDetails(merchant_details) => {\n match (\n merchant_details\n .merchant_info\n .tokenization_specification\n .parameters\n .private_key,\n google_pay_root_signing_keys,\n merchant_details\n .merchant_info\n .tokenization_specification\n .parameters\n .recipient_id,\n ) {\n (Some(google_pay_private_key), Some(google_pay_root_signing_keys), Some(google_pay_recipient_id)) => {\n Some(GooglePayPaymentProcessingDetails {\n google_pay_private_key,\n google_pay_root_signing_keys,\n google_pay_recipient_id\n })\n }\n _ => {\n logger::warn!(\"One or more of the following fields are missing in GooglePayMerchantDetails: google_pay_private_key, google_pay_root_signing_keys, google_pay_recipient_id\");\n None\n }\n }\n }\n }\n }\n )\n }\n None => None,\n }\n}", + "after_code": "fn get_google_pay_connector_wallet_details(\n state: &SessionState,\n merchant_connector_account: &helpers::MerchantConnectorAccountType,\n) -> Option {\n let google_pay_root_signing_keys = state\n .conf\n .google_pay_decrypt_keys\n .as_ref()\n .map(|google_pay_keys| google_pay_keys.google_pay_root_signing_keys.clone());\n match merchant_connector_account.get_connector_wallets_details() {\n Some(wallet_details) => {\n let google_pay_wallet_details = wallet_details\n .parse_value::(\n \"GooglePayWalletDetails\",\n )\n .map_err(|error| {\n logger::warn!(?error, \"Failed to Parse Value to GooglePayWalletDetails\")\n });\n\n google_pay_wallet_details\n .ok()\n .and_then(\n |google_pay_wallet_details| {\n match google_pay_wallet_details\n .google_pay\n .provider_details {\n api_models::payments::GooglePayProviderDetails::GooglePayMerchantDetails(merchant_details) => {\n match (\n merchant_details\n .merchant_info\n .tokenization_specification\n .parameters\n .private_key,\n google_pay_root_signing_keys,\n merchant_details\n .merchant_info\n .tokenization_specification\n .parameters\n .recipient_id,\n ) {\n (Some(google_pay_private_key), Some(google_pay_root_signing_keys), Some(google_pay_recipient_id)) => {\n Some(GooglePayPaymentProcessingDetails {\n google_pay_private_key,\n google_pay_root_signing_keys,\n google_pay_recipient_id\n })\n }\n _ => {\n logger::warn!(\"One or more of the following fields are missing in GooglePayMerchantDetails: google_pay_private_key, google_pay_root_signing_keys, google_pay_recipient_id\");\n None\n }\n }\n }\n }\n }\n )\n }\n None => None,\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::ActionTypesBuilder::function::with_card_network_transaction_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn with_card_network_transaction_id(\n mut self,\n is_card_with_ntid_flow: bool,\n payment_method_info: &domain::PaymentMethod,\n ) -> Self {\n if is_card_with_ntid_flow {\n self.action_types.extend(\n payment_method_info\n .network_transaction_id\n .as_ref()\n .map(|ntid| ActionType::CardWithNetworkTransactionId(ntid.clone())),\n );\n }\n self\n }", + "after_code": "pub fn with_card_network_transaction_id(\n mut self,\n is_card_with_ntid_flow: bool,\n payment_method_info: &domain::PaymentMethod,\n ) -> Self {\n if is_card_with_ntid_flow {\n self.action_types.extend(\n payment_method_info\n .network_transaction_id\n .as_ref()\n .map(|ntid| ActionType::CardWithNetworkTransactionId(ntid.clone())),\n );\n }\n self\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentEligibilityData::function::from_request", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn from_request(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n payments_eligibility_request: &api_models::payments::PaymentsEligibilityRequest,\n ) -> CustomResult {\n let key_manager_state = &(state).into();\n let payment_method_data = payments_eligibility_request\n .payment_method_data\n .payment_method_data\n .clone()\n .map(domain::PaymentMethodData::from);\n let browser_info = payments_eligibility_request\n .browser_info\n .clone()\n .map(|browser_info| {\n serde_json::to_value(browser_info)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Unable to encode payout method data\")\n })\n .transpose()?\n .map(pii::SecretSerdeValue::new);\n let payment_intent = state\n .store\n .find_payment_intent_by_payment_id_merchant_id(\n key_manager_state,\n &payments_eligibility_request.payment_id,\n merchant_context.get_merchant_account().get_id(),\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n Ok(Self {\n payment_method_data,\n browser_info,\n payment_intent,\n })\n }", + "after_code": "pub async fn from_request(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n payments_eligibility_request: &api_models::payments::PaymentsEligibilityRequest,\n ) -> CustomResult {\n let key_manager_state = &(state).into();\n let payment_method_data = payments_eligibility_request\n .payment_method_data\n .payment_method_data\n .clone()\n .map(domain::PaymentMethodData::from);\n let browser_info = payments_eligibility_request\n .browser_info\n .clone()\n .map(|browser_info| {\n serde_json::to_value(browser_info)\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Unable to encode payout method data\")\n })\n .transpose()?\n .map(pii::SecretSerdeValue::new);\n let payment_intent = state\n .store\n .find_payment_intent_by_payment_id_merchant_id(\n key_manager_state,\n &payments_eligibility_request.payment_id,\n merchant_context.get_merchant_account().get_id(),\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;\n Ok(Self {\n payment_method_data,\n browser_info,\n payment_intent,\n })\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::PaymentCancelData", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl OperationSessionSetters for PaymentCancelData {\n fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }\n\n fn set_client_secret(&mut self, _client_secret: Option>) {\n todo!()\n }\n\n fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }\n\n fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }\n\n fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }\n\n fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }\n\n fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }\n\n fn set_pm_token(&mut self, _token: String) {\n !todo!()\n }\n\n fn set_connector_customer_id(&mut self, _customer_id: Option) {\n // TODO: handle this case. Should we add connector_customer_id in PaymentCancelData?\n }\n\n fn push_sessions_token(&mut self, _token: api::SessionToken) {\n todo!()\n }\n\n fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }\n\n fn set_merchant_connector_id_in_attempt(\n &mut self,\n _merchant_connector_id: Option,\n ) {\n todo!()\n }\n\n fn set_card_network(&mut self, _card_network: enums::CardNetwork) {\n todo!()\n }\n\n fn set_co_badged_card_data(\n &mut self,\n _debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }\n\n fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }\n\n fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }\n\n fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }\n\n fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }\n\n fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }\n\n fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n todo!()\n }\n\n fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n prerouting_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(prerouting_algorithm);\n }\n\n fn set_connector_in_payment_attempt(&mut self, _connector: Option) {\n todo!()\n }\n\n fn set_connector_request_reference_id(&mut self, _reference_id: Option) {\n todo!()\n }\n\n fn set_connector_response_reference_id(&mut self, _reference_id: Option) {\n todo!()\n }\n\n fn set_vault_session_details(\n &mut self,\n _external_vault_session_details: Option,\n ) {\n todo!()\n }\n\n fn set_routing_approach_in_attempt(\n &mut self,\n _routing_approach: Option,\n ) {\n todo!()\n }\n\n fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n _connector_request_reference_id: String,\n ) {\n todo!()\n }\n\n fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n self.payment_attempt.cancellation_reason = cancellation_reason;\n }\n}", + "after_code": "impl OperationSessionSetters for PaymentCancelData {\n fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) {\n self.payment_intent = payment_intent;\n }\n\n fn set_client_secret(&mut self, _client_secret: Option>) {\n todo!()\n }\n\n fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }\n\n fn set_payment_method_data(&mut self, _payment_method_data: Option) {\n todo!()\n }\n\n fn set_payment_method_token(&mut self, _payment_method_token: Option) {\n todo!()\n }\n\n fn set_email_if_not_present(&mut self, _email: pii::Email) {\n todo!()\n }\n\n fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option) {\n todo!()\n }\n\n fn set_pm_token(&mut self, _token: String) {\n !todo!()\n }\n\n fn set_connector_customer_id(&mut self, _customer_id: Option) {\n // TODO: handle this case. Should we add connector_customer_id in PaymentCancelData?\n }\n\n fn push_sessions_token(&mut self, _token: api::SessionToken) {\n todo!()\n }\n\n fn set_surcharge_details(&mut self, _surcharge_details: Option) {\n todo!()\n }\n\n fn set_merchant_connector_id_in_attempt(\n &mut self,\n _merchant_connector_id: Option,\n ) {\n todo!()\n }\n\n fn set_card_network(&mut self, _card_network: enums::CardNetwork) {\n todo!()\n }\n\n fn set_co_badged_card_data(\n &mut self,\n _debit_routing_output: &api_models::open_router::DebitRoutingOutput,\n ) {\n todo!()\n }\n\n fn set_frm_message(&mut self, _frm_message: FraudCheck) {\n todo!()\n }\n\n fn set_payment_intent_status(&mut self, status: storage_enums::IntentStatus) {\n self.payment_intent.status = status;\n }\n\n fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }\n\n fn set_recurring_mandate_payment_data(\n &mut self,\n _recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n todo!()\n }\n\n fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) {\n todo!()\n }\n\n fn set_setup_future_usage_in_payment_intent(\n &mut self,\n setup_future_usage: storage_enums::FutureUsage,\n ) {\n todo!()\n }\n\n fn set_prerouting_algorithm_in_payment_intent(\n &mut self,\n prerouting_algorithm: storage::PaymentRoutingInfo,\n ) {\n self.payment_intent.prerouting_algorithm = Some(prerouting_algorithm);\n }\n\n fn set_connector_in_payment_attempt(&mut self, _connector: Option) {\n todo!()\n }\n\n fn set_connector_request_reference_id(&mut self, _reference_id: Option) {\n todo!()\n }\n\n fn set_connector_response_reference_id(&mut self, _reference_id: Option) {\n todo!()\n }\n\n fn set_vault_session_details(\n &mut self,\n _external_vault_session_details: Option,\n ) {\n todo!()\n }\n\n fn set_routing_approach_in_attempt(\n &mut self,\n _routing_approach: Option,\n ) {\n todo!()\n }\n\n fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n _connector_request_reference_id: String,\n ) {\n todo!()\n }\n\n fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n self.payment_attempt.cancellation_reason = cancellation_reason;\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::future;", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ], + "after_imports": [ + "use std::future;", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::DummyConnector", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct DummyConnector;", + "after_code": "pub struct DummyConnector;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Refunds::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/v2/refunds\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n route =\n route.service(web::resource(\"/list\").route(web::post().to(refunds::refunds_list)));\n }\n #[cfg(feature = \"oltp\")]\n {\n route = route\n .service(web::resource(\"\").route(web::post().to(refunds::refunds_create)))\n .service(\n web::resource(\"/{id}\")\n .route(web::get().to(refunds::refunds_retrieve))\n .route(web::post().to(refunds::refunds_retrieve_with_gateway_creds)),\n )\n .service(\n web::resource(\"/{id}/update-metadata\")\n .route(web::put().to(refunds::refunds_metadata_update)),\n );\n }\n\n route\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n let mut route = web::scope(\"/v2/refunds\").app_data(web::Data::new(state));\n\n #[cfg(feature = \"olap\")]\n {\n route =\n route.service(web::resource(\"/list\").route(web::post().to(refunds::refunds_list)));\n }\n #[cfg(feature = \"oltp\")]\n {\n route = route\n .service(web::resource(\"\").route(web::post().to(refunds::refunds_create)))\n .service(\n web::resource(\"/{id}\")\n .route(web::get().to(refunds::refunds_retrieve))\n .route(web::post().to(refunds::refunds_retrieve_with_gateway_creds)),\n )\n .service(\n web::resource(\"/{id}/update-metadata\")\n .route(web::put().to(refunds::refunds_metadata_update)),\n );\n }\n\n route\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::refunds;", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use super::refunds;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::should_update_in_update_tracker", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn should_update_in_update_tracker(&self) -> bool {\n let payment_method_type = self\n .payment_intent\n .tax_details\n .as_ref()\n .and_then(|tax_details| tax_details.payment_method_type.as_ref().map(|pmt| pmt.pmt));\n\n matches!(\n payment_method_type,\n Some(storage_enums::PaymentMethodType::ApplePay)\n | Some(storage_enums::PaymentMethodType::GooglePay)\n )\n }", + "after_code": "fn should_update_in_update_tracker(&self) -> bool {\n let payment_method_type = self\n .payment_intent\n .tax_details\n .as_ref()\n .and_then(|tax_details| tax_details.payment_method_type.as_ref().map(|pmt| pmt.pmt));\n\n matches!(\n payment_method_type,\n Some(storage_enums::PaymentMethodType::ApplePay)\n | Some(storage_enums::PaymentMethodType::GooglePay)\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::PaymentLink", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PaymentLink {\n pub sdk_url: url::Url,\n}", + "after_code": "pub struct PaymentLink {\n pub sdk_url: url::Url,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::DummyConnector", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct DummyConnector {\n pub enabled: bool,\n pub payment_ttl: i64,\n pub payment_duration: u64,\n pub payment_tolerance: u64,\n pub payment_retrieve_duration: u64,\n pub payment_retrieve_tolerance: u64,\n pub payment_complete_duration: i64,\n pub payment_complete_tolerance: i64,\n pub refund_ttl: i64,\n pub refund_duration: u64,\n pub refund_tolerance: u64,\n pub refund_retrieve_duration: u64,\n pub refund_retrieve_tolerance: u64,\n pub authorize_ttl: i64,\n pub assets_base_url: String,\n pub default_return_url: String,\n pub slack_invite_url: String,\n pub discord_invite_url: String,\n}", + "after_code": "pub struct DummyConnector {\n pub enabled: bool,\n pub payment_ttl: i64,\n pub payment_duration: u64,\n pub payment_tolerance: u64,\n pub payment_retrieve_duration: u64,\n pub payment_retrieve_tolerance: u64,\n pub payment_complete_duration: i64,\n pub payment_complete_tolerance: i64,\n pub refund_ttl: i64,\n pub refund_duration: u64,\n pub refund_tolerance: u64,\n pub refund_retrieve_duration: u64,\n pub refund_retrieve_tolerance: u64,\n pub authorize_ttl: i64,\n pub assets_base_url: String,\n pub default_return_url: String,\n pub slack_invite_url: String,\n pub discord_invite_url: String,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_authentication_type_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_authentication_type_in_attempt(\n &mut self,\n _authentication_type: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::mod::helpers", + "file": "crates/router/src/core/payments.rs", + "kind": "mod_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub mod helpers;", + "after_code": "pub mod helpers;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::payments_operation_core", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn payments_operation_core<'a, F, Req, Op, FData, D>(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n profile_id_from_auth_layer: Option,\n operation: Op,\n req: Req,\n call_connector_action: CallConnectorAction,\n shadow_ucs_call_connector_action: Option,\n auth_flow: services::AuthFlow,\n eligible_connectors: Option>,\n header_payload: HeaderPayload,\n) -> RouterResult<(D, Req, Option, Option, Option)>\nwhere\n F: Send + Clone + Sync + 'static,\n Req: Authenticate + Clone,\n Op: Operation + Send + Sync,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n\n // To create connector flow specific interface data\n D: ConstructFlowSpecificData,\n RouterData: Feature,\n\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n\n // To perform router related operation for PaymentResponse\n PaymentResponse: Operation,\n FData: Send + Sync + Clone + router_types::Capturable + 'static + serde::Serialize,\n{\n let operation: BoxedOperation<'_, F, Req, D> = Box::new(operation);\n\n tracing::Span::current().record(\n \"merchant_id\",\n merchant_context\n .get_merchant_account()\n .get_id()\n .get_string_repr(),\n );\n let (operation, validate_result) = operation\n .to_validate_request()?\n .validate_request(&req, merchant_context)?;\n\n tracing::Span::current().record(\"payment_id\", format!(\"{}\", validate_result.payment_id));\n // get profile from headers\n let operations::GetTrackerResponse {\n operation,\n customer_details,\n mut payment_data,\n business_profile,\n mandate_type,\n } = operation\n .to_get_tracker()?\n .get_trackers(\n state,\n &validate_result.payment_id,\n &req,\n merchant_context,\n auth_flow,\n &header_payload,\n )\n .await?;\n\n operation\n .to_get_tracker()?\n .validate_request_with_state(state, &req, &mut payment_data, &business_profile)\n .await?;\n\n core_utils::validate_profile_id_from_auth_layer(\n profile_id_from_auth_layer,\n &payment_data.get_payment_intent().clone(),\n )?;\n\n let (operation, customer) = operation\n .to_domain()?\n // get_customer_details\n .get_or_create_customer_details(\n state,\n &mut payment_data,\n customer_details,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::CustomerNotFound)\n .attach_printable(\"Failed while fetching/creating customer\")?;\n\n let authentication_type =\n call_decision_manager(state, merchant_context, &business_profile, &payment_data).await?;\n\n payment_data.set_authentication_type_in_attempt(authentication_type);\n\n let connector = get_connector_choice(\n &operation,\n state,\n &req,\n merchant_context,\n &business_profile,\n &mut payment_data,\n eligible_connectors,\n mandate_type,\n )\n .await?;\n\n let payment_method_token = get_decrypted_wallet_payment_method_token(\n &operation,\n state,\n merchant_context,\n &mut payment_data,\n connector.as_ref(),\n )\n .await?;\n\n payment_method_token.map(|token| payment_data.set_payment_method_token(Some(token)));\n\n let (connector, debit_routing_output) = debit_routing::perform_debit_routing(\n &operation,\n state,\n &business_profile,\n &mut payment_data,\n connector,\n )\n .await;\n\n operation\n .to_domain()?\n .apply_three_ds_authentication_strategy(state, &mut payment_data, &business_profile)\n .await?;\n\n let should_add_task_to_process_tracker = should_add_task_to_process_tracker(&payment_data);\n\n let locale = header_payload.locale.clone();\n\n payment_data = tokenize_in_router_when_confirm_false_or_external_authentication(\n state,\n &operation,\n &mut payment_data,\n &validate_result,\n merchant_context.get_merchant_key_store(),\n &customer,\n &business_profile,\n )\n .await?;\n\n let mut connector_http_status_code = None;\n let mut external_latency = None;\n if let Some(connector_details) = connector {\n // Fetch and check FRM configs\n #[cfg(feature = \"frm\")]\n let mut frm_info = None;\n #[allow(unused_variables, unused_mut)]\n let mut should_continue_transaction: bool = true;\n #[cfg(feature = \"frm\")]\n let mut should_continue_capture: bool = true;\n #[cfg(feature = \"frm\")]\n let frm_configs = if state.conf.frm.enabled {\n Box::pin(frm_core::call_frm_before_connector_call(\n &operation,\n merchant_context,\n &mut payment_data,\n state,\n &mut frm_info,\n &customer,\n &mut should_continue_transaction,\n &mut should_continue_capture,\n ))\n .await?\n } else {\n None\n };\n #[cfg(feature = \"frm\")]\n logger::debug!(\n \"frm_configs: {:?}\\nshould_continue_transaction: {:?}\\nshould_continue_capture: {:?}\",\n frm_configs,\n should_continue_transaction,\n should_continue_capture,\n );\n\n let is_eligible_for_uas = helpers::is_merchant_eligible_authentication_service(\n merchant_context.get_merchant_account().get_id(),\n state,\n )\n .await?;\n\n if is_eligible_for_uas {\n operation\n .to_domain()?\n .call_unified_authentication_service_if_eligible(\n state,\n &mut payment_data,\n &mut should_continue_transaction,\n &connector_details,\n &business_profile,\n merchant_context.get_merchant_key_store(),\n mandate_type,\n )\n .await?;\n } else {\n logger::info!(\n \"skipping authentication service call since the merchant is not eligible.\"\n );\n\n operation\n .to_domain()?\n .call_external_three_ds_authentication_if_eligible(\n state,\n &mut payment_data,\n &mut should_continue_transaction,\n &connector_details,\n &business_profile,\n merchant_context.get_merchant_key_store(),\n mandate_type,\n )\n .await?;\n };\n\n operation\n .to_domain()?\n .payments_dynamic_tax_calculation(\n state,\n &mut payment_data,\n &connector_details,\n &business_profile,\n merchant_context,\n )\n .await?;\n\n if should_continue_transaction {\n #[cfg(feature = \"frm\")]\n match (\n should_continue_capture,\n payment_data.get_payment_attempt().capture_method,\n ) {\n (\n false,\n Some(storage_enums::CaptureMethod::Automatic)\n | Some(storage_enums::CaptureMethod::SequentialAutomatic),\n )\n | (false, Some(storage_enums::CaptureMethod::Scheduled)) => {\n if let Some(info) = &mut frm_info {\n if let Some(frm_data) = &mut info.frm_data {\n frm_data.fraud_check.payment_capture_method =\n payment_data.get_payment_attempt().capture_method;\n }\n }\n payment_data\n .set_capture_method_in_attempt(storage_enums::CaptureMethod::Manual);\n logger::debug!(\"payment_id : {:?} capture method has been changed to manual, since it has configured Post FRM flow\",payment_data.get_payment_attempt().payment_id);\n }\n _ => (),\n };\n\n payment_data = match connector_details {\n ConnectorCallType::PreDetermined(ref connector) => {\n #[cfg(all(feature = \"dynamic_routing\", feature = \"v1\"))]\n let routable_connectors = convert_connector_data_to_routable_connectors(\n std::slice::from_ref(connector),\n )\n .map_err(|e| logger::error!(routable_connector_error=?e))\n .unwrap_or_default();\n let schedule_time = if should_add_task_to_process_tracker {\n payment_sync::get_sync_process_schedule_time(\n &*state.store,\n connector.connector_data.connector.id(),\n merchant_context.get_merchant_account().get_id(),\n 0,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed while getting process schedule time\")?\n } else {\n None\n };\n\n let (merchant_connector_account, router_data, tokenization_action) =\n call_connector_service_prerequisites(\n state,\n merchant_context,\n connector.connector_data.clone(),\n &operation,\n &mut payment_data,\n &customer,\n &validate_result,\n &business_profile,\n false,\n None,\n )\n .await?;\n\n let (router_data, mca) = decide_unified_connector_service_call(\n state,\n req_state.clone(),\n merchant_context,\n connector.connector_data.clone(),\n &operation,\n &mut payment_data,\n &customer,\n call_connector_action.clone(),\n shadow_ucs_call_connector_action.clone(),\n &validate_result,\n schedule_time,\n header_payload.clone(),\n #[cfg(feature = \"frm\")]\n frm_info.as_ref().and_then(|fi| fi.suggested_action),\n #[cfg(not(feature = \"frm\"))]\n None,\n &business_profile,\n false,\n ::should_return_raw_response(&req),\n merchant_connector_account,\n router_data,\n tokenization_action,\n )\n .await?;\n\n let op_ref = &operation;\n let should_trigger_post_processing_flows = is_operation_confirm(&operation);\n\n let operation = Box::new(PaymentResponse);\n\n connector_http_status_code = router_data.connector_http_status_code;\n external_latency = router_data.external_latency;\n //add connector http status code metrics\n add_connector_http_status_code_metrics(connector_http_status_code);\n\n operation\n .to_post_update_tracker()?\n .save_pm_and_mandate(\n state,\n &router_data,\n merchant_context,\n &mut payment_data,\n &business_profile,\n )\n .await?;\n\n let mut payment_data = operation\n .to_post_update_tracker()?\n .update_tracker(\n state,\n payment_data,\n router_data,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n &locale,\n #[cfg(all(feature = \"dynamic_routing\", feature = \"v1\"))]\n routable_connectors,\n #[cfg(all(feature = \"dynamic_routing\", feature = \"v1\"))]\n &business_profile,\n )\n .await?;\n\n if should_trigger_post_processing_flows {\n complete_postprocessing_steps_if_required(\n state,\n merchant_context,\n &customer,\n &mca,\n &connector.connector_data,\n &mut payment_data,\n op_ref,\n Some(header_payload.clone()),\n )\n .await?;\n }\n\n if is_eligible_for_uas {\n complete_confirmation_for_click_to_pay_if_required(\n state,\n merchant_context,\n &payment_data,\n )\n .await?;\n }\n\n payment_data\n }\n\n ConnectorCallType::Retryable(ref connectors) => {\n #[cfg(all(feature = \"dynamic_routing\", feature = \"v1\"))]\n let routable_connectors =\n convert_connector_data_to_routable_connectors(connectors)\n .map_err(|e| logger::error!(routable_connector_error=?e))\n .unwrap_or_default();\n\n let mut connectors = connectors.clone().into_iter();\n\n let (connector_data, routing_decision) =\n get_connector_data_with_routing_decision(\n &mut connectors,\n &business_profile,\n debit_routing_output,\n )?;\n\n let schedule_time = if should_add_task_to_process_tracker {\n payment_sync::get_sync_process_schedule_time(\n &*state.store,\n connector_data.connector.id(),\n merchant_context.get_merchant_account().get_id(),\n 0,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed while getting process schedule time\")?\n } else {\n None\n };\n\n let (merchant_connector_account, router_data, tokenization_action) =\n call_connector_service_prerequisites(\n state,\n merchant_context,\n connector_data.clone(),\n &operation,\n &mut payment_data,\n &customer,\n &validate_result,\n &business_profile,\n false,\n routing_decision,\n )\n .await?;\n\n let (router_data, mca) = decide_unified_connector_service_call(\n state,\n req_state.clone(),\n merchant_context,\n connector_data.clone(),\n &operation,\n &mut payment_data,\n &customer,\n call_connector_action.clone(),\n shadow_ucs_call_connector_action,\n &validate_result,\n schedule_time,\n header_payload.clone(),\n #[cfg(feature = \"frm\")]\n frm_info.as_ref().and_then(|fi| fi.suggested_action),\n #[cfg(not(feature = \"frm\"))]\n None,\n &business_profile,\n false,\n ::should_return_raw_response(&req),\n merchant_connector_account,\n router_data,\n tokenization_action,\n )\n .await?;\n\n #[cfg(all(feature = \"retry\", feature = \"v1\"))]\n let mut router_data = router_data;\n #[cfg(all(feature = \"retry\", feature = \"v1\"))]\n {\n use crate::core::payments::retry::{self, GsmValidation};\n let config_bool = retry::config_should_call_gsm(\n &*state.store,\n merchant_context.get_merchant_account().get_id(),\n &business_profile,\n )\n .await;\n\n if config_bool && router_data.should_call_gsm() {\n router_data = retry::do_gsm_actions(\n state,\n req_state.clone(),\n &mut payment_data,\n connectors,\n &connector_data,\n router_data,\n merchant_context,\n &operation,\n &customer,\n &validate_result,\n schedule_time,\n #[cfg(feature = \"frm\")]\n frm_info.as_ref().and_then(|fi| fi.suggested_action),\n #[cfg(not(feature = \"frm\"))]\n None,\n &business_profile,\n )\n .await?;\n };\n }\n\n let op_ref = &operation;\n let should_trigger_post_processing_flows = is_operation_confirm(&operation);\n\n let operation = Box::new(PaymentResponse);\n connector_http_status_code = router_data.connector_http_status_code;\n external_latency = router_data.external_latency;\n //add connector http status code metrics\n add_connector_http_status_code_metrics(connector_http_status_code);\n\n operation\n .to_post_update_tracker()?\n .save_pm_and_mandate(\n state,\n &router_data,\n merchant_context,\n &mut payment_data,\n &business_profile,\n )\n .await?;\n\n let mut payment_data = operation\n .to_post_update_tracker()?\n .update_tracker(\n state,\n payment_data,\n router_data,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n &locale,\n #[cfg(all(feature = \"dynamic_routing\", feature = \"v1\"))]\n routable_connectors,\n #[cfg(all(feature = \"dynamic_routing\", feature = \"v1\"))]\n &business_profile,\n )\n .await?;\n\n if should_trigger_post_processing_flows {\n complete_postprocessing_steps_if_required(\n state,\n merchant_context,\n &customer,\n &mca,\n &connector_data,\n &mut payment_data,\n op_ref,\n Some(header_payload.clone()),\n )\n .await?;\n }\n\n if is_eligible_for_uas {\n complete_confirmation_for_click_to_pay_if_required(\n state,\n merchant_context,\n &payment_data,\n )\n .await?;\n }\n\n payment_data\n }\n\n ConnectorCallType::SessionMultiple(connectors) => {\n let session_surcharge_details =\n call_surcharge_decision_management_for_session_flow(\n state,\n merchant_context,\n &business_profile,\n payment_data.get_payment_attempt(),\n payment_data.get_payment_intent(),\n payment_data.get_billing_address(),\n &connectors,\n )\n .await?;\n Box::pin(call_multiple_connectors_service(\n state,\n merchant_context,\n connectors,\n &operation,\n payment_data,\n &customer,\n session_surcharge_details,\n &business_profile,\n header_payload.clone(),\n ::should_return_raw_response(&req),\n ))\n .await?\n }\n };\n\n #[cfg(feature = \"frm\")]\n if let Some(fraud_info) = &mut frm_info {\n #[cfg(feature = \"v1\")]\n Box::pin(frm_core::post_payment_frm_core(\n state,\n req_state,\n merchant_context,\n &mut payment_data,\n fraud_info,\n frm_configs\n .clone()\n .ok_or(errors::ApiErrorResponse::MissingRequiredField {\n field_name: \"frm_configs\",\n })\n .attach_printable(\"Frm configs label not found\")?,\n &customer,\n &mut should_continue_capture,\n ))\n .await?;\n }\n } else {\n (_, payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data.clone(),\n customer.clone(),\n validate_result.storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n #[cfg(feature = \"frm\")]\n frm_info.and_then(|info| info.suggested_action),\n #[cfg(not(feature = \"frm\"))]\n None,\n header_payload.clone(),\n )\n .await?;\n }\n\n let payment_intent_status = payment_data.get_payment_intent().status;\n\n payment_data\n .get_payment_attempt()\n .payment_token\n .as_ref()\n .zip(payment_data.get_payment_attempt().payment_method)\n .map(ParentPaymentMethodToken::create_key_for_token)\n .async_map(|key_for_hyperswitch_token| async move {\n if key_for_hyperswitch_token\n .should_delete_payment_method_token(payment_intent_status)\n {\n let _ = key_for_hyperswitch_token.delete(state).await;\n }\n })\n .await;\n } else {\n (_, payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data.clone(),\n customer.clone(),\n validate_result.storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n None,\n header_payload.clone(),\n )\n .await?;\n }\n\n let cloned_payment_data = payment_data.clone();\n let cloned_customer = customer.clone();\n\n #[cfg(feature = \"v1\")]\n operation\n .to_domain()?\n .store_extended_card_info_temporarily(\n state,\n payment_data.get_payment_intent().get_id(),\n &business_profile,\n payment_data.get_payment_method_data(),\n )\n .await?;\n\n utils::trigger_payments_webhook(\n merchant_context.clone(),\n business_profile,\n cloned_payment_data,\n cloned_customer,\n state,\n operation,\n )\n .await\n .map_err(|error| logger::warn!(payments_outgoing_webhook_error=?error))\n .ok();\n\n Ok((\n payment_data,\n req,\n customer,\n connector_http_status_code,\n external_latency,\n ))\n}", + "after_code": "pub async fn payments_operation_core<'a, F, Req, Op, FData, D>(\n state: &SessionState,\n req_state: ReqState,\n merchant_context: &domain::MerchantContext,\n profile_id_from_auth_layer: Option,\n operation: Op,\n req: Req,\n call_connector_action: CallConnectorAction,\n shadow_ucs_call_connector_action: Option,\n auth_flow: services::AuthFlow,\n eligible_connectors: Option>,\n header_payload: HeaderPayload,\n) -> RouterResult<(D, Req, Option, Option, Option)>\nwhere\n F: Send + Clone + Sync + 'static,\n Req: Authenticate + Clone,\n Op: Operation + Send + Sync,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n\n // To create connector flow specific interface data\n D: ConstructFlowSpecificData,\n RouterData: Feature,\n\n // To construct connector flow specific api\n dyn api::Connector:\n services::api::ConnectorIntegration,\n\n // To perform router related operation for PaymentResponse\n PaymentResponse: Operation,\n FData: Send + Sync + Clone + router_types::Capturable + 'static + serde::Serialize,\n{\n let operation: BoxedOperation<'_, F, Req, D> = Box::new(operation);\n\n tracing::Span::current().record(\n \"merchant_id\",\n merchant_context\n .get_merchant_account()\n .get_id()\n .get_string_repr(),\n );\n let (operation, validate_result) = operation\n .to_validate_request()?\n .validate_request(&req, merchant_context)?;\n\n tracing::Span::current().record(\"payment_id\", format!(\"{}\", validate_result.payment_id));\n // get profile from headers\n let operations::GetTrackerResponse {\n operation,\n customer_details,\n mut payment_data,\n business_profile,\n mandate_type,\n } = operation\n .to_get_tracker()?\n .get_trackers(\n state,\n &validate_result.payment_id,\n &req,\n merchant_context,\n auth_flow,\n &header_payload,\n )\n .await?;\n\n operation\n .to_get_tracker()?\n .validate_request_with_state(state, &req, &mut payment_data, &business_profile)\n .await?;\n\n core_utils::validate_profile_id_from_auth_layer(\n profile_id_from_auth_layer,\n &payment_data.get_payment_intent().clone(),\n )?;\n\n let (operation, customer) = operation\n .to_domain()?\n // get_customer_details\n .get_or_create_customer_details(\n state,\n &mut payment_data,\n customer_details,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::CustomerNotFound)\n .attach_printable(\"Failed while fetching/creating customer\")?;\n\n let authentication_type =\n call_decision_manager(state, merchant_context, &business_profile, &payment_data).await?;\n\n payment_data.set_authentication_type_in_attempt(authentication_type);\n\n let connector = get_connector_choice(\n &operation,\n state,\n &req,\n merchant_context,\n &business_profile,\n &mut payment_data,\n eligible_connectors,\n mandate_type,\n )\n .await?;\n\n let payment_method_token = get_decrypted_wallet_payment_method_token(\n &operation,\n state,\n merchant_context,\n &mut payment_data,\n connector.as_ref(),\n )\n .await?;\n\n payment_method_token.map(|token| payment_data.set_payment_method_token(Some(token)));\n\n let (connector, debit_routing_output) = debit_routing::perform_debit_routing(\n &operation,\n state,\n &business_profile,\n &mut payment_data,\n connector,\n )\n .await;\n\n operation\n .to_domain()?\n .apply_three_ds_authentication_strategy(state, &mut payment_data, &business_profile)\n .await?;\n\n let should_add_task_to_process_tracker = should_add_task_to_process_tracker(&payment_data);\n\n let locale = header_payload.locale.clone();\n\n payment_data = tokenize_in_router_when_confirm_false_or_external_authentication(\n state,\n &operation,\n &mut payment_data,\n &validate_result,\n merchant_context.get_merchant_key_store(),\n &customer,\n &business_profile,\n )\n .await?;\n\n let mut connector_http_status_code = None;\n let mut external_latency = None;\n if let Some(connector_details) = connector {\n // Fetch and check FRM configs\n #[cfg(feature = \"frm\")]\n let mut frm_info = None;\n #[allow(unused_variables, unused_mut)]\n let mut should_continue_transaction: bool = true;\n #[cfg(feature = \"frm\")]\n let mut should_continue_capture: bool = true;\n #[cfg(feature = \"frm\")]\n let frm_configs = if state.conf.frm.enabled {\n Box::pin(frm_core::call_frm_before_connector_call(\n &operation,\n merchant_context,\n &mut payment_data,\n state,\n &mut frm_info,\n &customer,\n &mut should_continue_transaction,\n &mut should_continue_capture,\n ))\n .await?\n } else {\n None\n };\n #[cfg(feature = \"frm\")]\n logger::debug!(\n \"frm_configs: {:?}\\nshould_continue_transaction: {:?}\\nshould_continue_capture: {:?}\",\n frm_configs,\n should_continue_transaction,\n should_continue_capture,\n );\n\n let is_eligible_for_uas = helpers::is_merchant_eligible_authentication_service(\n merchant_context.get_merchant_account().get_id(),\n state,\n )\n .await?;\n\n if is_eligible_for_uas {\n operation\n .to_domain()?\n .call_unified_authentication_service_if_eligible(\n state,\n &mut payment_data,\n &mut should_continue_transaction,\n &connector_details,\n &business_profile,\n merchant_context.get_merchant_key_store(),\n mandate_type,\n )\n .await?;\n } else {\n logger::info!(\n \"skipping authentication service call since the merchant is not eligible.\"\n );\n\n operation\n .to_domain()?\n .call_external_three_ds_authentication_if_eligible(\n state,\n &mut payment_data,\n &mut should_continue_transaction,\n &connector_details,\n &business_profile,\n merchant_context.get_merchant_key_store(),\n mandate_type,\n )\n .await?;\n };\n\n operation\n .to_domain()?\n .payments_dynamic_tax_calculation(\n state,\n &mut payment_data,\n &connector_details,\n &business_profile,\n merchant_context,\n )\n .await?;\n\n if should_continue_transaction {\n #[cfg(feature = \"frm\")]\n match (\n should_continue_capture,\n payment_data.get_payment_attempt().capture_method,\n ) {\n (\n false,\n Some(storage_enums::CaptureMethod::Automatic)\n | Some(storage_enums::CaptureMethod::SequentialAutomatic),\n )\n | (false, Some(storage_enums::CaptureMethod::Scheduled)) => {\n if let Some(info) = &mut frm_info {\n if let Some(frm_data) = &mut info.frm_data {\n frm_data.fraud_check.payment_capture_method =\n payment_data.get_payment_attempt().capture_method;\n }\n }\n payment_data\n .set_capture_method_in_attempt(storage_enums::CaptureMethod::Manual);\n logger::debug!(\"payment_id : {:?} capture method has been changed to manual, since it has configured Post FRM flow\",payment_data.get_payment_attempt().payment_id);\n }\n _ => (),\n };\n\n payment_data = match connector_details {\n ConnectorCallType::PreDetermined(ref connector) => {\n #[cfg(all(feature = \"dynamic_routing\", feature = \"v1\"))]\n let routable_connectors = convert_connector_data_to_routable_connectors(\n std::slice::from_ref(connector),\n )\n .map_err(|e| logger::error!(routable_connector_error=?e))\n .unwrap_or_default();\n let schedule_time = if should_add_task_to_process_tracker {\n payment_sync::get_sync_process_schedule_time(\n &*state.store,\n connector.connector_data.connector.id(),\n merchant_context.get_merchant_account().get_id(),\n 0,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed while getting process schedule time\")?\n } else {\n None\n };\n\n let (merchant_connector_account, router_data, tokenization_action) =\n call_connector_service_prerequisites(\n state,\n merchant_context,\n connector.connector_data.clone(),\n &operation,\n &mut payment_data,\n &customer,\n &validate_result,\n &business_profile,\n false,\n None,\n )\n .await?;\n\n let (router_data, mca) = decide_unified_connector_service_call(\n state,\n req_state.clone(),\n merchant_context,\n connector.connector_data.clone(),\n &operation,\n &mut payment_data,\n &customer,\n call_connector_action.clone(),\n shadow_ucs_call_connector_action.clone(),\n &validate_result,\n schedule_time,\n header_payload.clone(),\n #[cfg(feature = \"frm\")]\n frm_info.as_ref().and_then(|fi| fi.suggested_action),\n #[cfg(not(feature = \"frm\"))]\n None,\n &business_profile,\n false,\n ::should_return_raw_response(&req),\n merchant_connector_account,\n router_data,\n tokenization_action,\n )\n .await?;\n\n let op_ref = &operation;\n let should_trigger_post_processing_flows = is_operation_confirm(&operation);\n\n let operation = Box::new(PaymentResponse);\n\n connector_http_status_code = router_data.connector_http_status_code;\n external_latency = router_data.external_latency;\n //add connector http status code metrics\n add_connector_http_status_code_metrics(connector_http_status_code);\n\n operation\n .to_post_update_tracker()?\n .save_pm_and_mandate(\n state,\n &router_data,\n merchant_context,\n &mut payment_data,\n &business_profile,\n )\n .await?;\n\n let mut payment_data = operation\n .to_post_update_tracker()?\n .update_tracker(\n state,\n payment_data,\n router_data,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n &locale,\n #[cfg(all(feature = \"dynamic_routing\", feature = \"v1\"))]\n routable_connectors,\n #[cfg(all(feature = \"dynamic_routing\", feature = \"v1\"))]\n &business_profile,\n )\n .await?;\n\n if should_trigger_post_processing_flows {\n complete_postprocessing_steps_if_required(\n state,\n merchant_context,\n &customer,\n &mca,\n &connector.connector_data,\n &mut payment_data,\n op_ref,\n Some(header_payload.clone()),\n )\n .await?;\n }\n\n if is_eligible_for_uas {\n complete_confirmation_for_click_to_pay_if_required(\n state,\n merchant_context,\n &payment_data,\n )\n .await?;\n }\n\n payment_data\n }\n\n ConnectorCallType::Retryable(ref connectors) => {\n #[cfg(all(feature = \"dynamic_routing\", feature = \"v1\"))]\n let routable_connectors =\n convert_connector_data_to_routable_connectors(connectors)\n .map_err(|e| logger::error!(routable_connector_error=?e))\n .unwrap_or_default();\n\n let mut connectors = connectors.clone().into_iter();\n\n let (connector_data, routing_decision) =\n get_connector_data_with_routing_decision(\n &mut connectors,\n &business_profile,\n debit_routing_output,\n )?;\n\n let schedule_time = if should_add_task_to_process_tracker {\n payment_sync::get_sync_process_schedule_time(\n &*state.store,\n connector_data.connector.id(),\n merchant_context.get_merchant_account().get_id(),\n 0,\n )\n .await\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed while getting process schedule time\")?\n } else {\n None\n };\n\n let (merchant_connector_account, router_data, tokenization_action) =\n call_connector_service_prerequisites(\n state,\n merchant_context,\n connector_data.clone(),\n &operation,\n &mut payment_data,\n &customer,\n &validate_result,\n &business_profile,\n false,\n routing_decision,\n )\n .await?;\n\n let (router_data, mca) = decide_unified_connector_service_call(\n state,\n req_state.clone(),\n merchant_context,\n connector_data.clone(),\n &operation,\n &mut payment_data,\n &customer,\n call_connector_action.clone(),\n shadow_ucs_call_connector_action,\n &validate_result,\n schedule_time,\n header_payload.clone(),\n #[cfg(feature = \"frm\")]\n frm_info.as_ref().and_then(|fi| fi.suggested_action),\n #[cfg(not(feature = \"frm\"))]\n None,\n &business_profile,\n false,\n ::should_return_raw_response(&req),\n merchant_connector_account,\n router_data,\n tokenization_action,\n )\n .await?;\n\n #[cfg(all(feature = \"retry\", feature = \"v1\"))]\n let mut router_data = router_data;\n #[cfg(all(feature = \"retry\", feature = \"v1\"))]\n {\n use crate::core::payments::retry::{self, GsmValidation};\n let config_bool = retry::config_should_call_gsm(\n &*state.store,\n merchant_context.get_merchant_account().get_id(),\n &business_profile,\n )\n .await;\n\n if config_bool && router_data.should_call_gsm() {\n router_data = retry::do_gsm_actions(\n state,\n req_state.clone(),\n &mut payment_data,\n connectors,\n &connector_data,\n router_data,\n merchant_context,\n &operation,\n &customer,\n &validate_result,\n schedule_time,\n #[cfg(feature = \"frm\")]\n frm_info.as_ref().and_then(|fi| fi.suggested_action),\n #[cfg(not(feature = \"frm\"))]\n None,\n &business_profile,\n )\n .await?;\n };\n }\n\n let op_ref = &operation;\n let should_trigger_post_processing_flows = is_operation_confirm(&operation);\n\n let operation = Box::new(PaymentResponse);\n connector_http_status_code = router_data.connector_http_status_code;\n external_latency = router_data.external_latency;\n //add connector http status code metrics\n add_connector_http_status_code_metrics(connector_http_status_code);\n\n operation\n .to_post_update_tracker()?\n .save_pm_and_mandate(\n state,\n &router_data,\n merchant_context,\n &mut payment_data,\n &business_profile,\n )\n .await?;\n\n let mut payment_data = operation\n .to_post_update_tracker()?\n .update_tracker(\n state,\n payment_data,\n router_data,\n merchant_context.get_merchant_key_store(),\n merchant_context.get_merchant_account().storage_scheme,\n &locale,\n #[cfg(all(feature = \"dynamic_routing\", feature = \"v1\"))]\n routable_connectors,\n #[cfg(all(feature = \"dynamic_routing\", feature = \"v1\"))]\n &business_profile,\n )\n .await?;\n\n if should_trigger_post_processing_flows {\n complete_postprocessing_steps_if_required(\n state,\n merchant_context,\n &customer,\n &mca,\n &connector_data,\n &mut payment_data,\n op_ref,\n Some(header_payload.clone()),\n )\n .await?;\n }\n\n if is_eligible_for_uas {\n complete_confirmation_for_click_to_pay_if_required(\n state,\n merchant_context,\n &payment_data,\n )\n .await?;\n }\n\n payment_data\n }\n\n ConnectorCallType::SessionMultiple(connectors) => {\n let session_surcharge_details =\n call_surcharge_decision_management_for_session_flow(\n state,\n merchant_context,\n &business_profile,\n payment_data.get_payment_attempt(),\n payment_data.get_payment_intent(),\n payment_data.get_billing_address(),\n &connectors,\n )\n .await?;\n Box::pin(call_multiple_connectors_service(\n state,\n merchant_context,\n connectors,\n &operation,\n payment_data,\n &customer,\n session_surcharge_details,\n &business_profile,\n header_payload.clone(),\n ::should_return_raw_response(&req),\n ))\n .await?\n }\n };\n\n #[cfg(feature = \"frm\")]\n if let Some(fraud_info) = &mut frm_info {\n #[cfg(feature = \"v1\")]\n Box::pin(frm_core::post_payment_frm_core(\n state,\n req_state,\n merchant_context,\n &mut payment_data,\n fraud_info,\n frm_configs\n .clone()\n .ok_or(errors::ApiErrorResponse::MissingRequiredField {\n field_name: \"frm_configs\",\n })\n .attach_printable(\"Frm configs label not found\")?,\n &customer,\n &mut should_continue_capture,\n ))\n .await?;\n }\n } else {\n (_, payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data.clone(),\n customer.clone(),\n validate_result.storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n #[cfg(feature = \"frm\")]\n frm_info.and_then(|info| info.suggested_action),\n #[cfg(not(feature = \"frm\"))]\n None,\n header_payload.clone(),\n )\n .await?;\n }\n\n let payment_intent_status = payment_data.get_payment_intent().status;\n\n payment_data\n .get_payment_attempt()\n .payment_token\n .as_ref()\n .zip(payment_data.get_payment_attempt().payment_method)\n .map(ParentPaymentMethodToken::create_key_for_token)\n .async_map(|key_for_hyperswitch_token| async move {\n if key_for_hyperswitch_token\n .should_delete_payment_method_token(payment_intent_status)\n {\n let _ = key_for_hyperswitch_token.delete(state).await;\n }\n })\n .await;\n } else {\n (_, payment_data) = operation\n .to_update_tracker()?\n .update_trackers(\n state,\n req_state,\n payment_data.clone(),\n customer.clone(),\n validate_result.storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n None,\n header_payload.clone(),\n )\n .await?;\n }\n\n let cloned_payment_data = payment_data.clone();\n let cloned_customer = customer.clone();\n\n #[cfg(feature = \"v1\")]\n operation\n .to_domain()?\n .store_extended_card_info_temporarily(\n state,\n payment_data.get_payment_intent().get_id(),\n &business_profile,\n payment_data.get_payment_method_data(),\n )\n .await?;\n\n utils::trigger_payments_webhook(\n merchant_context.clone(),\n business_profile,\n cloned_payment_data,\n cloned_customer,\n state,\n operation,\n )\n .await\n .map_err(|error| logger::warn!(payments_outgoing_webhook_error=?error))\n .ok();\n\n Ok((\n payment_data,\n req,\n customer,\n connector_http_status_code,\n external_latency,\n ))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::types::api::convert_connector_data_to_routable_connectors;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use router_env::{instrument, tracing};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::types::api::convert_connector_data_to_routable_connectors;", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use router_env::{instrument, tracing};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use crate::core::debit_routing;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_currency", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_currency(&self) -> storage_enums::Currency {\n self.payment_intent.amount_details.currency\n }", + "after_code": "fn get_currency(&self) -> storage_enums::Currency {\n self.payment_intent.amount_details.currency\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_routing_approach_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_routing_approach_in_attempt(\n &mut self,\n routing_approach: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }", + "after_code": "fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::function::deserialize_hashmap_inner", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn deserialize_hashmap_inner(\n value: HashMap,\n) -> Result>, String>\nwhere\n K: Eq + std::str::FromStr + std::hash::Hash,\n V: Eq + std::str::FromStr + std::hash::Hash,\n ::Err: std::fmt::Display,\n ::Err: std::fmt::Display,\n{\n let (values, errors) = value\n .into_iter()\n .map(\n |(k, v)| match (K::from_str(k.trim()), deserialize_hashset_inner(v)) {\n (Err(error), _) => Err(format!(\n \"Unable to deserialize `{}` as `{}`: {error}\",\n k,\n std::any::type_name::()\n )),\n (_, Err(error)) => Err(error),\n (Ok(key), Ok(value)) => Ok((key, value)),\n },\n )\n .fold(\n (HashMap::new(), Vec::new()),\n |(mut values, mut errors), result| match result {\n Ok((key, value)) => {\n values.insert(key, value);\n (values, errors)\n }\n Err(error) => {\n errors.push(error);\n (values, errors)\n }\n },\n );\n if !errors.is_empty() {\n Err(format!(\"Some errors occurred:\\n{}\", errors.join(\"\\n\")))\n } else {\n Ok(values)\n }\n}", + "after_code": "fn deserialize_hashmap_inner(\n value: HashMap,\n) -> Result>, String>\nwhere\n K: Eq + std::str::FromStr + std::hash::Hash,\n V: Eq + std::str::FromStr + std::hash::Hash,\n ::Err: std::fmt::Display,\n ::Err: std::fmt::Display,\n{\n let (values, errors) = value\n .into_iter()\n .map(\n |(k, v)| match (K::from_str(k.trim()), deserialize_hashset_inner(v)) {\n (Err(error), _) => Err(format!(\n \"Unable to deserialize `{}` as `{}`: {error}\",\n k,\n std::any::type_name::()\n )),\n (_, Err(error)) => Err(error),\n (Ok(key), Ok(value)) => Ok((key, value)),\n },\n )\n .fold(\n (HashMap::new(), Vec::new()),\n |(mut values, mut errors), result| match result {\n Ok((key, value)) => {\n values.insert(key, value);\n (values, errors)\n }\n Err(error) => {\n errors.push(error);\n (values, errors)\n }\n },\n );\n if !errors.is_empty() {\n Err(format!(\"Some errors occurred:\\n{}\", errors.join(\"\\n\")))\n } else {\n Ok(values)\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use super::deserialize_hashset;", + "use super::deserialize_hashmap;", + "use std::collections::{HashMap, HashSet};", + "use std::collections::HashSet;" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use super::deserialize_hashmap;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_merchant_connector_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_merchant_connector_details(\n &self,\n ) -> Option {\n self.merchant_connector_details.clone()\n }", + "after_code": "fn get_merchant_connector_details(\n &self,\n ) -> Option {\n self.merchant_connector_details.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/cancel_flow.rs::impl::types::RouterData", + "file": "crates/router/src/core/payments/flows/cancel_flow.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "impl Feature\n for types::RouterData\n{\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n metrics::PAYMENT_CANCEL_COUNT.add(\n 1,\n router_env::metric_attributes!((\"connector\", connector.connector_name.to_string())),\n );\n\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::Void,\n types::PaymentsCancelData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n Ok(resp)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::Void,\n types::PaymentsCancelData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n\n async fn call_unified_connector_service<'a>(\n &mut self,\n state: &SessionState,\n header_payload: &domain_payments::HeaderPayload,\n lineage_ids: grpc_client::LineageIds,\n #[cfg(feature = \"v1\")] merchant_connector_account: helpers::MerchantConnectorAccountType,\n #[cfg(feature = \"v2\")]\n merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n merchant_context: &domain::MerchantContext,\n _connector_data: &api::ConnectorData,\n unified_connector_service_execution_mode: common_enums::ExecutionMode,\n merchant_order_reference_id: Option,\n _call_connector_action: common_enums::CallConnectorAction,\n _creds_identifier: Option,\n ) -> RouterResult<()> {\n let client = state\n .grpc_client\n .unified_connector_service_client\n .clone()\n .ok_or(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to fetch Unified Connector Service client\")?;\n\n let payment_void_request =\n payments_grpc::PaymentServiceVoidRequest::foreign_try_from(&*self)\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct Payment Void Request\")?;\n\n let connector_auth_metadata = build_unified_connector_service_auth_metadata(\n merchant_connector_account,\n merchant_context,\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct request metadata\")?;\n\n let merchant_reference_id = header_payload\n .x_reference_id\n .clone()\n .or(merchant_order_reference_id)\n .map(|id| id_type::PaymentReferenceId::from_str(id.as_str()))\n .transpose()\n .inspect_err(|err| logger::warn!(error=?err, \"Invalid Merchant ReferenceId found\"))\n .ok()\n .flatten()\n .map(ucs_types::UcsReferenceId::Payment);\n\n let header_payload = state\n .get_grpc_headers_ucs(unified_connector_service_execution_mode)\n .external_vault_proxy_metadata(None)\n .merchant_reference_id(merchant_reference_id)\n .lineage_ids(lineage_ids);\n\n let updated_router_data = Box::pin(ucs_logging_wrapper(\n self.clone(),\n state,\n payment_void_request,\n header_payload,\n |mut router_data, payment_void_request, grpc_headers| async move {\n let response = client\n .payment_cancel(payment_void_request, connector_auth_metadata, grpc_headers)\n .await\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to Cancel payment\")?;\n\n let payment_void_response = response.into_inner();\n\n let (router_data_response, status_code) =\n handle_unified_connector_service_response_for_payment_cancel(\n payment_void_response.clone(),\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to deserialize UCS response\")?;\n\n let router_data_response = router_data_response.map(|(response, status)| {\n router_data.status = status;\n response\n });\n router_data.response = router_data_response;\n router_data.connector_http_status_code = Some(status_code);\n\n Ok((router_data, payment_void_response))\n },\n ))\n .await?;\n\n *self = updated_router_data;\n Ok(())\n }\n}", + "after_code": "impl Feature\n for types::RouterData\n{\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n metrics::PAYMENT_CANCEL_COUNT.add(\n 1,\n router_env::metric_attributes!((\"connector\", connector.connector_name.to_string())),\n );\n\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::Void,\n types::PaymentsCancelData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n Ok(resp)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::Void,\n types::PaymentsCancelData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n\n async fn call_unified_connector_service<'a>(\n &mut self,\n state: &SessionState,\n header_payload: &domain_payments::HeaderPayload,\n lineage_ids: grpc_client::LineageIds,\n #[cfg(feature = \"v1\")] merchant_connector_account: helpers::MerchantConnectorAccountType,\n #[cfg(feature = \"v2\")]\n merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n merchant_context: &domain::MerchantContext,\n _connector_data: &api::ConnectorData,\n unified_connector_service_execution_mode: common_enums::ExecutionMode,\n merchant_order_reference_id: Option,\n _call_connector_action: common_enums::CallConnectorAction,\n _creds_identifier: Option,\n ) -> RouterResult<()> {\n let client = state\n .grpc_client\n .unified_connector_service_client\n .clone()\n .ok_or(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to fetch Unified Connector Service client\")?;\n\n let payment_void_request =\n payments_grpc::PaymentServiceVoidRequest::foreign_try_from(&*self)\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct Payment Void Request\")?;\n\n let connector_auth_metadata = build_unified_connector_service_auth_metadata(\n merchant_connector_account,\n merchant_context,\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct request metadata\")?;\n\n let merchant_reference_id = header_payload\n .x_reference_id\n .clone()\n .or(merchant_order_reference_id)\n .map(|id| id_type::PaymentReferenceId::from_str(id.as_str()))\n .transpose()\n .inspect_err(|err| logger::warn!(error=?err, \"Invalid Merchant ReferenceId found\"))\n .ok()\n .flatten()\n .map(ucs_types::UcsReferenceId::Payment);\n\n let header_payload = state\n .get_grpc_headers_ucs(unified_connector_service_execution_mode)\n .external_vault_proxy_metadata(None)\n .merchant_reference_id(merchant_reference_id)\n .lineage_ids(lineage_ids);\n\n let updated_router_data = Box::pin(ucs_logging_wrapper(\n self.clone(),\n state,\n payment_void_request,\n header_payload,\n |mut router_data, payment_void_request, grpc_headers| async move {\n let response = client\n .payment_cancel(payment_void_request, connector_auth_metadata, grpc_headers)\n .await\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to Cancel payment\")?;\n\n let payment_void_response = response.into_inner();\n\n let (router_data_response, status_code) =\n handle_unified_connector_service_response_for_payment_cancel(\n payment_void_response.clone(),\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to deserialize UCS response\")?;\n\n let router_data_response = router_data_response.map(|(response, status)| {\n router_data.status = status;\n response\n });\n router_data.response = router_data_response;\n router_data.connector_http_status_code = Some(status_code);\n\n Ok((router_data, payment_void_response))\n },\n ))\n .await?;\n\n *self = updated_router_data;\n Ok(())\n }\n}", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n metrics::PAYMENT_CANCEL_COUNT.add(" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_mandate_connector", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails> {\n todo!()\n }", + "after_code": "fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentEvent::function::key", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn key(&self) -> String {\n \"payment\".to_string()\n }", + "after_code": "fn key(&self) -> String {\n \"payment\".to_string()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::AppState::function::event_handler", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn event_handler(&self) -> EventsHandler {\n self.event_handler.clone()\n }", + "after_code": "fn event_handler(&self) -> EventsHandler {\n self.event_handler.clone()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::conf", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn conf(&self) -> settings::Settings {\n self.conf.as_ref().to_owned()\n }", + "after_code": "fn conf(&self) -> settings::Settings {\n self.conf.as_ref().to_owned()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::payments_create_and_confirm_intent", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub(crate) async fn payments_create_and_confirm_intent(\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n request: payments_api::PaymentsRequest,\n header_payload: HeaderPayload,\n) -> RouterResponse {\n use hyperswitch_domain_models::{\n payments::PaymentIntentData, router_flow_types::PaymentCreateIntent,\n };\n\n let payment_id = id_type::GlobalPaymentId::generate(&state.conf.cell_information.id);\n\n let payload = payments_api::PaymentsCreateIntentRequest::from(&request);\n\n let create_intent_response = Box::pin(payments_intent_core::<\n PaymentCreateIntent,\n payments_api::PaymentsIntentResponse,\n _,\n _,\n PaymentIntentData,\n >(\n state.clone(),\n req_state.clone(),\n merchant_context.clone(),\n profile.clone(),\n operations::PaymentIntentCreate,\n payload,\n payment_id.clone(),\n header_payload.clone(),\n ))\n .await?;\n\n logger::info!(?create_intent_response);\n\n let create_intent_response = create_intent_response\n .get_json_body()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Unexpected response from payments core\")?;\n\n let payload = payments_api::PaymentsConfirmIntentRequest::from(&request);\n\n let confirm_intent_response = decide_authorize_or_setup_intent_flow(\n state,\n req_state,\n merchant_context,\n profile,\n &create_intent_response,\n payload,\n payment_id,\n header_payload,\n )\n .await?;\n\n logger::info!(?confirm_intent_response);\n\n Ok(confirm_intent_response)\n}", + "after_code": "pub(crate) async fn payments_create_and_confirm_intent(\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n request: payments_api::PaymentsRequest,\n header_payload: HeaderPayload,\n) -> RouterResponse {\n use hyperswitch_domain_models::{\n payments::PaymentIntentData, router_flow_types::PaymentCreateIntent,\n };\n\n let payment_id = id_type::GlobalPaymentId::generate(&state.conf.cell_information.id);\n\n let payload = payments_api::PaymentsCreateIntentRequest::from(&request);\n\n let create_intent_response = Box::pin(payments_intent_core::<\n PaymentCreateIntent,\n payments_api::PaymentsIntentResponse,\n _,\n _,\n PaymentIntentData,\n >(\n state.clone(),\n req_state.clone(),\n merchant_context.clone(),\n profile.clone(),\n operations::PaymentIntentCreate,\n payload,\n payment_id.clone(),\n header_payload.clone(),\n ))\n .await?;\n\n logger::info!(?create_intent_response);\n\n let create_intent_response = create_intent_response\n .get_json_body()\n .change_context(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"Unexpected response from payments core\")?;\n\n let payload = payments_api::PaymentsConfirmIntentRequest::from(&request);\n\n let confirm_intent_response = decide_authorize_or_setup_intent_flow(\n state,\n req_state,\n merchant_context,\n profile,\n &create_intent_response,\n payload,\n payment_id,\n header_payload,\n )\n .await?;\n\n logger::info!(?confirm_intent_response);\n\n Ok(confirm_intent_response)\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use hyperswitch_domain_models::{\n payments::PaymentIntentData, router_flow_types::PaymentCreateIntent,\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use hyperswitch_domain_models::{\n payments::PaymentIntentData, router_flow_types::PaymentCreateIntent,\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::ActionTypesBuilder::function::build", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn build(self) -> Vec {\n self.action_types\n }", + "after_code": "pub fn build(self) -> Vec {\n self.action_types\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::ThreeDsDecisionRule", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ThreeDsDecisionRule;", + "after_code": "pub struct ThreeDsDecisionRule;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Gsm::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/gsm\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(gsm::create_gsm_rule)))\n .service(web::resource(\"/get\").route(web::post().to(gsm::get_gsm_rule)))\n .service(web::resource(\"/update\").route(web::post().to(gsm::update_gsm_rule)))\n .service(web::resource(\"/delete\").route(web::post().to(gsm::delete_gsm_rule)))\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/gsm\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"\").route(web::post().to(gsm::create_gsm_rule)))\n .service(web::resource(\"/get\").route(web::post().to(gsm::get_gsm_rule)))\n .service(web::resource(\"/update\").route(web::post().to(gsm::update_gsm_rule)))\n .service(web::resource(\"/delete\").route(web::post().to(gsm::delete_gsm_rule)))\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::mod::conditional_configs", + "file": "crates/router/src/core/payments.rs", + "kind": "mod_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub mod conditional_configs;", + "after_code": "pub mod conditional_configs;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::get_sessions_token", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_sessions_token(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_sessions_token(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_vault_operation", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_vault_operation(&mut self, vault_operation: domain_payments::VaultOperation) {\n self.vault_operation = Some(vault_operation);\n }", + "after_code": "fn set_vault_operation(&mut self, vault_operation: domain_payments::VaultOperation) {\n self.vault_operation = Some(vault_operation);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::Platform", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Platform {\n pub enabled: bool,\n pub allow_connected_merchants: bool,\n}", + "after_code": "pub struct Platform {\n pub enabled: bool,\n pub allow_connected_merchants: bool,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_payment_attempt(&self) -> &storage::PaymentAttempt {\n &self.payment_attempt\n }", + "after_code": "fn get_payment_attempt(&self) -> &storage::PaymentAttempt {\n &self.payment_attempt\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::ProcessTracker::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n use super::process_tracker::revenue_recovery;\n web::scope(\"/v2/process-trackers/revenue-recovery-workflow\")\n .app_data(web::Data::new(state.clone()))\n .service(\n web::scope(\"/{revenue_recovery_id}\")\n .service(\n web::resource(\"\").route(\n web::get().to(revenue_recovery::revenue_recovery_pt_retrieve_api),\n ),\n )\n .service(\n web::resource(\"/resume\")\n .route(web::post().to(revenue_recovery::revenue_recovery_resume_api)),\n ),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n use super::process_tracker::revenue_recovery;\n web::scope(\"/v2/process-trackers/revenue-recovery-workflow\")\n .app_data(web::Data::new(state.clone()))\n .service(\n web::scope(\"/{revenue_recovery_id}\")\n .service(\n web::resource(\"\").route(\n web::get().to(revenue_recovery::revenue_recovery_pt_retrieve_api),\n ),\n )\n .service(\n web::resource(\"/resume\")\n .route(web::post().to(revenue_recovery::revenue_recovery_resume_api)),\n ),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::process_tracker::revenue_recovery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use super::process_tracker::revenue_recovery;", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::impl::EligibilityHandler", + "file": "crates/router/src/core/payments.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl EligibilityHandler {\n fn new(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n payment_eligibility_data: PaymentEligibilityData,\n business_profile: domain::Profile,\n ) -> Self {\n Self {\n state,\n merchant_context,\n payment_eligibility_data,\n business_profile,\n }\n }\n\n async fn run_check(\n &self,\n check: C,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let should_run = check\n .should_run(&self.state, &self.merchant_context)\n .await?;\n Ok(match should_run {\n true => check\n .execute_check(\n &self.state,\n &self.merchant_context,\n &self.payment_eligibility_data,\n &self.business_profile,\n )\n .await\n .map(C::transform)?,\n false => None,\n })\n }\n}", + "after_code": "impl EligibilityHandler {\n fn new(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n payment_eligibility_data: PaymentEligibilityData,\n business_profile: domain::Profile,\n ) -> Self {\n Self {\n state,\n merchant_context,\n payment_eligibility_data,\n business_profile,\n }\n }\n\n async fn run_check(\n &self,\n check: C,\n ) -> CustomResult, errors::ApiErrorResponse> {\n let should_run = check\n .should_run(&self.state, &self.merchant_context)\n .await?;\n Ok(match should_run {\n true => check\n .execute_check(\n &self.state,\n &self.merchant_context,\n &self.payment_eligibility_data,\n &self.business_profile,\n )\n .await\n .map(C::transform)?,\n false => None,\n })\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_vault_session_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_vault_session_details(\n &mut self,\n external_vault_session_details: Option,\n ) {\n todo!()\n }", + "after_code": "fn set_vault_session_details(\n &mut self,\n external_vault_session_details: Option,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::filter_ntid_supported_connectors", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn filter_ntid_supported_connectors(\n connectors: Vec,\n ntid_supported_connectors: &HashSet,\n) -> Vec {\n connectors\n .into_iter()\n .filter(|data| ntid_supported_connectors.contains(&data.connector_data.connector_name))\n .collect()\n}", + "after_code": "pub fn filter_ntid_supported_connectors(\n connectors: Vec,\n ntid_supported_connectors: &HashSet,\n) -> Vec {\n connectors\n .into_iter()\n .filter(|data| ntid_supported_connectors.contains(&data.connector_data.connector_name))\n .collect()\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::Tokenization::function::server", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/tokenize\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\")\n .route(web::post().to(tokenization_routes::create_token_vault_api)),\n )\n .service(\n web::resource(\"/{id}\")\n .route(web::delete().to(tokenization_routes::delete_tokenized_data_api)),\n )\n }", + "after_code": "pub fn server(state: AppState) -> Scope {\n web::scope(\"/v2/tokenize\")\n .app_data(web::Data::new(state))\n .service(\n web::resource(\"\")\n .route(web::post().to(tokenization_routes::create_token_vault_api)),\n )\n .service(\n web::resource(\"/{id}\")\n .route(web::delete().to(tokenization_routes::delete_tokenized_data_api)),\n )\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::SupportedConnectors", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct SupportedConnectors {\n pub wallets: Vec,\n}", + "after_code": "pub struct SupportedConnectors {\n pub wallets: Vec,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_optional_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt> {\n None\n }", + "after_code": "fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt> {\n None\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::ConnectorOnboarding", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct ConnectorOnboarding;", + "after_code": "pub struct ConnectorOnboarding;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::AppState::function::new", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn new(\n conf: settings::Settings,\n shut_down_signal: oneshot::Sender<()>,\n api_client: Box,\n ) -> Self {\n Box::pin(Self::with_storage(\n conf,\n StorageImpl::Postgresql,\n shut_down_signal,\n api_client,\n ))\n .await\n }", + "after_code": "pub async fn new(\n conf: settings::Settings,\n shut_down_signal: oneshot::Sender<()>,\n api_client: Box,\n ) -> Self {\n Box::pin(Self::with_storage(\n conf,\n StorageImpl::Postgresql,\n shut_down_signal,\n api_client,\n ))\n .await\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use tokio::sync::oneshot;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use tokio::sync::oneshot;", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_client_secret", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_client_secret(&mut self, client_secret: Option>) {\n todo!()\n }", + "after_code": "fn set_client_secret(&mut self, client_secret: Option>) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::User", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct User;", + "after_code": "pub struct User;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::blocklist_guard", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn blocklist_guard(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n) -> CustomResult\nwhere\n F: Send + Clone + Sync,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let merchant_id = merchant_context.get_merchant_account().get_id();\n let blocklist_enabled_key = merchant_id.get_blocklist_guard_key();\n let blocklist_guard_enabled = state\n .store\n .find_config_by_key_unwrap_or(&blocklist_enabled_key, Some(\"false\".to_string()))\n .await;\n\n let blocklist_guard_enabled: bool = match blocklist_guard_enabled {\n Ok(config) => serde_json::from_str(&config.config).unwrap_or(false),\n\n // If it is not present in db we are defaulting it to false\n Err(inner) => {\n if !inner.current_context().is_db_not_found() {\n logger::error!(\"Error fetching guard blocklist enabled config {:?}\", inner);\n }\n false\n }\n };\n\n if blocklist_guard_enabled {\n Ok(operation\n .to_domain()?\n .guard_payment_against_blocklist(state, merchant_context, payment_data)\n .await?)\n } else {\n Ok(false)\n }\n}", + "after_code": "async fn blocklist_guard(\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n operation: &BoxedOperation<'_, F, ApiRequest, D>,\n payment_data: &mut D,\n) -> CustomResult\nwhere\n F: Send + Clone + Sync,\n D: OperationSessionGetters + OperationSessionSetters + Send + Sync + Clone,\n{\n let merchant_id = merchant_context.get_merchant_account().get_id();\n let blocklist_enabled_key = merchant_id.get_blocklist_guard_key();\n let blocklist_guard_enabled = state\n .store\n .find_config_by_key_unwrap_or(&blocklist_enabled_key, Some(\"false\".to_string()))\n .await;\n\n let blocklist_guard_enabled: bool = match blocklist_guard_enabled {\n Ok(config) => serde_json::from_str(&config.config).unwrap_or(false),\n\n // If it is not present in db we are defaulting it to false\n Err(inner) => {\n if !inner.current_context().is_db_not_found() {\n logger::error!(\"Error fetching guard blocklist enabled config {:?}\", inner);\n }\n false\n }\n };\n\n if blocklist_guard_enabled {\n Ok(operation\n .to_domain()?\n .guard_payment_against_blocklist(state, merchant_context, payment_data)\n .await?)\n } else {\n Ok(false)\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::Wrapper", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "struct Wrapper {\n connector_list: String,\n }", + "after_code": "struct Wrapper {\n connector_list: String,\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::Locker", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Locker {\n pub host: String,\n pub host_rs: String,\n pub mock_locker: bool,\n pub basilisk_host: String,\n pub locker_signing_key_id: String,\n pub locker_enabled: bool,\n pub ttl_for_storage_in_secs: i64,\n pub decryption_scheme: DecryptionScheme,\n}", + "after_code": "pub struct Locker {\n pub host: String,\n pub host_rs: String,\n pub mock_locker: bool,\n pub basilisk_host: String,\n pub locker_signing_key_id: String,\n pub locker_enabled: bool,\n pub ttl_for_storage_in_secs: i64,\n pub decryption_scheme: DecryptionScheme,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/routes/app.rs::trait::AppStateInfo", + "file": "crates/router/src/routes/app.rs", + "kind": "trait_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub trait AppStateInfo {\n fn conf(&self) -> settings::Settings;\n fn event_handler(&self) -> EventsHandler;\n #[cfg(feature = \"email\")]\n fn email_client(&self) -> Arc>;\n fn add_request_id(&mut self, request_id: RequestId);\n fn add_flow_name(&mut self, flow_name: String);\n fn get_request_id(&self) -> Option;\n}", + "after_code": "pub trait AppStateInfo {\n fn conf(&self) -> settings::Settings;\n fn event_handler(&self) -> EventsHandler;\n #[cfg(feature = \"email\")]\n fn email_client(&self) -> Arc>;\n fn add_request_id(&mut self, request_id: RequestId);\n fn add_flow_name(&mut self, flow_name: String);\n fn get_request_id(&self) -> Option;\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};", + "use router_env::tracing_actix_web::RequestId;" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use router_env::tracing_actix_web::RequestId;" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::set_connector_in_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_in_payment_attempt(&mut self, _connector: Option) {\n todo!()\n }", + "after_code": "fn set_connector_in_payment_attempt(&mut self, _connector: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::payments_submit_eligibility", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn payments_submit_eligibility(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n req: api_models::payments::PaymentsEligibilityRequest,\n payment_id: id_type::PaymentId,\n) -> RouterResponse {\n let key_manager_state = &(&state).into();\n let payment_eligibility_data =\n PaymentEligibilityData::from_request(&state, &merchant_context, &req).await?;\n let profile_id = payment_eligibility_data\n .payment_intent\n .profile_id\n .clone()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"'profile_id' not set in payment intent\")?;\n let business_profile = state\n .store\n .find_business_profile_by_profile_id(\n key_manager_state,\n merchant_context.get_merchant_key_store(),\n &profile_id,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::ProfileNotFound {\n id: profile_id.get_string_repr().to_owned(),\n })?;\n let eligibility_handler = EligibilityHandler::new(\n state,\n merchant_context,\n payment_eligibility_data,\n business_profile,\n );\n // Run the checks in sequence, short-circuiting on the first that returns a next action\n let sdk_next_action = eligibility_handler\n .run_check(BlockListCheck)\n .await\n .transpose()\n .async_or_else(|| async {\n eligibility_handler\n .run_check(CardTestingCheck)\n .await\n .transpose()\n })\n .await\n .transpose()?\n .unwrap_or(api_models::payments::SdkNextAction {\n next_action: api_models::payments::NextActionCall::Confirm,\n });\n Ok(services::ApplicationResponse::Json(\n api_models::payments::PaymentsEligibilityResponse {\n payment_id,\n sdk_next_action,\n },\n ))\n}", + "after_code": "pub async fn payments_submit_eligibility(\n state: SessionState,\n merchant_context: domain::MerchantContext,\n req: api_models::payments::PaymentsEligibilityRequest,\n payment_id: id_type::PaymentId,\n) -> RouterResponse {\n let key_manager_state = &(&state).into();\n let payment_eligibility_data =\n PaymentEligibilityData::from_request(&state, &merchant_context, &req).await?;\n let profile_id = payment_eligibility_data\n .payment_intent\n .profile_id\n .clone()\n .ok_or(errors::ApiErrorResponse::InternalServerError)\n .attach_printable(\"'profile_id' not set in payment intent\")?;\n let business_profile = state\n .store\n .find_business_profile_by_profile_id(\n key_manager_state,\n merchant_context.get_merchant_key_store(),\n &profile_id,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::ProfileNotFound {\n id: profile_id.get_string_repr().to_owned(),\n })?;\n let eligibility_handler = EligibilityHandler::new(\n state,\n merchant_context,\n payment_eligibility_data,\n business_profile,\n );\n // Run the checks in sequence, short-circuiting on the first that returns a next action\n let sdk_next_action = eligibility_handler\n .run_check(BlockListCheck)\n .await\n .transpose()\n .async_or_else(|| async {\n eligibility_handler\n .run_check(CardTestingCheck)\n .await\n .transpose()\n })\n .await\n .transpose()?\n .unwrap_or(api_models::payments::SdkNextAction {\n next_action: api_models::payments::NextActionCall::Confirm,\n });\n Ok(services::ApplicationResponse::Json(\n api_models::payments::PaymentsEligibilityResponse {\n payment_id,\n sdk_next_action,\n },\n ))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::NetworkTokenizationService", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct NetworkTokenizationService {\n pub generate_token_url: url::Url,\n pub fetch_token_url: url::Url,\n pub token_service_api_key: Secret,\n pub public_key: Secret,\n pub private_key: Secret,\n pub key_id: String,\n pub delete_token_url: url::Url,\n pub check_token_status_url: url::Url,\n pub webhook_source_verification_key: Secret,\n}", + "after_code": "pub struct NetworkTokenizationService {\n pub generate_token_url: url::Url,\n pub fetch_token_url: url::Url,\n pub token_service_api_key: Secret,\n pub public_key: Secret,\n pub private_key: Secret,\n pub key_id: String,\n pub delete_token_url: url::Url,\n pub check_token_status_url: url::Url,\n pub webhook_source_verification_key: Secret,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_creds_identifier", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_creds_identifier(&self) -> Option<&str> {\n None\n }", + "after_code": "fn get_creds_identifier(&self) -> Option<&str> {\n None\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_optional_external_vault_session_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_optional_external_vault_session_details(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_optional_external_vault_session_details(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_connector_request_reference_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_request_reference_id(&mut self, reference_id: Option) {\n todo!()\n }", + "after_code": "fn set_connector_request_reference_id(&mut self, reference_id: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Subscription", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Subscription {\n pub fn server(state: AppState) -> Scope {\n let route = web::scope(\"/subscriptions\").app_data(web::Data::new(state.clone()));\n\n route\n .service(\n web::resource(\"\").route(web::post().to(|state, req, payload| {\n subscription::create_and_confirm_subscription(state, req, payload)\n })),\n )\n .service(web::resource(\"/create\").route(\n web::post().to(|state, req, payload| {\n subscription::create_subscription(state, req, payload)\n }),\n ))\n .service(web::resource(\"/estimate\").route(web::get().to(subscription::get_estimate)))\n .service(\n web::resource(\"/plans\").route(web::get().to(subscription::get_subscription_plans)),\n )\n .service(\n web::resource(\"/{subscription_id}/confirm\").route(web::post().to(\n |state, req, id, payload| {\n subscription::confirm_subscription(state, req, id, payload)\n },\n )),\n )\n .service(\n web::resource(\"/{subscription_id}/update\").route(web::put().to(\n |state, req, id, payload| {\n subscription::update_subscription(state, req, id, payload)\n },\n )),\n )\n .service(\n web::resource(\"/{subscription_id}\")\n .route(web::get().to(subscription::get_subscription)),\n )\n .service(\n web::resource(\"/{subscription_id}/pause\")\n .route(web::post().to(subscription::pause_subscription)),\n )\n .service(\n web::resource(\"/{subscription_id}/resume\")\n .route(web::post().to(subscription::resume_subscription)),\n )\n .service(\n web::resource(\"/{subscription_id}/cancel\")\n .route(web::post().to(subscription::cancel_subscription)),\n )\n }\n}", + "after_code": "impl Subscription {\n pub fn server(state: AppState) -> Scope {\n let route = web::scope(\"/subscriptions\").app_data(web::Data::new(state.clone()));\n\n route\n .service(\n web::resource(\"\").route(web::post().to(|state, req, payload| {\n subscription::create_and_confirm_subscription(state, req, payload)\n })),\n )\n .service(web::resource(\"/create\").route(\n web::post().to(|state, req, payload| {\n subscription::create_subscription(state, req, payload)\n }),\n ))\n .service(web::resource(\"/estimate\").route(web::get().to(subscription::get_estimate)))\n .service(\n web::resource(\"/plans\").route(web::get().to(subscription::get_subscription_plans)),\n )\n .service(\n web::resource(\"/{subscription_id}/confirm\").route(web::post().to(\n |state, req, id, payload| {\n subscription::confirm_subscription(state, req, id, payload)\n },\n )),\n )\n .service(\n web::resource(\"/{subscription_id}/update\").route(web::put().to(\n |state, req, id, payload| {\n subscription::update_subscription(state, req, id, payload)\n },\n )),\n )\n .service(\n web::resource(\"/{subscription_id}\")\n .route(web::get().to(subscription::get_subscription)),\n )\n .service(\n web::resource(\"/{subscription_id}/pause\")\n .route(web::post().to(subscription::pause_subscription)),\n )\n .service(\n web::resource(\"/{subscription_id}/resume\")\n .route(web::post().to(subscription::resume_subscription)),\n )\n .service(\n web::resource(\"/{subscription_id}/cancel\")\n .route(web::post().to(subscription::cancel_subscription)),\n )\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_ephemeral_key", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_ephemeral_key(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_ephemeral_key(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::trait::OperationSessionGetters", + "file": "crates/router/src/core/payments.rs", + "kind": "trait_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub trait OperationSessionGetters {\n fn get_payment_attempt(&self) -> &storage::PaymentAttempt;\n #[cfg(feature = \"v2\")]\n fn list_payments_attempts(&self) -> &Vec;\n fn get_payment_intent(&self) -> &storage::PaymentIntent;\n #[cfg(feature = \"v2\")]\n fn get_client_secret(&self) -> &Option>;\n fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod>;\n fn get_payment_method_token(&self) -> Option<&PaymentMethodToken>;\n fn get_mandate_id(&self) -> Option<&payments_api::MandateIds>;\n fn get_address(&self) -> &PaymentAddress;\n fn get_creds_identifier(&self) -> Option<&str>;\n fn get_token(&self) -> Option<&str>;\n fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData>;\n fn get_payment_link_data(&self) -> Option;\n fn get_ephemeral_key(&self) -> Option;\n fn get_setup_mandate(&self) -> Option<&MandateData>;\n fn get_poll_config(&self) -> Option;\n fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>;\n fn get_frm_message(&self) -> Option;\n fn get_refunds(&self) -> Vec;\n fn get_disputes(&self) -> Vec;\n fn get_authorizations(&self) -> Vec;\n fn get_attempts(&self) -> Option>;\n fn get_recurring_details(&self) -> Option<&RecurringDetails>;\n // TODO: this should be a mandatory field, should we throw an error instead of returning an Option?\n fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId>;\n fn get_currency(&self) -> storage_enums::Currency;\n fn get_amount(&self) -> api::Amount;\n fn get_payment_attempt_connector(&self) -> Option<&str>;\n fn get_billing_address(&self) -> Option;\n fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData>;\n fn get_sessions_token(&self) -> Vec;\n fn get_token_data(&self) -> Option<&storage::PaymentTokenData>;\n fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails>;\n fn get_force_sync(&self) -> Option;\n #[cfg(feature = \"v1\")]\n fn get_all_keys_required(&self) -> Option;\n fn get_capture_method(&self) -> Option;\n fn get_merchant_connector_id_in_attempt(&self) -> Option;\n #[cfg(feature = \"v2\")]\n fn get_merchant_connector_details(\n &self,\n ) -> Option;\n\n fn get_connector_customer_id(&self) -> Option;\n\n #[cfg(feature = \"v1\")]\n fn get_whole_connector_response(&self) -> Option>;\n\n #[cfg(feature = \"v1\")]\n fn get_vault_operation(&self) -> Option<&domain_payments::VaultOperation>;\n\n #[cfg(feature = \"v2\")]\n fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt>;\n\n #[cfg(feature = \"v2\")]\n fn get_pre_routing_result(\n &self,\n ) -> Option>;\n\n #[cfg(feature = \"v2\")]\n fn get_optional_external_vault_session_details(&self) -> Option;\n #[cfg(feature = \"v1\")]\n fn get_click_to_pay_service_details(&self) -> Option<&api_models::payments::CtpServiceDetails>;\n\n #[cfg(feature = \"v1\")]\n fn get_is_manual_retry_enabled(&self) -> Option;\n}", + "after_code": "pub trait OperationSessionGetters {\n fn get_payment_attempt(&self) -> &storage::PaymentAttempt;\n #[cfg(feature = \"v2\")]\n fn list_payments_attempts(&self) -> &Vec;\n fn get_payment_intent(&self) -> &storage::PaymentIntent;\n #[cfg(feature = \"v2\")]\n fn get_client_secret(&self) -> &Option>;\n fn get_payment_method_info(&self) -> Option<&domain::PaymentMethod>;\n fn get_payment_method_token(&self) -> Option<&PaymentMethodToken>;\n fn get_mandate_id(&self) -> Option<&payments_api::MandateIds>;\n fn get_address(&self) -> &PaymentAddress;\n fn get_creds_identifier(&self) -> Option<&str>;\n fn get_token(&self) -> Option<&str>;\n fn get_multiple_capture_data(&self) -> Option<&types::MultipleCaptureData>;\n fn get_payment_link_data(&self) -> Option;\n fn get_ephemeral_key(&self) -> Option;\n fn get_setup_mandate(&self) -> Option<&MandateData>;\n fn get_poll_config(&self) -> Option;\n fn get_authentication(\n &self,\n ) -> Option<&hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore>;\n fn get_frm_message(&self) -> Option;\n fn get_refunds(&self) -> Vec;\n fn get_disputes(&self) -> Vec;\n fn get_authorizations(&self) -> Vec;\n fn get_attempts(&self) -> Option>;\n fn get_recurring_details(&self) -> Option<&RecurringDetails>;\n // TODO: this should be a mandatory field, should we throw an error instead of returning an Option?\n fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId>;\n fn get_currency(&self) -> storage_enums::Currency;\n fn get_amount(&self) -> api::Amount;\n fn get_payment_attempt_connector(&self) -> Option<&str>;\n fn get_billing_address(&self) -> Option;\n fn get_payment_method_data(&self) -> Option<&domain::PaymentMethodData>;\n fn get_sessions_token(&self) -> Vec;\n fn get_token_data(&self) -> Option<&storage::PaymentTokenData>;\n fn get_mandate_connector(&self) -> Option<&MandateConnectorDetails>;\n fn get_force_sync(&self) -> Option;\n #[cfg(feature = \"v1\")]\n fn get_all_keys_required(&self) -> Option;\n fn get_capture_method(&self) -> Option;\n fn get_merchant_connector_id_in_attempt(&self) -> Option;\n #[cfg(feature = \"v2\")]\n fn get_merchant_connector_details(\n &self,\n ) -> Option;\n\n fn get_connector_customer_id(&self) -> Option;\n\n #[cfg(feature = \"v1\")]\n fn get_whole_connector_response(&self) -> Option>;\n\n #[cfg(feature = \"v1\")]\n fn get_vault_operation(&self) -> Option<&domain_payments::VaultOperation>;\n\n #[cfg(feature = \"v2\")]\n fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt>;\n\n #[cfg(feature = \"v2\")]\n fn get_pre_routing_result(\n &self,\n ) -> Option>;\n\n #[cfg(feature = \"v2\")]\n fn get_optional_external_vault_session_details(&self) -> Option;\n #[cfg(feature = \"v1\")]\n fn get_click_to_pay_service_details(&self) -> Option<&api_models::payments::CtpServiceDetails>;\n\n #[cfg(feature = \"v1\")]\n fn get_is_manual_retry_enabled(&self) -> Option;\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};", + "use std::collections::HashMap;" + ] + }, + { + "id": "crates/router/src/core/payments/flows/update_metadata_flow.rs::impl::types::RouterData<\n api::UpdateMetadata,\n types::PaymentsUpdateMetadataData,\n types::PaymentsResponseData,\n >", + "file": "crates/router/src/core/payments/flows/update_metadata_flow.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "impl Feature\n for types::RouterData<\n api::UpdateMetadata,\n types::PaymentsUpdateMetadataData,\n types::PaymentsResponseData,\n >\n{\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::UpdateMetadata,\n types::PaymentsUpdateMetadataData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::UpdateMetadata,\n types::PaymentsUpdateMetadataData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n}", + "after_code": "impl Feature\n for types::RouterData<\n api::UpdateMetadata,\n types::PaymentsUpdateMetadataData,\n types::PaymentsResponseData,\n >\n{\n async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::UpdateMetadata,\n types::PaymentsUpdateMetadataData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n Box::pin(access_token::add_access_token(\n state,\n connector,\n self,\n creds_identifier,\n ))\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n let request = match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::UpdateMetadata,\n types::PaymentsUpdateMetadataData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?\n }\n _ => None,\n };\n\n Ok((request, true))\n }\n}", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments.rs::mod::types", + "file": "crates/router/src/core/payments.rs", + "kind": "mod_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub mod types;", + "after_code": "pub mod types;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/external_proxy_flow.rs::impl::types::ExternalVaultProxyPaymentsRouterData", + "file": "crates/router/src/core/payments/flows/external_proxy_flow.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "impl Feature\n for types::ExternalVaultProxyPaymentsRouterData\n{\n async fn decide_flows<'a>(\n mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n business_profile: &domain::Profile,\n header_payload: domain_payments::HeaderPayload,\n return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::ExternalVaultProxy,\n types::ExternalVaultProxyPaymentsData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n logger::debug!(auth_type=?self.auth_type);\n let mut auth_router_data = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action.clone(),\n connector_request,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n\n // External vault proxy doesn't use integrity checks\n auth_router_data.integrity_check = Ok(());\n metrics::PAYMENT_COUNT.add(1, &[]);\n\n Ok(auth_router_data)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n access_token::add_access_token(state, connector, self, creds_identifier).await\n }\n\n async fn add_session_token<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n ) -> RouterResult\n where\n Self: Sized,\n {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::AuthorizeSessionToken,\n types::AuthorizeSessionTokenData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n let authorize_data = &types::PaymentsAuthorizeSessionTokenRouterData::foreign_from((\n &self,\n types::AuthorizeSessionTokenData::foreign_from(&self),\n ));\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n authorize_data,\n payments::CallConnectorAction::Trigger,\n None,\n None,\n )\n .await\n .to_payment_failed_response()?;\n let mut router_data = self;\n router_data.session_token = resp.session_token;\n Ok(router_data)\n }\n\n async fn add_payment_method_token<'a>(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n tokenization_action: &payments::TokenizationAction,\n should_continue_payment: bool,\n ) -> RouterResult {\n let request = self.request.clone();\n tokenization::add_payment_method_token(\n state,\n connector,\n tokenization_action,\n self,\n types::PaymentMethodTokenizationData::try_from(request)?,\n should_continue_payment,\n )\n .await\n }\n\n async fn preprocessing_steps<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n ) -> RouterResult {\n todo!()\n }\n\n async fn postprocessing_steps<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n ) -> RouterResult {\n todo!()\n }\n\n async fn create_connector_customer<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n ) -> RouterResult> {\n customers::create_connector_customer(\n state,\n connector,\n self,\n types::ConnectorCustomerData::try_from(self)?,\n )\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n connector\n .connector\n .validate_connector_against_payment_request(\n self.request.capture_method,\n self.payment_method,\n self.request.payment_method_type,\n )\n .to_payment_failed_response()?;\n\n // Check if the connector supports mandate payment\n // if the payment_method_type does not support mandate for the given connector, downgrade the setup future usage to on session\n if self.request.setup_future_usage\n == Some(diesel_models::enums::FutureUsage::OffSession)\n && !self\n .request\n .payment_method_type\n .and_then(|payment_method_type| {\n state\n .conf\n .mandates\n .supported_payment_methods\n .0\n .get(&enums::PaymentMethod::from(payment_method_type))\n .and_then(|supported_pm_for_mandates| {\n supported_pm_for_mandates.0.get(&payment_method_type).map(\n |supported_connector_for_mandates| {\n supported_connector_for_mandates\n .connector_list\n .contains(&connector.connector_name)\n },\n )\n })\n })\n .unwrap_or(false)\n {\n // downgrade the setup future usage to on session\n self.request.setup_future_usage =\n Some(diesel_models::enums::FutureUsage::OnSession);\n };\n\n // External vault proxy doesn't use regular payment method validation\n // Skip mandate payment validation for external vault proxy\n\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::ExternalVaultProxy,\n types::ExternalVaultProxyPaymentsData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n metrics::EXECUTE_PRETASK_COUNT.add(\n 1,\n router_env::metric_attributes!(\n (\"connector\", connector.connector_name.to_string()),\n (\"flow\", format!(\"{:?}\", api::ExternalVaultProxy)),\n ),\n );\n\n logger::debug!(completed_pre_tasks=?true);\n\n // External vault proxy always proceeds\n Ok((\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?,\n true,\n ))\n }\n _ => Ok((None, true)),\n }\n }\n\n async fn create_order_at_connector(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n should_continue_payment: bool,\n ) -> RouterResult> {\n if connector\n .connector_name\n .requires_order_creation_before_payment(self.payment_method)\n && should_continue_payment\n {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::CreateOrder,\n types::CreateOrderRequestData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let request_data = types::CreateOrderRequestData::try_from(self.request.clone())?;\n\n let response_data: Result =\n Err(types::ErrorResponse::default());\n\n let createorder_router_data =\n helpers::router_data_type_conversion::<_, api::CreateOrder, _, _, _, _>(\n self.clone(),\n request_data,\n response_data,\n );\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &createorder_router_data,\n payments::CallConnectorAction::Trigger,\n None,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n let create_order_resp = match resp.response {\n Ok(res) => {\n if let types::PaymentsResponseData::PaymentsCreateOrderResponse { order_id } =\n res\n {\n Ok(order_id)\n } else {\n Err(error_stack::report!(ApiErrorResponse::InternalServerError)\n .attach_printable(format!(\n \"Unexpected response format from connector: {res:?}\",\n )))?\n }\n }\n Err(error) => Err(error),\n };\n\n Ok(Some(types::CreateOrderResult {\n create_order_result: create_order_resp,\n }))\n } else {\n // If the connector does not require order creation, return None\n Ok(None)\n }\n }\n\n fn update_router_data_with_create_order_response(\n &mut self,\n create_order_result: types::CreateOrderResult,\n ) {\n match create_order_result.create_order_result {\n Ok(order_id) => {\n self.request.order_id = Some(order_id.clone()); // ? why this is assigned here and ucs also wants this to populate data\n self.response =\n Ok(types::PaymentsResponseData::PaymentsCreateOrderResponse { order_id });\n }\n Err(err) => {\n self.response = Err(err.clone());\n }\n }\n }\n\n #[cfg(feature = \"v2\")]\n async fn call_unified_connector_service_with_external_vault_proxy<'a>(\n &mut self,\n state: &SessionState,\n header_payload: &domain_payments::HeaderPayload,\n lineage_ids: grpc_client::LineageIds,\n merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n external_vault_merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n merchant_context: &domain::MerchantContext,\n unified_connector_service_execution_mode: enums::ExecutionMode,\n merchant_order_reference_id: Option,\n ) -> RouterResult<()> {\n let client = state\n .grpc_client\n .unified_connector_service_client\n .clone()\n .ok_or(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to fetch Unified Connector Service client\")?;\n\n let payment_authorize_request =\n payments_grpc::PaymentServiceAuthorizeRequest::foreign_try_from(&*self)\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct Payment Authorize Request\")?;\n\n let connector_auth_metadata =\n unified_connector_service::build_unified_connector_service_auth_metadata(\n merchant_connector_account,\n merchant_context,\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct request metadata\")?;\n\n let external_vault_proxy_metadata =\n unified_connector_service::build_unified_connector_service_external_vault_proxy_metadata(\n external_vault_merchant_connector_account\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct external vault proxy metadata\")?;\n let merchant_reference_id = header_payload\n .x_reference_id\n .clone()\n .or(merchant_order_reference_id)\n .map(|id| id_type::PaymentReferenceId::from_str(id.as_str()))\n .transpose()\n .inspect_err(|err| logger::warn!(error=?err, \"Invalid Merchant ReferenceId found\"))\n .ok()\n .flatten()\n .map(ucs_types::UcsReferenceId::Payment);\n let headers_builder = state\n .get_grpc_headers_ucs(unified_connector_service_execution_mode)\n .external_vault_proxy_metadata(Some(external_vault_proxy_metadata))\n .merchant_reference_id(merchant_reference_id)\n .lineage_ids(lineage_ids);\n let updated_router_data = Box::pin(ucs_logging_wrapper(\n self.clone(),\n state,\n payment_authorize_request.clone(),\n headers_builder,\n |mut router_data, payment_authorize_request, grpc_headers| async move {\n let response = client\n .payment_authorize(\n payment_authorize_request,\n connector_auth_metadata,\n grpc_headers,\n )\n .await\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to authorize payment\")?;\n\n let payment_authorize_response = response.into_inner();\n\n let ucs_data =\n unified_connector_service::handle_unified_connector_service_response_for_payment_authorize(\n payment_authorize_response.clone(),\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to deserialize UCS response\")?;\n\n let router_data_response = ucs_data.router_data_response.map(|(response, status)|{\n router_data.status = status;\n response\n });\n router_data.response = router_data_response;\n router_data.raw_connector_response = payment_authorize_response\n .raw_connector_response\n .clone()\n .map(|raw_connector_response| raw_connector_response.expose().into());\n router_data.connector_http_status_code = Some(ucs_data.status_code);\n\n Ok((router_data, payment_authorize_response))\n }\n )).await?;\n\n // Copy back the updated data\n *self = updated_router_data;\n Ok(())\n }\n}", + "after_code": "impl Feature\n for types::ExternalVaultProxyPaymentsRouterData\n{\n async fn decide_flows<'a>(\n mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n business_profile: &domain::Profile,\n header_payload: domain_payments::HeaderPayload,\n return_raw_connector_response: Option,\n gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::ExternalVaultProxy,\n types::ExternalVaultProxyPaymentsData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n logger::debug!(auth_type=?self.auth_type);\n let mut auth_router_data = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action.clone(),\n connector_request,\n return_raw_connector_response,\n )\n .await\n .to_payment_failed_response()?;\n\n // External vault proxy doesn't use integrity checks\n auth_router_data.integrity_check = Ok(());\n metrics::PAYMENT_COUNT.add(1, &[]);\n\n Ok(auth_router_data)\n }\n\n async fn add_access_token<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n _merchant_context: &domain::MerchantContext,\n creds_identifier: Option<&str>,\n ) -> RouterResult {\n access_token::add_access_token(state, connector, self, creds_identifier).await\n }\n\n async fn add_session_token<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n ) -> RouterResult\n where\n Self: Sized,\n {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::AuthorizeSessionToken,\n types::AuthorizeSessionTokenData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n let authorize_data = &types::PaymentsAuthorizeSessionTokenRouterData::foreign_from((\n &self,\n types::AuthorizeSessionTokenData::foreign_from(&self),\n ));\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n authorize_data,\n payments::CallConnectorAction::Trigger,\n None,\n None,\n )\n .await\n .to_payment_failed_response()?;\n let mut router_data = self;\n router_data.session_token = resp.session_token;\n Ok(router_data)\n }\n\n async fn add_payment_method_token<'a>(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n tokenization_action: &payments::TokenizationAction,\n should_continue_payment: bool,\n ) -> RouterResult {\n let request = self.request.clone();\n tokenization::add_payment_method_token(\n state,\n connector,\n tokenization_action,\n self,\n types::PaymentMethodTokenizationData::try_from(request)?,\n should_continue_payment,\n )\n .await\n }\n\n async fn preprocessing_steps<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n ) -> RouterResult {\n todo!()\n }\n\n async fn postprocessing_steps<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n ) -> RouterResult {\n todo!()\n }\n\n async fn create_connector_customer<'a>(\n &self,\n state: &SessionState,\n connector: &api::ConnectorData,\n ) -> RouterResult> {\n customers::create_connector_customer(\n state,\n connector,\n self,\n types::ConnectorCustomerData::try_from(self)?,\n )\n .await\n }\n\n async fn build_flow_specific_connector_request(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n ) -> RouterResult<(Option, bool)> {\n match call_connector_action {\n payments::CallConnectorAction::Trigger => {\n connector\n .connector\n .validate_connector_against_payment_request(\n self.request.capture_method,\n self.payment_method,\n self.request.payment_method_type,\n )\n .to_payment_failed_response()?;\n\n // Check if the connector supports mandate payment\n // if the payment_method_type does not support mandate for the given connector, downgrade the setup future usage to on session\n if self.request.setup_future_usage\n == Some(diesel_models::enums::FutureUsage::OffSession)\n && !self\n .request\n .payment_method_type\n .and_then(|payment_method_type| {\n state\n .conf\n .mandates\n .supported_payment_methods\n .0\n .get(&enums::PaymentMethod::from(payment_method_type))\n .and_then(|supported_pm_for_mandates| {\n supported_pm_for_mandates.0.get(&payment_method_type).map(\n |supported_connector_for_mandates| {\n supported_connector_for_mandates\n .connector_list\n .contains(&connector.connector_name)\n },\n )\n })\n })\n .unwrap_or(false)\n {\n // downgrade the setup future usage to on session\n self.request.setup_future_usage =\n Some(diesel_models::enums::FutureUsage::OnSession);\n };\n\n // External vault proxy doesn't use regular payment method validation\n // Skip mandate payment validation for external vault proxy\n\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::ExternalVaultProxy,\n types::ExternalVaultProxyPaymentsData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n metrics::EXECUTE_PRETASK_COUNT.add(\n 1,\n router_env::metric_attributes!(\n (\"connector\", connector.connector_name.to_string()),\n (\"flow\", format!(\"{:?}\", api::ExternalVaultProxy)),\n ),\n );\n\n logger::debug!(completed_pre_tasks=?true);\n\n // External vault proxy always proceeds\n Ok((\n connector_integration\n .build_request(self, &state.conf.connectors)\n .to_payment_failed_response()?,\n true,\n ))\n }\n _ => Ok((None, true)),\n }\n }\n\n async fn create_order_at_connector(\n &mut self,\n state: &SessionState,\n connector: &api::ConnectorData,\n should_continue_payment: bool,\n ) -> RouterResult> {\n if connector\n .connector_name\n .requires_order_creation_before_payment(self.payment_method)\n && should_continue_payment\n {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::CreateOrder,\n types::CreateOrderRequestData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let request_data = types::CreateOrderRequestData::try_from(self.request.clone())?;\n\n let response_data: Result =\n Err(types::ErrorResponse::default());\n\n let createorder_router_data =\n helpers::router_data_type_conversion::<_, api::CreateOrder, _, _, _, _>(\n self.clone(),\n request_data,\n response_data,\n );\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &createorder_router_data,\n payments::CallConnectorAction::Trigger,\n None,\n None,\n )\n .await\n .to_payment_failed_response()?;\n\n let create_order_resp = match resp.response {\n Ok(res) => {\n if let types::PaymentsResponseData::PaymentsCreateOrderResponse { order_id } =\n res\n {\n Ok(order_id)\n } else {\n Err(error_stack::report!(ApiErrorResponse::InternalServerError)\n .attach_printable(format!(\n \"Unexpected response format from connector: {res:?}\",\n )))?\n }\n }\n Err(error) => Err(error),\n };\n\n Ok(Some(types::CreateOrderResult {\n create_order_result: create_order_resp,\n }))\n } else {\n // If the connector does not require order creation, return None\n Ok(None)\n }\n }\n\n fn update_router_data_with_create_order_response(\n &mut self,\n create_order_result: types::CreateOrderResult,\n ) {\n match create_order_result.create_order_result {\n Ok(order_id) => {\n self.request.order_id = Some(order_id.clone()); // ? why this is assigned here and ucs also wants this to populate data\n self.response =\n Ok(types::PaymentsResponseData::PaymentsCreateOrderResponse { order_id });\n }\n Err(err) => {\n self.response = Err(err.clone());\n }\n }\n }\n\n #[cfg(feature = \"v2\")]\n async fn call_unified_connector_service_with_external_vault_proxy<'a>(\n &mut self,\n state: &SessionState,\n header_payload: &domain_payments::HeaderPayload,\n lineage_ids: grpc_client::LineageIds,\n merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n external_vault_merchant_connector_account: domain::MerchantConnectorAccountTypeDetails,\n merchant_context: &domain::MerchantContext,\n unified_connector_service_execution_mode: enums::ExecutionMode,\n merchant_order_reference_id: Option,\n ) -> RouterResult<()> {\n let client = state\n .grpc_client\n .unified_connector_service_client\n .clone()\n .ok_or(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to fetch Unified Connector Service client\")?;\n\n let payment_authorize_request =\n payments_grpc::PaymentServiceAuthorizeRequest::foreign_try_from(&*self)\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct Payment Authorize Request\")?;\n\n let connector_auth_metadata =\n unified_connector_service::build_unified_connector_service_auth_metadata(\n merchant_connector_account,\n merchant_context,\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct request metadata\")?;\n\n let external_vault_proxy_metadata =\n unified_connector_service::build_unified_connector_service_external_vault_proxy_metadata(\n external_vault_merchant_connector_account\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to construct external vault proxy metadata\")?;\n let merchant_reference_id = header_payload\n .x_reference_id\n .clone()\n .or(merchant_order_reference_id)\n .map(|id| id_type::PaymentReferenceId::from_str(id.as_str()))\n .transpose()\n .inspect_err(|err| logger::warn!(error=?err, \"Invalid Merchant ReferenceId found\"))\n .ok()\n .flatten()\n .map(ucs_types::UcsReferenceId::Payment);\n let headers_builder = state\n .get_grpc_headers_ucs(unified_connector_service_execution_mode)\n .external_vault_proxy_metadata(Some(external_vault_proxy_metadata))\n .merchant_reference_id(merchant_reference_id)\n .lineage_ids(lineage_ids);\n let updated_router_data = Box::pin(ucs_logging_wrapper(\n self.clone(),\n state,\n payment_authorize_request.clone(),\n headers_builder,\n |mut router_data, payment_authorize_request, grpc_headers| async move {\n let response = client\n .payment_authorize(\n payment_authorize_request,\n connector_auth_metadata,\n grpc_headers,\n )\n .await\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to authorize payment\")?;\n\n let payment_authorize_response = response.into_inner();\n\n let ucs_data =\n unified_connector_service::handle_unified_connector_service_response_for_payment_authorize(\n payment_authorize_response.clone(),\n )\n .change_context(ApiErrorResponse::InternalServerError)\n .attach_printable(\"Failed to deserialize UCS response\")?;\n\n let router_data_response = ucs_data.router_data_response.map(|(response, status)|{\n router_data.status = status;\n response\n });\n router_data.response = router_data_response;\n router_data.raw_connector_response = payment_authorize_response\n .raw_connector_response\n .clone()\n .map(|raw_connector_response| raw_connector_response.expose().into());\n router_data.connector_http_status_code = Some(ucs_data.status_code);\n\n Ok((router_data, payment_authorize_response))\n }\n )).await?;\n\n // Copy back the updated data\n *self = updated_router_data;\n Ok(())\n }\n}", + "diff_span": { + "before": "", + "after": " header_payload: domain_payments::HeaderPayload,\n return_raw_connector_response: Option,\n gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/configs/settings.rs::struct::Server", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Server {\n pub port: u16,\n pub workers: usize,\n pub host: String,\n pub request_body_limit: usize,\n pub shutdown_timeout: u64,\n #[cfg(feature = \"tls\")]\n pub tls: Option,\n}", + "after_code": "pub struct Server {\n pub port: u16,\n pub workers: usize,\n pub host: String,\n pub request_body_limit: usize,\n pub shutdown_timeout: u64,\n #[cfg(feature = \"tls\")]\n pub tls: Option,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::NetworkTokenizationSupportedConnectors", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct NetworkTokenizationSupportedConnectors {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub connector_list: HashSet,\n}", + "after_code": "pub struct NetworkTokenizationSupportedConnectors {\n #[serde(deserialize_with = \"deserialize_hashset\")]\n pub connector_list: HashSet,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use super::deserialize_hashset;", + "use api_models::enums;", + "use std::collections::HashSet;", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use std::collections::{HashMap, HashSet};", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use super::deserialize_hashset;", + "use api_models::enums;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use std::collections::HashSet;" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::const::REQUIRED_FIELDS_CONFIG_FILE", + "file": "crates/router/src/configs/settings.rs", + "kind": "const_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub const REQUIRED_FIELDS_CONFIG_FILE: &str = \"payment_required_fields_v2.toml\";", + "after_code": "pub const REQUIRED_FIELDS_CONFIG_FILE: &str = \"payment_required_fields_v2.toml\";", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_cancellation_reason", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n todo!()\n }", + "after_code": "fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::get_disputes", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_disputes(&self) -> Vec {\n todo!()\n }", + "after_code": "fn get_disputes(&self) -> Vec {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::impl::Settings", + "file": "crates/router/src/configs/settings.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Settings {\n pub fn new() -> ApplicationResult {\n Self::with_config_path(None)\n }\n\n pub fn with_config_path(config_path: Option) -> ApplicationResult {\n // Configuration values are picked up in the following priority order (1 being least\n // priority):\n // 1. Defaults from the implementation of the `Default` trait.\n // 2. Values from config file. The config file accessed depends on the environment\n // specified by the `RUN_ENV` environment variable. `RUN_ENV` can be one of\n // `development`, `sandbox` or `production`. If nothing is specified for `RUN_ENV`,\n // `/config/development.toml` file is read.\n // 3. Environment variables prefixed with `ROUTER` and each level separated by double\n // underscores.\n //\n // Values in config file override the defaults in `Default` trait, and the values set using\n // environment variables override both the defaults and the config file values.\n\n let environment = env::which();\n let config_path = router_env::Config::config_path(&environment.to_string(), config_path);\n\n let config = router_env::Config::builder(&environment.to_string())\n .change_context(ApplicationError::ConfigurationError)?\n .add_source(File::from(config_path).required(false));\n\n #[cfg(feature = \"v2\")]\n let config = {\n let required_fields_config_file =\n router_env::Config::get_config_directory().join(REQUIRED_FIELDS_CONFIG_FILE);\n config.add_source(File::from(required_fields_config_file).required(false))\n };\n\n let config = config\n .add_source(\n Environment::with_prefix(\"ROUTER\")\n .try_parsing(true)\n .separator(\"__\")\n .list_separator(\",\")\n .with_list_parse_key(\"log.telemetry.route_to_trace\")\n .with_list_parse_key(\"redis.cluster_urls\")\n .with_list_parse_key(\"events.kafka.brokers\")\n .with_list_parse_key(\"connectors.supported.wallets\")\n .with_list_parse_key(\"connector_request_reference_id_config.merchant_ids_send_payment_id_as_connector_request_id\"),\n\n )\n .build()\n .change_context(ApplicationError::ConfigurationError)?;\n\n let mut settings: Self = serde_path_to_error::deserialize(config)\n .attach_printable(\"Unable to deserialize application configuration\")\n .change_context(ApplicationError::ConfigurationError)?;\n #[cfg(feature = \"v1\")]\n {\n settings.required_fields = RequiredFields::new(&settings.bank_config);\n }\n Ok(settings)\n }\n\n pub fn validate(&self) -> ApplicationResult<()> {\n self.server.validate()?;\n self.master_database.get_inner().validate()?;\n #[cfg(feature = \"olap\")]\n self.replica_database.get_inner().validate()?;\n\n // The logger may not yet be initialized when validating the application configuration\n #[allow(clippy::print_stderr)]\n self.redis.validate().map_err(|error| {\n eprintln!(\"{error}\");\n ApplicationError::InvalidConfigurationValueError(\"Redis configuration\".into())\n })?;\n\n if self.log.file.enabled {\n if self.log.file.file_name.is_default_or_empty() {\n return Err(error_stack::Report::from(\n ApplicationError::InvalidConfigurationValueError(\n \"log file name must not be empty\".into(),\n ),\n ));\n }\n\n if self.log.file.path.is_default_or_empty() {\n return Err(error_stack::Report::from(\n ApplicationError::InvalidConfigurationValueError(\n \"log directory path must not be empty\".into(),\n ),\n ));\n }\n }\n self.secrets.get_inner().validate()?;\n self.locker.validate()?;\n self.connectors.validate(\"connectors\")?;\n self.chat.get_inner().validate()?;\n self.cors.validate()?;\n\n self.scheduler\n .as_ref()\n .map(|scheduler_settings| scheduler_settings.validate())\n .transpose()?;\n #[cfg(feature = \"kv_store\")]\n self.drainer.validate()?;\n self.api_keys.get_inner().validate()?;\n\n self.file_storage\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n self.crm\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n self.lock_settings.validate()?;\n self.events.validate()?;\n\n #[cfg(feature = \"olap\")]\n self.opensearch.validate()?;\n\n self.encryption_management\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.into()))?;\n\n self.secrets_management\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.into()))?;\n self.generic_link.payment_method_collect.validate()?;\n self.generic_link.payout_link.validate()?;\n\n #[cfg(feature = \"v2\")]\n self.cell_information.validate()?;\n self.network_tokenization_service\n .as_ref()\n .map(|x| x.get_inner().validate())\n .transpose()?;\n\n self.paze_decrypt_keys\n .as_ref()\n .map(|x| x.get_inner().validate())\n .transpose()?;\n\n self.google_pay_decrypt_keys\n .as_ref()\n .map(|x| x.validate())\n .transpose()?;\n\n self.key_manager.get_inner().validate()?;\n #[cfg(feature = \"email\")]\n self.email\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.into()))?;\n\n self.theme\n .storage\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n self.platform.validate()?;\n\n self.open_router.validate()?;\n\n // Validate gRPC client settings\n #[cfg(feature = \"revenue_recovery\")]\n self.grpc_client\n .recovery_decider_client\n .as_ref()\n .map(|config| config.validate())\n .transpose()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n self.superposition\n .get_inner()\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n Ok(())\n }\n}", + "after_code": "impl Settings {\n pub fn new() -> ApplicationResult {\n Self::with_config_path(None)\n }\n\n pub fn with_config_path(config_path: Option) -> ApplicationResult {\n // Configuration values are picked up in the following priority order (1 being least\n // priority):\n // 1. Defaults from the implementation of the `Default` trait.\n // 2. Values from config file. The config file accessed depends on the environment\n // specified by the `RUN_ENV` environment variable. `RUN_ENV` can be one of\n // `development`, `sandbox` or `production`. If nothing is specified for `RUN_ENV`,\n // `/config/development.toml` file is read.\n // 3. Environment variables prefixed with `ROUTER` and each level separated by double\n // underscores.\n //\n // Values in config file override the defaults in `Default` trait, and the values set using\n // environment variables override both the defaults and the config file values.\n\n let environment = env::which();\n let config_path = router_env::Config::config_path(&environment.to_string(), config_path);\n\n let config = router_env::Config::builder(&environment.to_string())\n .change_context(ApplicationError::ConfigurationError)?\n .add_source(File::from(config_path).required(false));\n\n #[cfg(feature = \"v2\")]\n let config = {\n let required_fields_config_file =\n router_env::Config::get_config_directory().join(REQUIRED_FIELDS_CONFIG_FILE);\n config.add_source(File::from(required_fields_config_file).required(false))\n };\n\n let config = config\n .add_source(\n Environment::with_prefix(\"ROUTER\")\n .try_parsing(true)\n .separator(\"__\")\n .list_separator(\",\")\n .with_list_parse_key(\"log.telemetry.route_to_trace\")\n .with_list_parse_key(\"redis.cluster_urls\")\n .with_list_parse_key(\"events.kafka.brokers\")\n .with_list_parse_key(\"connectors.supported.wallets\")\n .with_list_parse_key(\"connector_request_reference_id_config.merchant_ids_send_payment_id_as_connector_request_id\"),\n\n )\n .build()\n .change_context(ApplicationError::ConfigurationError)?;\n\n let mut settings: Self = serde_path_to_error::deserialize(config)\n .attach_printable(\"Unable to deserialize application configuration\")\n .change_context(ApplicationError::ConfigurationError)?;\n #[cfg(feature = \"v1\")]\n {\n settings.required_fields = RequiredFields::new(&settings.bank_config);\n }\n Ok(settings)\n }\n\n pub fn validate(&self) -> ApplicationResult<()> {\n self.server.validate()?;\n self.master_database.get_inner().validate()?;\n #[cfg(feature = \"olap\")]\n self.replica_database.get_inner().validate()?;\n\n // The logger may not yet be initialized when validating the application configuration\n #[allow(clippy::print_stderr)]\n self.redis.validate().map_err(|error| {\n eprintln!(\"{error}\");\n ApplicationError::InvalidConfigurationValueError(\"Redis configuration\".into())\n })?;\n\n if self.log.file.enabled {\n if self.log.file.file_name.is_default_or_empty() {\n return Err(error_stack::Report::from(\n ApplicationError::InvalidConfigurationValueError(\n \"log file name must not be empty\".into(),\n ),\n ));\n }\n\n if self.log.file.path.is_default_or_empty() {\n return Err(error_stack::Report::from(\n ApplicationError::InvalidConfigurationValueError(\n \"log directory path must not be empty\".into(),\n ),\n ));\n }\n }\n self.secrets.get_inner().validate()?;\n self.locker.validate()?;\n self.connectors.validate(\"connectors\")?;\n self.chat.get_inner().validate()?;\n self.cors.validate()?;\n\n self.scheduler\n .as_ref()\n .map(|scheduler_settings| scheduler_settings.validate())\n .transpose()?;\n #[cfg(feature = \"kv_store\")]\n self.drainer.validate()?;\n self.api_keys.get_inner().validate()?;\n\n self.file_storage\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n self.crm\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n self.lock_settings.validate()?;\n self.events.validate()?;\n\n #[cfg(feature = \"olap\")]\n self.opensearch.validate()?;\n\n self.encryption_management\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.into()))?;\n\n self.secrets_management\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.into()))?;\n self.generic_link.payment_method_collect.validate()?;\n self.generic_link.payout_link.validate()?;\n\n #[cfg(feature = \"v2\")]\n self.cell_information.validate()?;\n self.network_tokenization_service\n .as_ref()\n .map(|x| x.get_inner().validate())\n .transpose()?;\n\n self.paze_decrypt_keys\n .as_ref()\n .map(|x| x.get_inner().validate())\n .transpose()?;\n\n self.google_pay_decrypt_keys\n .as_ref()\n .map(|x| x.validate())\n .transpose()?;\n\n self.key_manager.get_inner().validate()?;\n #[cfg(feature = \"email\")]\n self.email\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.into()))?;\n\n self.theme\n .storage\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n self.platform.validate()?;\n\n self.open_router.validate()?;\n\n // Validate gRPC client settings\n #[cfg(feature = \"revenue_recovery\")]\n self.grpc_client\n .recovery_decider_client\n .as_ref()\n .map(|config| config.validate())\n .transpose()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n self.superposition\n .get_inner()\n .validate()\n .map_err(|err| ApplicationError::InvalidConfigurationValueError(err.to_string()))?;\n\n Ok(())\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "use config::{Environment, File};", + "use serde::de::Error;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use crate::types::storage::revenue_recovery;" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use masking::Secret;", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use config::{Environment, File};", + "use serde::de::Error;", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use crate::types::storage::revenue_recovery;" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::DummyConnector", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl DummyConnector {\n pub fn server(state: AppState) -> Scope {\n let mut routes_with_restricted_access = web::scope(\"\");\n #[cfg(not(feature = \"external_access_dc\"))]\n {\n routes_with_restricted_access =\n routes_with_restricted_access.guard(actix_web::guard::Host(\"localhost\"));\n }\n routes_with_restricted_access = routes_with_restricted_access\n .service(web::resource(\"/payment\").route(web::post().to(dummy_connector_payment)));\n web::scope(\"/dummy-connector\")\n .app_data(web::Data::new(state))\n .service(routes_with_restricted_access)\n }\n}", + "after_code": "impl DummyConnector {\n pub fn server(state: AppState) -> Scope {\n let mut routes_with_restricted_access = web::scope(\"\");\n #[cfg(not(feature = \"external_access_dc\"))]\n {\n routes_with_restricted_access =\n routes_with_restricted_access.guard(actix_web::guard::Host(\"localhost\"));\n }\n routes_with_restricted_access = routes_with_restricted_access\n .service(web::resource(\"/payment\").route(web::post().to(dummy_connector_payment)));\n web::scope(\"/dummy-connector\")\n .app_data(web::Data::new(state))\n .service(routes_with_restricted_access)\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments/flows/session_update_flow.rs::types::RouterData<\n api::SdkSessionUpdate,\n types::SdkPaymentsSessionUpdateData,\n types::PaymentsResponseData,\n >::function::decide_flows", + "file": "crates/router/src/core/payments/flows/session_update_flow.rs", + "kind": "function_item", + "status": "modified", + "code_changed": true, + "imports_changed": false, + "before_code": "async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::SdkSessionUpdate,\n types::SdkPaymentsSessionUpdateData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n }", + "after_code": "async fn decide_flows<'a>(\n self,\n state: &SessionState,\n connector: &api::ConnectorData,\n call_connector_action: payments::CallConnectorAction,\n connector_request: Option,\n _business_profile: &domain::Profile,\n _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<\n api::SdkSessionUpdate,\n types::SdkPaymentsSessionUpdateData,\n types::PaymentsResponseData,\n > = connector.connector.get_connector_integration();\n\n let resp = services::execute_connector_processing_step(\n state,\n connector_integration,\n &self,\n call_connector_action,\n connector_request,\n None,\n )\n .await\n .to_payment_failed_response()?;\n Ok(resp)\n }", + "diff_span": { + "before": "", + "after": " _header_payload: hyperswitch_domain_models::payments::HeaderPayload,\n _return_raw_connector_response: Option,\n _gateway_context: Option,\n ) -> RouterResult {\n let connector_integration: services::BoxedPaymentConnectorIntegrationInterface<" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_surcharge_details", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_surcharge_details(&mut self, surcharge_details: Option) {\n self.surcharge_details = surcharge_details;\n }", + "after_code": "fn set_surcharge_details(&mut self, surcharge_details: Option) {\n self.surcharge_details = surcharge_details;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/routes/app.rs::impl::Cache", + "file": "crates/router/src/routes/app.rs", + "kind": "impl_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "impl Cache {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/cache\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/invalidate/{key}\").route(web::post().to(invalidate)))\n }\n}", + "after_code": "impl Cache {\n pub fn server(state: AppState) -> Scope {\n web::scope(\"/cache\")\n .app_data(web::Data::new(state))\n .service(web::resource(\"/invalidate/{key}\").route(web::post().to(invalidate)))\n }\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "use actix_web::{web, Scope};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::set_connector_request_reference_id_in_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n todo!()\n }", + "after_code": "fn set_connector_request_reference_id_in_payment_attempt(\n &mut self,\n connector_request_reference_id: String,\n ) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }", + "after_code": "fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_amount", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_amount(&self) -> api::Amount {\n todo!()\n }", + "after_code": "fn get_amount(&self) -> api::Amount {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCancelData::function::get_connector_customer_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_connector_customer_id(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_connector_customer_id(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentConfirmData::function::set_payment_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }", + "after_code": "fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) {\n self.payment_attempt = payment_attempt;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::struct::CellInformation", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct CellInformation {\n pub id: id_type::CellId,\n}", + "after_code": "pub struct CellInformation {\n pub id: id_type::CellId,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentStatusData::function::get_connector_customer_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_connector_customer_id(&self) -> Option {\n todo!()\n }", + "after_code": "fn get_connector_customer_id(&self) -> Option {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::get_token_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_token_data(&self) -> Option<&storage::PaymentTokenData> {\n todo!()\n }", + "after_code": "fn get_token_data(&self) -> Option<&storage::PaymentTokenData> {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_connector_customer_id", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_connector_customer_id(&mut self, _customer_id: Option) {\n // TODO: handle this case. Should we add connector_customer_id in paymentConfirmData?\n }", + "after_code": "fn set_connector_customer_id(&mut self, _customer_id: Option) {\n // TODO: handle this case. Should we add connector_customer_id in paymentConfirmData?\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::get_all_keys_required", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn get_all_keys_required(&self) -> Option {\n self.all_keys_required\n }", + "after_code": "fn get_all_keys_required(&self) -> Option {\n self.all_keys_required\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::struct::PaymentData", + "file": "crates/router/src/core/payments.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct PaymentData\nwhere\n F: Clone,\n{\n pub flow: PhantomData,\n pub payment_intent: storage::PaymentIntent,\n pub payment_attempt: storage::PaymentAttempt,\n pub multiple_capture_data: Option,\n pub amount: api::Amount,\n pub mandate_id: Option,\n pub mandate_connector: Option,\n pub currency: storage_enums::Currency,\n pub setup_mandate: Option,\n pub customer_acceptance: Option,\n pub address: PaymentAddress,\n pub token: Option,\n pub token_data: Option,\n pub confirm: Option,\n pub force_sync: Option,\n pub all_keys_required: Option,\n pub payment_method_data: Option,\n pub payment_method_token: Option,\n pub payment_method_info: Option,\n pub refunds: Vec,\n pub disputes: Vec,\n pub attempts: Option>,\n pub sessions_token: Vec,\n pub card_cvc: Option>,\n pub email: Option,\n pub creds_identifier: Option,\n pub pm_token: Option,\n pub connector_customer_id: Option,\n pub recurring_mandate_payment_data:\n Option,\n pub ephemeral_key: Option,\n pub redirect_response: Option,\n pub surcharge_details: Option,\n pub frm_message: Option,\n pub payment_link_data: Option,\n pub incremental_authorization_details: Option,\n pub authorizations: Vec,\n pub authentication: Option,\n pub recurring_details: Option,\n pub poll_config: Option,\n pub tax_data: Option,\n pub session_id: Option,\n pub service_details: Option,\n pub card_testing_guard_data:\n Option,\n pub vault_operation: Option,\n pub threeds_method_comp_ind: Option,\n pub whole_connector_response: Option>,\n pub is_manual_retry_enabled: Option,\n pub is_l2_l3_enabled: bool,\n}", + "after_code": "pub struct PaymentData\nwhere\n F: Clone,\n{\n pub flow: PhantomData,\n pub payment_intent: storage::PaymentIntent,\n pub payment_attempt: storage::PaymentAttempt,\n pub multiple_capture_data: Option,\n pub amount: api::Amount,\n pub mandate_id: Option,\n pub mandate_connector: Option,\n pub currency: storage_enums::Currency,\n pub setup_mandate: Option,\n pub customer_acceptance: Option,\n pub address: PaymentAddress,\n pub token: Option,\n pub token_data: Option,\n pub confirm: Option,\n pub force_sync: Option,\n pub all_keys_required: Option,\n pub payment_method_data: Option,\n pub payment_method_token: Option,\n pub payment_method_info: Option,\n pub refunds: Vec,\n pub disputes: Vec,\n pub attempts: Option>,\n pub sessions_token: Vec,\n pub card_cvc: Option>,\n pub email: Option,\n pub creds_identifier: Option,\n pub pm_token: Option,\n pub connector_customer_id: Option,\n pub recurring_mandate_payment_data:\n Option,\n pub ephemeral_key: Option,\n pub redirect_response: Option,\n pub surcharge_details: Option,\n pub frm_message: Option,\n pub payment_link_data: Option,\n pub incremental_authorization_details: Option,\n pub authorizations: Vec,\n pub authentication: Option,\n pub recurring_details: Option,\n pub poll_config: Option,\n pub tax_data: Option,\n pub session_id: Option,\n pub service_details: Option,\n pub card_testing_guard_data:\n Option,\n pub vault_operation: Option,\n pub threeds_method_comp_ind: Option,\n pub whole_connector_response: Option>,\n pub is_manual_retry_enabled: Option,\n pub is_l2_l3_enabled: bool,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use masking::{ExposeInterface, PeekInterface, Secret};", + "use crate::core::payment_methods::vault;", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::BlockListCheck::function::execute_check", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "async fn execute_check(\n &self,\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n payment_elgibility_data: &PaymentEligibilityData,\n _business_profile: &domain::Profile,\n ) -> CustomResult {\n let should_payment_be_blocked = blocklist_utils::should_payment_be_blocked(\n state,\n merchant_context,\n &payment_elgibility_data.payment_method_data,\n )\n .await?;\n if should_payment_be_blocked {\n Ok(CheckResult::Deny {\n message: \"Card number is blocklisted\".to_string(),\n })\n } else {\n Ok(CheckResult::Allow)\n }\n }", + "after_code": "async fn execute_check(\n &self,\n state: &SessionState,\n merchant_context: &domain::MerchantContext,\n payment_elgibility_data: &PaymentEligibilityData,\n _business_profile: &domain::Profile,\n ) -> CustomResult {\n let should_payment_be_blocked = blocklist_utils::should_payment_be_blocked(\n state,\n merchant_context,\n &payment_elgibility_data.payment_method_data,\n )\n .await?;\n if should_payment_be_blocked {\n Ok(CheckResult::Deny {\n message: \"Card number is blocklisted\".to_string(),\n })\n } else {\n Ok(CheckResult::Allow)\n }\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_recurring_mandate_payment_data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_recurring_mandate_payment_data(\n &mut self,\n recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n self.recurring_mandate_payment_data = Some(recurring_mandate_payment_data);\n }", + "after_code": "fn set_recurring_mandate_payment_data(\n &mut self,\n recurring_mandate_payment_data:\n hyperswitch_domain_models::router_data::RecurringMandatePaymentData,\n ) {\n self.recurring_mandate_payment_data = Some(recurring_mandate_payment_data);\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::payments_manual_update", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn payments_manual_update(\n state: SessionState,\n req: api_models::payments::PaymentsManualUpdateRequest,\n) -> RouterResponse {\n let api_models::payments::PaymentsManualUpdateRequest {\n payment_id,\n attempt_id,\n merchant_id,\n attempt_status,\n error_code,\n error_message,\n error_reason,\n connector_transaction_id,\n amount_capturable,\n } = req;\n let key_manager_state = &(&state).into();\n let key_store = state\n .store\n .get_merchant_key_store_by_merchant_id(\n key_manager_state,\n &merchant_id,\n &state.store.get_master_key().to_vec().into(),\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::MerchantAccountNotFound)\n .attach_printable(\"Error while fetching the key store by merchant_id\")?;\n let merchant_account = state\n .store\n .find_merchant_account_by_merchant_id(key_manager_state, &merchant_id, &key_store)\n .await\n .to_not_found_response(errors::ApiErrorResponse::MerchantAccountNotFound)\n .attach_printable(\"Error while fetching the merchant_account by merchant_id\")?;\n let payment_attempt = state\n .store\n .find_payment_attempt_by_payment_id_merchant_id_attempt_id(\n &payment_id,\n &merchant_id,\n &attempt_id.clone(),\n merchant_account.storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)\n .attach_printable(\n \"Error while fetching the payment_attempt by payment_id, merchant_id and attempt_id\",\n )?;\n\n if let Some(amount_capturable) = amount_capturable {\n utils::when(\n amount_capturable > payment_attempt.net_amount.get_total_amount(),\n || {\n Err(errors::ApiErrorResponse::InvalidRequestData {\n message: \"amount_capturable should be less than or equal to amount\".to_string(),\n })\n },\n )?;\n }\n\n let payment_intent = state\n .store\n .find_payment_intent_by_payment_id_merchant_id(\n key_manager_state,\n &payment_id,\n merchant_account.get_id(),\n &key_store,\n merchant_account.storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)\n .attach_printable(\"Error while fetching the payment_intent by payment_id, merchant_id\")?;\n\n let option_gsm = if let Some(((code, message), connector_name)) = error_code\n .as_ref()\n .zip(error_message.as_ref())\n .zip(payment_attempt.connector.as_ref())\n {\n helpers::get_gsm_record(\n &state,\n Some(code.to_string()),\n Some(message.to_string()),\n connector_name.to_string(),\n // We need to get the unified_code and unified_message of the Authorize flow\n \"Authorize\".to_string(),\n )\n .await\n } else {\n None\n };\n // Update the payment_attempt\n let attempt_update = storage::PaymentAttemptUpdate::ManualUpdate {\n status: attempt_status,\n error_code,\n error_message,\n error_reason,\n updated_by: merchant_account.storage_scheme.to_string(),\n unified_code: option_gsm.as_ref().and_then(|gsm| gsm.unified_code.clone()),\n unified_message: option_gsm.and_then(|gsm| gsm.unified_message),\n connector_transaction_id,\n amount_capturable,\n };\n let updated_payment_attempt = state\n .store\n .update_payment_attempt_with_attempt_id(\n payment_attempt.clone(),\n attempt_update,\n merchant_account.storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)\n .attach_printable(\"Error while updating the payment_attempt\")?;\n // If the payment_attempt is active attempt for an intent, update the intent status\n if payment_intent.active_attempt.get_id() == payment_attempt.attempt_id {\n let intent_status = enums::IntentStatus::foreign_from(updated_payment_attempt.status);\n let payment_intent_update = storage::PaymentIntentUpdate::ManualUpdate {\n status: Some(intent_status),\n updated_by: merchant_account.storage_scheme.to_string(),\n };\n state\n .store\n .update_payment_intent(\n key_manager_state,\n payment_intent,\n payment_intent_update,\n &key_store,\n merchant_account.storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)\n .attach_printable(\"Error while updating payment_intent\")?;\n }\n Ok(services::ApplicationResponse::Json(\n api_models::payments::PaymentsManualUpdateResponse {\n payment_id: updated_payment_attempt.payment_id,\n attempt_id: updated_payment_attempt.attempt_id,\n merchant_id: updated_payment_attempt.merchant_id,\n attempt_status: updated_payment_attempt.status,\n error_code: updated_payment_attempt.error_code,\n error_message: updated_payment_attempt.error_message,\n error_reason: updated_payment_attempt.error_reason,\n connector_transaction_id: updated_payment_attempt.connector_transaction_id,\n amount_capturable: Some(updated_payment_attempt.amount_capturable),\n },\n ))\n}", + "after_code": "pub async fn payments_manual_update(\n state: SessionState,\n req: api_models::payments::PaymentsManualUpdateRequest,\n) -> RouterResponse {\n let api_models::payments::PaymentsManualUpdateRequest {\n payment_id,\n attempt_id,\n merchant_id,\n attempt_status,\n error_code,\n error_message,\n error_reason,\n connector_transaction_id,\n amount_capturable,\n } = req;\n let key_manager_state = &(&state).into();\n let key_store = state\n .store\n .get_merchant_key_store_by_merchant_id(\n key_manager_state,\n &merchant_id,\n &state.store.get_master_key().to_vec().into(),\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::MerchantAccountNotFound)\n .attach_printable(\"Error while fetching the key store by merchant_id\")?;\n let merchant_account = state\n .store\n .find_merchant_account_by_merchant_id(key_manager_state, &merchant_id, &key_store)\n .await\n .to_not_found_response(errors::ApiErrorResponse::MerchantAccountNotFound)\n .attach_printable(\"Error while fetching the merchant_account by merchant_id\")?;\n let payment_attempt = state\n .store\n .find_payment_attempt_by_payment_id_merchant_id_attempt_id(\n &payment_id,\n &merchant_id,\n &attempt_id.clone(),\n merchant_account.storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)\n .attach_printable(\n \"Error while fetching the payment_attempt by payment_id, merchant_id and attempt_id\",\n )?;\n\n if let Some(amount_capturable) = amount_capturable {\n utils::when(\n amount_capturable > payment_attempt.net_amount.get_total_amount(),\n || {\n Err(errors::ApiErrorResponse::InvalidRequestData {\n message: \"amount_capturable should be less than or equal to amount\".to_string(),\n })\n },\n )?;\n }\n\n let payment_intent = state\n .store\n .find_payment_intent_by_payment_id_merchant_id(\n key_manager_state,\n &payment_id,\n merchant_account.get_id(),\n &key_store,\n merchant_account.storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)\n .attach_printable(\"Error while fetching the payment_intent by payment_id, merchant_id\")?;\n\n let option_gsm = if let Some(((code, message), connector_name)) = error_code\n .as_ref()\n .zip(error_message.as_ref())\n .zip(payment_attempt.connector.as_ref())\n {\n helpers::get_gsm_record(\n &state,\n Some(code.to_string()),\n Some(message.to_string()),\n connector_name.to_string(),\n // We need to get the unified_code and unified_message of the Authorize flow\n \"Authorize\".to_string(),\n )\n .await\n } else {\n None\n };\n // Update the payment_attempt\n let attempt_update = storage::PaymentAttemptUpdate::ManualUpdate {\n status: attempt_status,\n error_code,\n error_message,\n error_reason,\n updated_by: merchant_account.storage_scheme.to_string(),\n unified_code: option_gsm.as_ref().and_then(|gsm| gsm.unified_code.clone()),\n unified_message: option_gsm.and_then(|gsm| gsm.unified_message),\n connector_transaction_id,\n amount_capturable,\n };\n let updated_payment_attempt = state\n .store\n .update_payment_attempt_with_attempt_id(\n payment_attempt.clone(),\n attempt_update,\n merchant_account.storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)\n .attach_printable(\"Error while updating the payment_attempt\")?;\n // If the payment_attempt is active attempt for an intent, update the intent status\n if payment_intent.active_attempt.get_id() == payment_attempt.attempt_id {\n let intent_status = enums::IntentStatus::foreign_from(updated_payment_attempt.status);\n let payment_intent_update = storage::PaymentIntentUpdate::ManualUpdate {\n status: Some(intent_status),\n updated_by: merchant_account.storage_scheme.to_string(),\n };\n state\n .store\n .update_payment_intent(\n key_manager_state,\n payment_intent,\n payment_intent_update,\n &key_store,\n merchant_account.storage_scheme,\n )\n .await\n .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)\n .attach_printable(\"Error while updating payment_intent\")?;\n }\n Ok(services::ApplicationResponse::Json(\n api_models::payments::PaymentsManualUpdateResponse {\n payment_id: updated_payment_attempt.payment_id,\n attempt_id: updated_payment_attempt.attempt_id,\n merchant_id: updated_payment_attempt.merchant_id,\n attempt_status: updated_payment_attempt.status,\n error_code: updated_payment_attempt.error_code,\n error_message: updated_payment_attempt.error_message,\n error_reason: updated_payment_attempt.error_reason,\n connector_transaction_id: updated_payment_attempt.connector_transaction_id,\n amount_capturable: Some(updated_payment_attempt.amount_capturable),\n },\n ))\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentCaptureData::function::set_card_network", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n todo!()\n }", + "after_code": "fn set_card_network(&mut self, card_network: enums::CardNetwork) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentData::function::set_authentication_type_in_attempt", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_authentication_type_in_attempt(\n &mut self,\n authentication_type: Option,\n ) {\n self.payment_attempt.authentication_type = authentication_type;\n }", + "after_code": "fn set_authentication_type_in_attempt(\n &mut self,\n authentication_type: Option,\n ) {\n self.payment_attempt.authentication_type = authentication_type;\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::get_all_action_types", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn get_all_action_types(\n state: &SessionState,\n is_connector_agnostic_mit_enabled: Option,\n is_network_tokenization_enabled: bool,\n payment_method_info: &domain::PaymentMethod,\n connector: api::ConnectorData,\n) -> Vec {\n let merchant_connector_id = connector.merchant_connector_id.as_ref();\n\n //fetch connectors that support ntid flow\n let ntid_supported_connectors = &state\n .conf\n .network_transaction_id_supported_connectors\n .connector_list;\n\n //fetch connectors that support network tokenization flow\n let network_tokenization_supported_connectors = &state\n .conf\n .network_tokenization_supported_connectors\n .connector_list;\n\n let is_network_token_with_ntid_flow = is_network_token_with_network_transaction_id_flow(\n is_connector_agnostic_mit_enabled,\n is_network_tokenization_enabled,\n payment_method_info,\n );\n let is_card_with_ntid_flow = is_network_transaction_id_flow(\n state,\n is_connector_agnostic_mit_enabled,\n connector.connector_name,\n payment_method_info,\n );\n let payments_mandate_reference = payment_method_info\n .get_common_mandate_reference()\n .map_err(|err| {\n logger::warn!(\"Error getting connector mandate details: {:?}\", err);\n err\n })\n .ok()\n .and_then(|details| details.payments);\n\n let is_mandate_flow = payments_mandate_reference\n .clone()\n .zip(merchant_connector_id)\n .map(|(details, merchant_connector_id)| details.contains_key(merchant_connector_id))\n .unwrap_or(false);\n\n let is_nt_with_ntid_supported_connector = ntid_supported_connectors\n .contains(&connector.connector_name)\n && network_tokenization_supported_connectors.contains(&connector.connector_name);\n\n ActionTypesBuilder::new()\n .with_mandate_flow(is_mandate_flow, payments_mandate_reference)\n .with_network_tokenization(\n state,\n is_network_token_with_ntid_flow,\n is_nt_with_ntid_supported_connector,\n payment_method_info,\n )\n .await\n .with_card_network_transaction_id(is_card_with_ntid_flow, payment_method_info)\n .build()\n}", + "after_code": "pub async fn get_all_action_types(\n state: &SessionState,\n is_connector_agnostic_mit_enabled: Option,\n is_network_tokenization_enabled: bool,\n payment_method_info: &domain::PaymentMethod,\n connector: api::ConnectorData,\n) -> Vec {\n let merchant_connector_id = connector.merchant_connector_id.as_ref();\n\n //fetch connectors that support ntid flow\n let ntid_supported_connectors = &state\n .conf\n .network_transaction_id_supported_connectors\n .connector_list;\n\n //fetch connectors that support network tokenization flow\n let network_tokenization_supported_connectors = &state\n .conf\n .network_tokenization_supported_connectors\n .connector_list;\n\n let is_network_token_with_ntid_flow = is_network_token_with_network_transaction_id_flow(\n is_connector_agnostic_mit_enabled,\n is_network_tokenization_enabled,\n payment_method_info,\n );\n let is_card_with_ntid_flow = is_network_transaction_id_flow(\n state,\n is_connector_agnostic_mit_enabled,\n connector.connector_name,\n payment_method_info,\n );\n let payments_mandate_reference = payment_method_info\n .get_common_mandate_reference()\n .map_err(|err| {\n logger::warn!(\"Error getting connector mandate details: {:?}\", err);\n err\n })\n .ok()\n .and_then(|details| details.payments);\n\n let is_mandate_flow = payments_mandate_reference\n .clone()\n .zip(merchant_connector_id)\n .map(|(details, merchant_connector_id)| details.contains_key(merchant_connector_id))\n .unwrap_or(false);\n\n let is_nt_with_ntid_supported_connector = ntid_supported_connectors\n .contains(&connector.connector_name)\n && network_tokenization_supported_connectors.contains(&connector.connector_name);\n\n ActionTypesBuilder::new()\n .with_mandate_flow(is_mandate_flow, payments_mandate_reference)\n .with_network_tokenization(\n state,\n is_network_token_with_ntid_flow,\n is_nt_with_ntid_supported_connector,\n payment_method_info,\n )\n .await\n .with_card_network_transaction_id(is_card_with_ntid_flow, payment_method_info)\n .build()\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentEvent::function::data", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn data(&self) -> error_stack::Result {\n Ok(self.clone())\n }", + "after_code": "fn data(&self) -> error_stack::Result {\n Ok(self.clone())\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::function::record_attempt_core", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn record_attempt_core(\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n req: api_models::payments::PaymentsAttemptRecordRequest,\n payment_id: id_type::GlobalPaymentId,\n header_payload: HeaderPayload,\n) -> RouterResponse {\n tracing::Span::current().record(\n \"merchant_id\",\n merchant_context\n .get_merchant_account()\n .get_id()\n .get_string_repr(),\n );\n\n let operation: &operations::payment_attempt_record::PaymentAttemptRecord =\n &operations::payment_attempt_record::PaymentAttemptRecord;\n let boxed_operation: BoxedOperation<\n '_,\n api::RecordAttempt,\n api_models::payments::PaymentsAttemptRecordRequest,\n domain_payments::PaymentAttemptRecordData,\n > = Box::new(operation);\n\n let _validate_result = boxed_operation\n .to_validate_request()?\n .validate_request(&req, &merchant_context)?;\n\n tracing::Span::current().record(\"global_payment_id\", payment_id.get_string_repr());\n\n let operations::GetTrackerResponse { payment_data } = boxed_operation\n .to_get_tracker()?\n .get_trackers(\n &state,\n &payment_id,\n &req,\n &merchant_context,\n &profile,\n &header_payload,\n )\n .await?;\n let default_payment_status_data = PaymentStatusData {\n flow: PhantomData,\n payment_intent: payment_data.payment_intent.clone(),\n payment_attempt: payment_data.payment_attempt.clone(),\n attempts: None,\n should_sync_with_connector: false,\n payment_address: payment_data.payment_address.clone(),\n merchant_connector_details: None,\n };\n\n let payment_status_data = (req.triggered_by == common_enums::TriggeredBy::Internal)\n .then(|| default_payment_status_data.clone())\n .async_unwrap_or_else(|| async {\n match Box::pin(proxy_for_payments_operation_core::<\n api::PSync,\n _,\n _,\n _,\n PaymentStatusData,\n >(\n &state,\n req_state.clone(),\n merchant_context.clone(),\n profile.clone(),\n operations::PaymentGet,\n api::PaymentsRetrieveRequest {\n force_sync: true,\n expand_attempts: false,\n param: None,\n return_raw_connector_response: None,\n merchant_connector_details: None,\n },\n operations::GetTrackerResponse {\n payment_data: PaymentStatusData {\n flow: PhantomData,\n payment_intent: payment_data.payment_intent.clone(),\n payment_attempt: payment_data.payment_attempt.clone(),\n attempts: None,\n should_sync_with_connector: true,\n payment_address: payment_data.payment_address.clone(),\n merchant_connector_details: None,\n },\n },\n CallConnectorAction::Trigger,\n HeaderPayload::default(),\n None,\n ))\n .await\n {\n Ok((data, _, _, _)) => data,\n Err(err) => {\n router_env::logger::error!(error=?err, \"proxy_for_payments_operation_core failed for external payment attempt\");\n default_payment_status_data\n }\n }\n })\n .await;\n\n let record_payment_data = domain_payments::PaymentAttemptRecordData {\n flow: PhantomData,\n payment_intent: payment_status_data.payment_intent,\n payment_attempt: payment_status_data.payment_attempt,\n revenue_recovery_data: payment_data.revenue_recovery_data.clone(),\n payment_address: payment_data.payment_address.clone(),\n };\n\n let (_operation, final_payment_data) = boxed_operation\n .to_update_tracker()?\n .update_trackers(\n &state,\n req_state,\n record_payment_data,\n None,\n merchant_context.get_merchant_account().storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n None,\n header_payload.clone(),\n )\n .await?;\n\n transformers::GenerateResponse::generate_response(\n final_payment_data,\n &state,\n None,\n None,\n header_payload.x_hs_latency,\n &merchant_context,\n &profile,\n None,\n )\n}", + "after_code": "pub async fn record_attempt_core(\n state: SessionState,\n req_state: ReqState,\n merchant_context: domain::MerchantContext,\n profile: domain::Profile,\n req: api_models::payments::PaymentsAttemptRecordRequest,\n payment_id: id_type::GlobalPaymentId,\n header_payload: HeaderPayload,\n) -> RouterResponse {\n tracing::Span::current().record(\n \"merchant_id\",\n merchant_context\n .get_merchant_account()\n .get_id()\n .get_string_repr(),\n );\n\n let operation: &operations::payment_attempt_record::PaymentAttemptRecord =\n &operations::payment_attempt_record::PaymentAttemptRecord;\n let boxed_operation: BoxedOperation<\n '_,\n api::RecordAttempt,\n api_models::payments::PaymentsAttemptRecordRequest,\n domain_payments::PaymentAttemptRecordData,\n > = Box::new(operation);\n\n let _validate_result = boxed_operation\n .to_validate_request()?\n .validate_request(&req, &merchant_context)?;\n\n tracing::Span::current().record(\"global_payment_id\", payment_id.get_string_repr());\n\n let operations::GetTrackerResponse { payment_data } = boxed_operation\n .to_get_tracker()?\n .get_trackers(\n &state,\n &payment_id,\n &req,\n &merchant_context,\n &profile,\n &header_payload,\n )\n .await?;\n let default_payment_status_data = PaymentStatusData {\n flow: PhantomData,\n payment_intent: payment_data.payment_intent.clone(),\n payment_attempt: payment_data.payment_attempt.clone(),\n attempts: None,\n should_sync_with_connector: false,\n payment_address: payment_data.payment_address.clone(),\n merchant_connector_details: None,\n };\n\n let payment_status_data = (req.triggered_by == common_enums::TriggeredBy::Internal)\n .then(|| default_payment_status_data.clone())\n .async_unwrap_or_else(|| async {\n match Box::pin(proxy_for_payments_operation_core::<\n api::PSync,\n _,\n _,\n _,\n PaymentStatusData,\n >(\n &state,\n req_state.clone(),\n merchant_context.clone(),\n profile.clone(),\n operations::PaymentGet,\n api::PaymentsRetrieveRequest {\n force_sync: true,\n expand_attempts: false,\n param: None,\n return_raw_connector_response: None,\n merchant_connector_details: None,\n },\n operations::GetTrackerResponse {\n payment_data: PaymentStatusData {\n flow: PhantomData,\n payment_intent: payment_data.payment_intent.clone(),\n payment_attempt: payment_data.payment_attempt.clone(),\n attempts: None,\n should_sync_with_connector: true,\n payment_address: payment_data.payment_address.clone(),\n merchant_connector_details: None,\n },\n },\n CallConnectorAction::Trigger,\n HeaderPayload::default(),\n None,\n ))\n .await\n {\n Ok((data, _, _, _)) => data,\n Err(err) => {\n router_env::logger::error!(error=?err, \"proxy_for_payments_operation_core failed for external payment attempt\");\n default_payment_status_data\n }\n }\n })\n .await;\n\n let record_payment_data = domain_payments::PaymentAttemptRecordData {\n flow: PhantomData,\n payment_intent: payment_status_data.payment_intent,\n payment_attempt: payment_status_data.payment_attempt,\n revenue_recovery_data: payment_data.revenue_recovery_data.clone(),\n payment_address: payment_data.payment_address.clone(),\n };\n\n let (_operation, final_payment_data) = boxed_operation\n .to_update_tracker()?\n .update_trackers(\n &state,\n req_state,\n record_payment_data,\n None,\n merchant_context.get_merchant_account().storage_scheme,\n None,\n merchant_context.get_merchant_key_store(),\n None,\n header_payload.clone(),\n )\n .await?;\n\n transformers::GenerateResponse::generate_response(\n final_payment_data,\n &state,\n None,\n None,\n header_payload.x_hs_latency,\n &merchant_context,\n &profile,\n None,\n )\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use router_env::{instrument, tracing};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "pub use common_enums::enums::{CallConnectorAction, ExecutionMode, ExecutionPath, GatewaySystem};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use router_env::{instrument, tracing};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/core/payments.rs::PaymentIntentData::function::set_cancellation_reason", + "file": "crates/router/src/core/payments.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n todo!()\n }", + "after_code": "fn set_cancellation_reason(&mut self, cancellation_reason: Option) {\n todo!()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ], + "after_imports": [ + "use crate::core::payments::retry::{self, GsmValidation};", + "use crate::core::payments::helpers::{\n process_through_direct, process_through_direct_with_shadow_unified_connector_service,\n process_through_ucs,\n};", + "use hyperswitch_domain_models::{\n payments::PaymentConfirmData,\n router_flow_types::{Authorize, SetupMandate},\n };", + "use self::{\n conditional_configs::perform_decision_management,\n flows::{ConstructFlowSpecificData, Feature},\n gateway::context as gateway_context,\n operations::{BoxedOperation, Operation, PaymentResponse},\n routing::{self as self_routing, SessionFlowRoutingInput},\n};", + "pub use self::operations::{\n PaymentApprove, PaymentCancel, PaymentCancelPostCapture, PaymentCapture, PaymentConfirm,\n PaymentCreate, PaymentExtendAuthorization, PaymentIncrementalAuthorization,\n PaymentPostSessionTokens, PaymentReject, PaymentSession, PaymentSessionUpdate, PaymentStatus,\n PaymentUpdate, PaymentUpdateMetadata,\n};", + "use api_models::{\n self, enums,\n mandates::RecurringDetails,\n payments::{self as payments_api},\n};", + "use common_utils::{\n ext_traits::{AsyncExt, StringExt},\n id_type, pii,\n types::{AmountConvertor, MinorUnit, Surcharge},\n};", + "use hyperswitch_domain_models::payments::{\n PaymentAttemptListData, PaymentCancelData, PaymentCaptureData, PaymentConfirmData,\n PaymentIntentData, PaymentStatusData,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::enum::GooglePayPreDecryptFlow", + "file": "crates/router/src/configs/settings.rs", + "kind": "enum_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub enum GooglePayPreDecryptFlow {\n #[default]\n ConnectorTokenization,\n NetworkTokenization,\n}", + "after_code": "pub enum GooglePayPreDecryptFlow {\n #[default]\n ConnectorTokenization,\n NetworkTokenization,\n}", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ] + }, + { + "id": "crates/router/src/routes/app.rs::struct::Proxy", + "file": "crates/router/src/routes/app.rs", + "kind": "struct_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub struct Proxy;", + "after_code": "pub struct Proxy;", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};", + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n};" + ], + "after_imports": [ + "use hyperswitch_interfaces::{\n crm::CrmInterface,\n encryption_interface::EncryptionManagementInterface,\n helpers as interfaces_helpers,\n secrets_interface::secret_state::{RawSecret, SecuredSecret},\n types as interfaces_types,\n};", + "pub use crate::{\n configs::settings,\n db::{\n AccountsStorageInterface, CommonStorageInterface, GlobalStorageInterface, StorageImpl,\n StorageInterface,\n },\n events::EventsHandler,\n services::{get_cache_store, get_store},\n};", + "use crate::{\n configs::{secrets_transformers, Settings},\n db::kafka_store::{KafkaStore, TenantID},\n routes::{hypersense as hypersense_routes, three_ds_decision_rule},\n};", + "use super::{\n apple_pay_certificates_migration, blocklist, payment_link, subscription, webhook_events,\n};", + "use crate::routes::cards_info::{\n card_iin_info, create_cards_info, migrate_cards_info, update_cards_info,\n};" + ] + }, + { + "id": "crates/router/src/configs/settings.rs::TenantConfig::function::get_accounts_store_interface_map", + "file": "crates/router/src/configs/settings.rs", + "kind": "function_item", + "status": "modified", + "code_changed": false, + "imports_changed": true, + "before_code": "pub async fn get_accounts_store_interface_map(\n &self,\n storage_impl: &app::StorageImpl,\n conf: &configs::Settings,\n cache_store: Arc,\n testable: bool,\n ) -> HashMap> {\n #[allow(clippy::expect_used)]\n let event_handler = conf\n .events\n .get_event_handler()\n .await\n .expect(\"Failed to create event handler\");\n futures::future::join_all(self.0.iter().map(|(tenant_name, tenant)| async {\n let store = AppState::get_store_interface(\n storage_impl,\n &event_handler,\n conf,\n tenant,\n cache_store.clone(),\n testable,\n )\n .await\n .get_accounts_storage_interface();\n (tenant_name.clone(), store)\n }))\n .await\n .into_iter()\n .collect()\n }", + "after_code": "pub async fn get_accounts_store_interface_map(\n &self,\n storage_impl: &app::StorageImpl,\n conf: &configs::Settings,\n cache_store: Arc,\n testable: bool,\n ) -> HashMap> {\n #[allow(clippy::expect_used)]\n let event_handler = conf\n .events\n .get_event_handler()\n .await\n .expect(\"Failed to create event handler\");\n futures::future::join_all(self.0.iter().map(|(tenant_name, tenant)| async {\n let store = AppState::get_store_interface(\n storage_impl,\n &event_handler,\n conf,\n tenant,\n cache_store.clone(),\n testable,\n )\n .await\n .get_accounts_storage_interface();\n (tenant_name.clone(), store)\n }))\n .await\n .into_iter()\n .collect()\n }", + "diff_span": { + "before": "", + "after": "" + }, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd", + "before_imports": [ + "use std::collections::{HashMap, HashSet};", + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };" + ], + "after_imports": [ + "use serde::de::{\n value::{Error as ValueError, StrDeserializer},\n IntoDeserializer,\n };", + "use serde::de::{\n value::{Error as ValueError, MapDeserializer},\n IntoDeserializer,\n };", + "pub use hyperswitch_interfaces::{\n configs::{\n Connectors, GlobalTenant, InternalMerchantIdProfileIdAuthSettings, InternalServicesConfig,\n Tenant, TenantUserConfig,\n },\n secrets_interface::secret_state::{\n RawSecret, SecretState, SecretStateContainer, SecuredSecret,\n },\n types::{ComparisonServiceConfig, Proxy},\n};", + "use std::collections::{HashMap, HashSet};", + "pub use payment_methods::configs::settings::{\n BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,\n Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,\n SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,\n SupportedPaymentMethodsForMandate, ZeroMandates,\n};" + ] + }, + { + "id": "crates/hyperswitch_interfaces/src/helpers.rs::function::serialize_router_data_and_send_to_comparison_service", + "file": "crates/hyperswitch_interfaces/src/helpers.rs", + "kind": "function_item", + "status": "added", + "before_code": null, + "after_code": "pub async fn serialize_router_data_and_send_to_comparison_service(\n state: &dyn api_client::ApiClientWrapper,\n hyperswitch_router_data: router_data::RouterData,\n unified_connector_service_router_data: router_data::RouterData,\n comparison_service_config: types::ComparisonServiceConfig,\n request_id: Option,\n) -> common_utils_errors::CustomResult<(), errors::HttpClientError>\nwhere\n F: Send + Clone + Sync + 'static,\n RouterDReq: Send + Sync + Clone + 'static + serde::Serialize,\n RouterDResp: Send + Sync + Clone + 'static + serde::Serialize,\n{\n logger::info!(\"Simulating UCS call for shadow mode comparison\");\n\n let [hyperswitch_data, unified_connector_service_data] = [\n (hyperswitch_router_data, \"hyperswitch\"),\n (unified_connector_service_router_data, \"ucs\"),\n ]\n .map(|(data, source)| {\n serde_json::to_value(data)\n .map(masking::Secret::new)\n .unwrap_or_else(|e| {\n masking::Secret::new(serde_json::json!({\n \"error\": e.to_string(),\n \"source\": source\n }))\n })\n });\n\n let comparison_data = ComparisonData {\n hyperswitch_data,\n unified_connector_service_data,\n };\n let _ = send_comparison_data(\n state,\n comparison_data,\n comparison_service_config,\n request_id,\n )\n .await\n .map_err(|e| {\n logger::debug!(\"Failed to send comparison data: {:?}\", e);\n });\n Ok(())\n}", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/hyperswitch_interfaces/src/api/gateway.rs::impl::DirectGateway", + "file": "crates/hyperswitch_interfaces/src/api/gateway.rs", + "kind": "impl_item", + "status": "added", + "before_code": null, + "after_code": "impl\n PaymentGateway for DirectGateway\nwhere\n State: Clone + Send + Sync + 'static + ApiClientWrapper,\n ConnectorData: Clone + RouterDataConversion + Send + Sync + 'static,\n F: Clone + std::fmt::Debug + Send + Sync + 'static,\n Req: std::fmt::Debug + Clone + Send + Sync + 'static,\n Resp: std::fmt::Debug + Clone + Send + Sync + 'static,\n Context: GatewayContext + 'static,\n{\n async fn execute(\n self: Box,\n state: &State,\n connector_integration: BoxedConnectorIntegrationInterface,\n router_data: &RouterData,\n call_connector_action: CallConnectorAction,\n connector_request: Option,\n return_raw_connector_response: Option,\n _context: Context,\n ) -> CustomResult, ConnectorError> {\n // Direct gateway delegates to the existing execute_connector_processing_step\n // This maintains backward compatibility with the traditional HTTP-based flow\n api_client::execute_connector_processing_step(\n state,\n connector_integration,\n router_data,\n call_connector_action,\n connector_request,\n return_raw_connector_response,\n )\n .await\n }\n}", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/hyperswitch_interfaces/src/consts.rs::const::X_REQUEST_ID", + "file": "crates/hyperswitch_interfaces/src/consts.rs", + "kind": "const_item", + "status": "added", + "before_code": null, + "after_code": "pub const X_REQUEST_ID: &str = \"x-request-id\";", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/routes/app.rs::SessionState::function::get_comparison_service_config", + "file": "crates/router/src/routes/app.rs", + "kind": "function_item", + "status": "added", + "before_code": null, + "after_code": "fn get_comparison_service_config(&self) -> Option {\n self.conf.comparison_service.clone()\n }", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/hyperswitch_interfaces/src/api/gateway.rs::struct::DirectGateway", + "file": "crates/hyperswitch_interfaces/src/api/gateway.rs", + "kind": "struct_item", + "status": "added", + "before_code": null, + "after_code": "pub struct DirectGateway;", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/hyperswitch_interfaces/src/consts.rs::const::CONTENT_TYPE", + "file": "crates/hyperswitch_interfaces/src/consts.rs", + "kind": "const_item", + "status": "added", + "before_code": null, + "after_code": "pub const CONTENT_TYPE: &str = \"application/json\";", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments/gateway/context.rs::RouterGatewayContext::function::new", + "file": "crates/router/src/core/payments/gateway/context.rs", + "kind": "function_item", + "status": "added", + "before_code": null, + "after_code": "pub fn new(\n merchant_context: MerchantContext,\n header_payload: HeaderPayload,\n lineage_ids: LineageIds,\n #[cfg(feature = \"v1\")] merchant_connector_account: helpers::MerchantConnectorAccountType,\n #[cfg(feature = \"v2\")]\n merchant_connector_account: hyperswitch_domain_models::merchant_connector_account::MerchantConnectorAccountTypeDetails,\n execution_mode: ExecutionMode,\n execution_path: ExecutionPath,\n creds_identifier: Option,\n ) -> Self {\n Self {\n merchant_context,\n header_payload,\n lineage_ids,\n merchant_connector_account,\n execution_mode,\n execution_path,\n creds_identifier,\n }\n }", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/hyperswitch_interfaces/src/consts.rs::const::X_FLOW_NAME", + "file": "crates/hyperswitch_interfaces/src/consts.rs", + "kind": "const_item", + "status": "added", + "before_code": null, + "after_code": "pub const X_FLOW_NAME: &str = \"x-flow-name\";", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/hyperswitch_interfaces/src/api/gateway.rs::function::execute_payment_gateway", + "file": "crates/hyperswitch_interfaces/src/api/gateway.rs", + "kind": "function_item", + "status": "added", + "before_code": null, + "after_code": "pub async fn execute_payment_gateway(\n state: &State,\n connector_integration: BoxedConnectorIntegrationInterface,\n router_data: &RouterData,\n call_connector_action: CallConnectorAction,\n connector_request: Option,\n return_raw_connector_response: Option,\n context: Context,\n) -> CustomResult, ConnectorError>\nwhere\n State: Clone + Send + Sync + 'static + ApiClientWrapper + helpers::GetComparisonServiceConfig,\n ConnectorData: Clone + RouterDataConversion + Send + Sync + 'static,\n F: Clone\n + std::fmt::Debug\n + Send\n + Sync\n + 'static\n + FlowGateway,\n Req: std::fmt::Debug + Clone + Send + Sync + serde::Serialize + 'static,\n Resp: std::fmt::Debug + Clone + Send + Sync + serde::Serialize + 'static,\n Context: GatewayContext + 'static,\n{\n let execution_path = context.execution_path();\n\n match execution_path {\n ExecutionPath::Direct => {\n // Use direct execution for backward compatibility\n api_client::execute_connector_processing_step(\n state,\n connector_integration,\n router_data,\n call_connector_action,\n connector_request,\n return_raw_connector_response,\n )\n .await\n }\n ExecutionPath::UnifiedConnectorService => {\n let gateway: Box> =\n F::get_gateway(execution_path);\n\n // Execute through selected gateway\n gateway\n .execute(\n state,\n connector_integration,\n router_data,\n call_connector_action,\n connector_request,\n return_raw_connector_response,\n context,\n )\n .await\n .attach_printable(\"Gateway execution failed\")\n }\n ExecutionPath::ShadowUnifiedConnectorService => {\n let direct_router_data = api_client::execute_connector_processing_step(\n state,\n connector_integration.clone_box(),\n router_data,\n call_connector_action.clone(),\n connector_request,\n return_raw_connector_response,\n )\n .await?;\n let state_clone = state.clone();\n let router_data_clone = router_data.clone();\n let direct_router_data_clone = direct_router_data.clone();\n let return_raw_connector_response_clone = return_raw_connector_response;\n let context_clone = context.clone();\n tokio::spawn(async move {\n let gateway: Box> =\n F::get_gateway(execution_path);\n let ucs_shadow_result = gateway\n .execute(\n &state_clone,\n connector_integration,\n &router_data_clone,\n call_connector_action,\n None,\n return_raw_connector_response_clone,\n context_clone,\n )\n .await\n .attach_printable(\"Gateway execution failed\");\n // Send comparison data asynchronously\n match ucs_shadow_result {\n Ok(ucs_router_data) => {\n // Send comparison data asynchronously\n if let Some(comparison_service_config) =\n state_clone.get_comparison_service_config()\n {\n let request_id = state_clone.get_request_id_str();\n let _ = helpers::serialize_router_data_and_send_to_comparison_service(\n &state_clone,\n direct_router_data_clone,\n ucs_router_data,\n comparison_service_config,\n request_id,\n );\n };\n }\n Err(e) => {\n logger::error!(\"UCS shadow execution failed: {:?}\", e);\n }\n }\n });\n Ok(direct_router_data)\n }\n }\n}", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/hyperswitch_interfaces/src/api/gateway.rs::trait::GatewayContext", + "file": "crates/hyperswitch_interfaces/src/api/gateway.rs", + "kind": "trait_item", + "status": "added", + "before_code": null, + "after_code": "pub trait GatewayContext: Clone + Send + Sync {\n /// Get the execution path (Direct, UCS, or Shadow)\n fn execution_path(&self) -> ExecutionPath;\n\n /// Get the execution mode (Primary, Shadow, etc.)\n fn execution_mode(&self) -> ExecutionMode;\n}", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/unified_connector_service.rs::function::ucs_logging_wrapper_new", + "file": "crates/router/src/core/unified_connector_service.rs", + "kind": "function_item", + "status": "added", + "before_code": null, + "after_code": "pub async fn ucs_logging_wrapper_new(\n router_data: RouterData,\n state: &SessionState,\n grpc_request: GrpcReq,\n grpc_header_builder: external_services::grpc_client::GrpcHeadersUcsBuilderFinal,\n handler: F,\n) -> CustomResult, UnifiedConnectorServiceError>\nwhere\n T: std::fmt::Debug + Clone + Send + 'static,\n Req: std::fmt::Debug + Clone + Send + Sync + 'static,\n Resp: std::fmt::Debug + Clone + Send + Sync + 'static,\n GrpcReq: serde::Serialize,\n GrpcResp: serde::Serialize,\n F: FnOnce(\n RouterData,\n GrpcReq,\n external_services::grpc_client::GrpcHeadersUcs,\n ) -> Fut\n + Send,\n Fut: std::future::Future<\n Output = CustomResult<\n (RouterData, GrpcResp),\n UnifiedConnectorServiceError,\n >,\n > + Send,\n{\n tracing::Span::current().record(\"connector_name\", &router_data.connector);\n tracing::Span::current().record(\"flow_type\", std::any::type_name::());\n tracing::Span::current().record(\"payment_id\", &router_data.payment_id);\n\n // Capture request data for logging\n let connector_name = router_data.connector.clone();\n let payment_id = router_data.payment_id.clone();\n let merchant_id = router_data.merchant_id.clone();\n let refund_id = router_data.refund_id.clone();\n let dispute_id = router_data.dispute_id.clone();\n let grpc_header = grpc_header_builder.build();\n // Log the actual gRPC request with masking\n let grpc_request_body = masking::masked_serialize(&grpc_request)\n .unwrap_or_else(|_| serde_json::json!({\"error\": \"failed_to_serialize_grpc_request\"}));\n\n // Update connector call count metrics for UCS operations\n crate::routes::metrics::CONNECTOR_CALL_COUNT.add(\n 1,\n router_env::metric_attributes!(\n (\"connector\", connector_name.clone()),\n (\n \"flow\",\n std::any::type_name::()\n .split(\"::\")\n .last()\n .unwrap_or_default()\n ),\n ),\n );\n\n // Execute UCS function and measure timing\n let start_time = Instant::now();\n let result = handler(router_data, grpc_request, grpc_header).await;\n let external_latency = start_time.elapsed().as_millis();\n\n // Create and emit connector event after UCS call\n let (status_code, response_body, router_result) = match result {\n Ok((updated_router_data, grpc_response)) => {\n let status = updated_router_data\n .connector_http_status_code\n .unwrap_or(200);\n\n // Log the actual gRPC response\n let grpc_response_body = serde_json::to_value(&grpc_response).unwrap_or_else(\n |_| serde_json::json!({\"error\": \"failed_to_serialize_grpc_response\"}),\n );\n\n (status, Some(grpc_response_body), Ok(updated_router_data))\n }\n Err(error) => {\n // Update error metrics for UCS calls\n crate::routes::metrics::CONNECTOR_ERROR_RESPONSE_COUNT.add(\n 1,\n router_env::metric_attributes!((\"connector\", connector_name.clone(),)),\n );\n\n let error_body = serde_json::json!({\n \"error\": error.to_string(),\n \"error_type\": \"ucs_call_failed\"\n });\n (500, Some(error_body), Err(error))\n }\n };\n\n let mut connector_event = ConnectorEvent::new(\n state.tenant.tenant_id.clone(),\n connector_name,\n std::any::type_name::(),\n grpc_request_body,\n \"grpc://unified-connector-service\".to_string(),\n Method::Post,\n payment_id,\n merchant_id,\n state.request_id.as_ref(),\n external_latency,\n refund_id,\n dispute_id,\n status_code,\n );\n\n // Set response body based on status code\n if let Some(body) = response_body {\n match status_code {\n 400..=599 => {\n connector_event.set_error_response_body(&body);\n }\n _ => {\n connector_event.set_response_body(&body);\n }\n }\n }\n\n // Emit event\n state.event_handler.log_event(&connector_event);\n\n // Set external latency on router data\n router_result.map(|mut router_data| {\n router_data.external_latency =\n Some(router_data.external_latency.unwrap_or(0) + external_latency);\n router_data\n })\n}", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments/gateway/context.rs::impl::RouterGatewayContext", + "file": "crates/router/src/core/payments/gateway/context.rs", + "kind": "impl_item", + "status": "added", + "before_code": null, + "after_code": "impl RouterGatewayContext {\n /// Get the gateway system (Direct, UnifiedConnectorService, etc.)\n pub fn get_gateway_system(&self) -> GatewaySystem {\n match self.execution_path {\n ExecutionPath::Direct => GatewaySystem::Direct,\n ExecutionPath::UnifiedConnectorService => GatewaySystem::UnifiedConnectorService,\n ExecutionPath::ShadowUnifiedConnectorService => GatewaySystem::Direct,\n }\n }\n}", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/hyperswitch_interfaces/src/api/gateway.rs::DirectGateway::function::execute", + "file": "crates/hyperswitch_interfaces/src/api/gateway.rs", + "kind": "function_item", + "status": "added", + "before_code": null, + "after_code": "async fn execute(\n self: Box,\n state: &State,\n connector_integration: BoxedConnectorIntegrationInterface,\n router_data: &RouterData,\n call_connector_action: CallConnectorAction,\n connector_request: Option,\n return_raw_connector_response: Option,\n _context: Context,\n ) -> CustomResult, ConnectorError> {\n // Direct gateway delegates to the existing execute_connector_processing_step\n // This maintains backward compatibility with the traditional HTTP-based flow\n api_client::execute_connector_processing_step(\n state,\n connector_integration,\n router_data,\n call_connector_action,\n connector_request,\n return_raw_connector_response,\n )\n .await\n }", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments.rs::mod::gateway", + "file": "crates/router/src/core/payments.rs", + "kind": "mod_item", + "status": "added", + "before_code": null, + "after_code": "pub mod gateway;", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/hyperswitch_interfaces/src/helpers.rs::trait::GetComparisonServiceConfig", + "file": "crates/hyperswitch_interfaces/src/helpers.rs", + "kind": "trait_item", + "status": "added", + "before_code": null, + "after_code": "pub trait GetComparisonServiceConfig {\n /// Retrieve the comparison service configuration if available\n fn get_comparison_service_config(&self) -> Option;\n}", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments/gateway/context.rs::RouterGatewayContext::function::execution_path", + "file": "crates/router/src/core/payments/gateway/context.rs", + "kind": "function_item", + "status": "added", + "before_code": null, + "after_code": "fn execution_path(&self) -> ExecutionPath {\n self.execution_path\n }", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/hyperswitch_interfaces/src/api/gateway.rs::trait::PaymentGateway", + "file": "crates/hyperswitch_interfaces/src/api/gateway.rs", + "kind": "trait_item", + "status": "added", + "before_code": null, + "after_code": "pub trait PaymentGateway: Send + Sync\nwhere\n State: Clone + Send + Sync + 'static + ApiClientWrapper,\n ConnectorData: Clone + RouterDataConversion + Send + Sync + 'static,\n F: Clone + std::fmt::Debug + Send + Sync + 'static,\n Req: std::fmt::Debug + Clone + Send + Sync + 'static,\n Resp: std::fmt::Debug + Clone + Send + Sync + 'static,\n Context: GatewayContext,\n{\n /// Execute payment gateway operation\n async fn execute(\n self: Box,\n state: &State,\n connector_integration: BoxedConnectorIntegrationInterface,\n router_data: &RouterData,\n call_connector_action: CallConnectorAction,\n connector_request: Option,\n return_raw_connector_response: Option,\n context: Context,\n ) -> CustomResult, ConnectorError>;\n}", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/hyperswitch_interfaces/src/api/gateway.rs::trait::FlowGateway", + "file": "crates/hyperswitch_interfaces/src/api/gateway.rs", + "kind": "trait_item", + "status": "added", + "before_code": null, + "after_code": "pub trait FlowGateway:\n Clone + std::fmt::Debug + Send + Sync + 'static\nwhere\n State: Clone + Send + Sync + 'static + ApiClientWrapper,\n ConnectorData: Clone + RouterDataConversion + Send + Sync + 'static,\n Req: std::fmt::Debug + Clone + Send + Sync + 'static,\n Resp: std::fmt::Debug + Clone + Send + Sync + 'static,\n Context: GatewayContext,\n{\n /// Get the appropriate gateway for this flow based on execution path\n ///\n /// Returns a boxed gateway implementation that can be either:\n /// - DirectGateway for traditional HTTP connector integration\n /// - Flow-specific UCS gateway for gRPC integration\n fn get_gateway(\n execution_path: ExecutionPath,\n ) -> Box>;\n}", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments/gateway/context.rs::struct::RouterGatewayContext", + "file": "crates/router/src/core/payments/gateway/context.rs", + "kind": "struct_item", + "status": "added", + "before_code": null, + "after_code": "pub struct RouterGatewayContext {\n pub creds_identifier: Option,\n /// Merchant context (merchant_id, profile_id, etc.)\n pub merchant_context: MerchantContext,\n\n /// Header payload (x-reference-id, etc.)\n pub header_payload: HeaderPayload,\n\n /// Lineage IDs for distributed tracing\n pub lineage_ids: LineageIds,\n\n /// Merchant connector account details\n #[cfg(feature = \"v1\")]\n pub merchant_connector_account: helpers::MerchantConnectorAccountType,\n\n /// Merchant connector account details (v2)\n #[cfg(feature = \"v2\")]\n pub merchant_connector_account:\n hyperswitch_domain_models::merchant_connector_account::MerchantConnectorAccountTypeDetails,\n\n /// Execution mode (Primary, Shadow, etc.)\n pub execution_mode: ExecutionMode,\n\n /// Execution path (Direct, UCS, or Shadow)\n pub execution_path: ExecutionPath,\n}", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments/gateway.rs::mod::context", + "file": "crates/router/src/core/payments/gateway.rs", + "kind": "mod_item", + "status": "added", + "before_code": null, + "after_code": "pub mod context;", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/hyperswitch_interfaces/src/types.rs::struct::ComparisonServiceConfig", + "file": "crates/hyperswitch_interfaces/src/types.rs", + "kind": "struct_item", + "status": "added", + "before_code": null, + "after_code": "pub struct ComparisonServiceConfig {\n /// The URL of the comparison service endpoint\n pub url: Url,\n /// Whether the comparison service is enabled\n pub enabled: bool,\n /// Timeout in seconds for comparison service requests\n pub timeout_secs: Option,\n}", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments/gateway/psync_gateway.rs::domain::PSync::function::execute", + "file": "crates/router/src/core/payments/gateway/psync_gateway.rs", + "kind": "function_item", + "status": "added", + "before_code": null, + "after_code": "async fn execute(\n self: Box,\n state: &SessionState,\n _connector_integration: BoxedConnectorIntegrationInterface<\n domain::PSync,\n RCD,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n >,\n router_data: &RouterData<\n domain::PSync,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n >,\n call_connector_action: CallConnectorAction,\n _connector_request: Option,\n _return_raw_connector_response: Option,\n context: RouterGatewayContext,\n ) -> CustomResult<\n RouterData,\n ConnectorError,\n > {\n let connector_name = router_data.connector.clone();\n let connector_enum = common_enums::connector_enums::Connector::from_str(&connector_name)\n .change_context(ConnectorError::InvalidConnectorName)?;\n let merchant_connector_account = context.merchant_connector_account;\n let creds_identifier = context.creds_identifier;\n let merchant_context = context.merchant_context;\n let lineage_ids = context.lineage_ids;\n let header_payload = context.header_payload;\n let unified_connector_service_execution_mode = context.execution_mode;\n let merchant_order_reference_id = header_payload.x_reference_id.clone();\n let is_ucs_psync_disabled = state\n .conf\n .grpc_client\n .unified_connector_service\n .as_ref()\n .is_some_and(|config| {\n config\n .ucs_psync_disabled_connectors\n .contains(&connector_enum)\n });\n\n if is_ucs_psync_disabled {\n logger::info!(\n \"UCS PSync call disabled for connector: {}, skipping UCS call\",\n connector_name\n );\n return Ok(router_data.clone());\n }\n let client = state\n .grpc_client\n .unified_connector_service_client\n .clone()\n .ok_or(ConnectorError::RequestEncodingFailed)\n .attach_printable(\"Failed to fetch Unified Connector Service client\")?;\n\n let payment_get_request = payments_grpc::PaymentServiceGetRequest::foreign_try_from((\n &*router_data,\n call_connector_action,\n ))\n .change_context(ConnectorError::RequestEncodingFailed)\n .attach_printable(\"Failed to construct Payment Get Request\")?;\n\n let merchant_connector_id = merchant_connector_account.get_mca_id();\n\n let connector_auth_metadata =\n unified_connector_service::build_unified_connector_service_auth_metadata(\n merchant_connector_account,\n &merchant_context,\n )\n .change_context(ConnectorError::RequestEncodingFailed)\n .attach_printable(\"Failed to construct request metadata\")?;\n let merchant_reference_id = header_payload\n .x_reference_id\n .clone()\n .or(merchant_order_reference_id)\n .map(|id| id_type::PaymentReferenceId::from_str(id.as_str()))\n .transpose()\n .inspect_err(|err| logger::warn!(error=?err, \"Invalid Merchant ReferenceId found\"))\n .ok()\n .flatten()\n .map(ucs_types::UcsReferenceId::Payment);\n let header_payload = state\n .get_grpc_headers_ucs(unified_connector_service_execution_mode)\n .external_vault_proxy_metadata(None)\n .merchant_reference_id(merchant_reference_id)\n .lineage_ids(lineage_ids);\n let connector_name = router_data.connector.clone();\n let updated_router_data = Box::pin(unified_connector_service::ucs_logging_wrapper_new(\n router_data.clone(),\n state,\n payment_get_request,\n header_payload,\n |mut router_data, payment_get_request, grpc_headers| async move {\n let response = client\n .payment_get(payment_get_request, connector_auth_metadata, grpc_headers)\n .await\n .attach_printable(\"Failed to get payment\")?;\n\n let payment_get_response = response.into_inner();\n\n let (router_data_response, status_code) =\n handle_unified_connector_service_response_for_payment_get(\n payment_get_response.clone(),\n )\n .attach_printable(\"Failed to deserialize UCS response\")?;\n\n // Extract and store access token if present\n if let Some(access_token) =\n unified_connector_service::get_access_token_from_ucs_response(\n state,\n &merchant_context,\n &connector_name,\n merchant_connector_id.as_ref(),\n creds_identifier.clone(),\n payment_get_response.state.as_ref(),\n )\n .await\n {\n if let Err(error) = unified_connector_service::set_access_token_for_ucs(\n state,\n &merchant_context,\n &connector_name,\n access_token,\n merchant_connector_id.as_ref(),\n creds_identifier,\n )\n .await\n {\n logger::error!(\n ?error,\n \"Failed to store UCS access token from psync response\"\n );\n } else {\n logger::debug!(\"Successfully stored access token from UCS psync response\");\n }\n }\n\n let router_data_response = router_data_response.map(|(response, status)| {\n router_data.status = status;\n response\n });\n router_data.response = router_data_response;\n router_data.amount_captured = payment_get_response.captured_amount;\n router_data.minor_amount_captured = payment_get_response\n .minor_captured_amount\n .map(MinorUnit::new);\n router_data.raw_connector_response = payment_get_response\n .raw_connector_response\n .clone()\n .map(|raw_connector_response| raw_connector_response.expose().into());\n router_data.connector_http_status_code = Some(status_code);\n\n Ok((router_data, payment_get_response))\n },\n ))\n .await\n .change_context(ConnectorError::ResponseHandlingFailed)?;\n\n Ok(updated_router_data)\n }", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/hyperswitch_interfaces/src/api.rs::mod::gateway", + "file": "crates/hyperswitch_interfaces/src/api.rs", + "kind": "mod_item", + "status": "added", + "before_code": null, + "after_code": "pub mod gateway;", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments/gateway/psync_gateway.rs::impl::domain::PSync", + "file": "crates/router/src/core/payments/gateway/psync_gateway.rs", + "kind": "impl_item", + "status": "added", + "before_code": null, + "after_code": "impl\n payment_gateway::FlowGateway<\n SessionState,\n RCD,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n RouterGatewayContext,\n > for domain::PSync\nwhere\n RCD: Clone\n + Send\n + Sync\n + 'static\n + RouterDataConversion,\n{\n fn get_gateway(\n execution_path: ExecutionPath,\n ) -> Box<\n dyn payment_gateway::PaymentGateway<\n SessionState,\n RCD,\n Self,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n RouterGatewayContext,\n >,\n > {\n match execution_path {\n ExecutionPath::Direct => Box::new(payment_gateway::DirectGateway),\n ExecutionPath::UnifiedConnectorService\n | ExecutionPath::ShadowUnifiedConnectorService => Box::new(domain::PSync),\n }\n }\n}", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments/gateway/context.rs::RouterGatewayContext::function::execution_mode", + "file": "crates/router/src/core/payments/gateway/context.rs", + "kind": "function_item", + "status": "added", + "before_code": null, + "after_code": "fn execution_mode(&self) -> ExecutionMode {\n self.execution_mode\n }", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/hyperswitch_interfaces/src/helpers.rs::function::send_comparison_data", + "file": "crates/hyperswitch_interfaces/src/helpers.rs", + "kind": "function_item", + "status": "added", + "before_code": null, + "after_code": "pub async fn send_comparison_data(\n state: &dyn api_client::ApiClientWrapper,\n comparison_data: ComparisonData,\n comparison_service_config: types::ComparisonServiceConfig,\n request_id: Option,\n) -> common_utils_errors::CustomResult<(), errors::HttpClientError> {\n let mut request = request::RequestBuilder::new()\n .method(request::Method::Post)\n .url(comparison_service_config.url.get_string_repr())\n .header(consts::CONTENT_TYPE, \"application/json\")\n .header(consts::X_FLOW_NAME, \"router-data\")\n .set_body(request::RequestContent::Json(Box::new(comparison_data)))\n .build();\n\n if let Some(req_id) = request_id {\n request.add_header(consts::X_REQUEST_ID, masking::Maskable::Normal(req_id));\n }\n\n let _ = state\n .get_api_client()\n .send_request(\n state,\n request,\n comparison_service_config.timeout_secs,\n false,\n )\n .await\n .inspect_err(|e| {\n tracing::debug!(\"Error sending comparison data: {:?}\", e);\n })\n .change_context(errors::HttpClientError::RequestNotSent(\n \"Failed to send comparison data to comparison service\".to_string(),\n ))?;\n\n Ok(())\n}", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments/gateway/context.rs::RouterGatewayContext::function::get_gateway_system", + "file": "crates/router/src/core/payments/gateway/context.rs", + "kind": "function_item", + "status": "added", + "before_code": null, + "after_code": "pub fn get_gateway_system(&self) -> GatewaySystem {\n match self.execution_path {\n ExecutionPath::Direct => GatewaySystem::Direct,\n ExecutionPath::UnifiedConnectorService => GatewaySystem::UnifiedConnectorService,\n ExecutionPath::ShadowUnifiedConnectorService => GatewaySystem::Direct,\n }\n }", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments/gateway.rs::mod::psync_gateway", + "file": "crates/router/src/core/payments/gateway.rs", + "kind": "mod_item", + "status": "added", + "before_code": null, + "after_code": "pub mod psync_gateway;", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/hyperswitch_interfaces/src/helpers.rs::struct::ComparisonData", + "file": "crates/hyperswitch_interfaces/src/helpers.rs", + "kind": "struct_item", + "status": "added", + "before_code": null, + "after_code": "pub struct ComparisonData {\n /// Hyperswitch router data\n pub hyperswitch_data: masking::Secret,\n /// Unified Connector Service router data\n pub unified_connector_service_data: masking::Secret,\n}", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments/gateway/psync_gateway.rs::domain::PSync::function::get_gateway", + "file": "crates/router/src/core/payments/gateway/psync_gateway.rs", + "kind": "function_item", + "status": "added", + "before_code": null, + "after_code": "fn get_gateway(\n execution_path: ExecutionPath,\n ) -> Box<\n dyn payment_gateway::PaymentGateway<\n SessionState,\n RCD,\n Self,\n types::PaymentsSyncData,\n types::PaymentsResponseData,\n RouterGatewayContext,\n >,\n > {\n match execution_path {\n ExecutionPath::Direct => Box::new(payment_gateway::DirectGateway),\n ExecutionPath::UnifiedConnectorService\n | ExecutionPath::ShadowUnifiedConnectorService => Box::new(domain::PSync),\n }\n }", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/core/payments/gateway.rs::static::COMPOSITE_GATEWAY_SUPPORTED_FLOWS", + "file": "crates/router/src/core/payments/gateway.rs", + "kind": "static_item", + "status": "added", + "before_code": null, + "after_code": "pub static COMPOSITE_GATEWAY_SUPPORTED_FLOWS: sync::LazyLock> =\n sync::LazyLock::new(|| vec![std::any::type_name::()]);", + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + }, + { + "id": "crates/router/src/configs/settings.rs::struct::ComparisonServiceConfig", + "file": "crates/router/src/configs/settings.rs", + "kind": "struct_item", + "status": "removed", + "before_code": "pub struct ComparisonServiceConfig {\n pub url: Url,\n pub enabled: bool,\n pub timeout_secs: Option,\n}", + "after_code": null, + "diff_span": null, + "commit_sha": "847552d0b784cc3f044f4076970dca00315a78dd" + } + ] +} \ No newline at end of file