id
stringlengths 20
153
| type
stringclasses 1
value | granularity
stringclasses 14
values | content
stringlengths 16
84.3k
| metadata
dict |
|---|---|---|---|---|
connector-service_snippet_8474653292087038763_925_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
service_name,
flow_name: FlowName::CreateAccessToken,
event_config: &self.config.events,
request_id: event_params.request_id,
lineage_ids: event_params.lineage_ids,
reference_id: event_params.reference_id,
shadow_mode: event_params.shadow_mode,
};
let response = external_services::service::execute_connector_processing_step(
&self.config.proxy,
connector_integration,
access_token_router_data,
None,
external_event_params,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 925,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_925_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
service_name,
flow_name: FlowName::CreateAccessToken,
event_config: &self.config.events,
request_id: event_params.request_id,
lineage_ids: event_params.lineage_ids,
reference_id: event_params.reference_id,
shadow_mode: event_params.shadow_mode,
};
let response = external_services::service::execute_connector_processing_step(
&self.config.proxy,
connector_integration,
access_token_router_data,
None,
external_event_params,
None,
common_enums::CallConnectorAction::Trigger,
)
.await
.switch()
.map_err(|e: error_stack::Report<ApplicationErrorResponse>| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Access Token creation failed: {e}")),
Some("ACCESS_TOKEN_CREATION_ERROR".to_string()),
Some(500),
)
})?;
match response.response {
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 925,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_925_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
service_name,
flow_name: FlowName::CreateAccessToken,
event_config: &self.config.events,
request_id: event_params.request_id,
lineage_ids: event_params.lineage_ids,
reference_id: event_params.reference_id,
shadow_mode: event_params.shadow_mode,
};
let response = external_services::service::execute_connector_processing_step(
&self.config.proxy,
connector_integration,
access_token_router_data,
None,
external_event_params,
None,
common_enums::CallConnectorAction::Trigger,
)
.await
.switch()
.map_err(|e: error_stack::Report<ApplicationErrorResponse>| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Access Token creation failed: {e}")),
Some("ACCESS_TOKEN_CREATION_ERROR".to_string()),
Some(500),
)
})?;
match response.response {
Ok(access_token_data) => {
tracing::info!(
"Access token created successfully with expiry: {:?}",
access_token_data.expires_in
);
Ok(access_token_data)
}
Err(ErrorResponse {
message,
status_code,
..
}) => Err(PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Access Token creation failed: {message}")),
Some("ACCESS_TOKEN_CREATION_ERROR".to_string()),
Some(status_code.into()),
)),
}
}
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 925,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_950_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
Some(500),
)
})?;
match response.response {
Ok(access_token_data) => {
tracing::info!(
"Access token created successfully with expiry: {:?}",
access_token_data.expires_in
);
Ok(access_token_data)
}
Err(ErrorResponse {
message,
status_code,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 950,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_950_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
Some(500),
)
})?;
match response.response {
Ok(access_token_data) => {
tracing::info!(
"Access token created successfully with expiry: {:?}",
access_token_data.expires_in
);
Ok(access_token_data)
}
Err(ErrorResponse {
message,
status_code,
..
}) => Err(PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Access Token creation failed: {message}")),
Some("ACCESS_TOKEN_CREATION_ERROR".to_string()),
Some(status_code.into()),
)),
}
}
#[allow(clippy::too_many_arguments)]
async fn handle_connector_customer<
T: PaymentMethodDataTypes
+ Default
+ Eq
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 950,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_950_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
Some(500),
)
})?;
match response.response {
Ok(access_token_data) => {
tracing::info!(
"Access token created successfully with expiry: {:?}",
access_token_data.expires_in
);
Ok(access_token_data)
}
Err(ErrorResponse {
message,
status_code,
..
}) => Err(PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Access Token creation failed: {message}")),
Some("ACCESS_TOKEN_CREATION_ERROR".to_string()),
Some(status_code.into()),
)),
}
}
#[allow(clippy::too_many_arguments)]
async fn handle_connector_customer<
T: PaymentMethodDataTypes
+ Default
+ Eq
+ Debug
+ Send
+ serde::Serialize
+ serde::de::DeserializeOwned
+ Clone
+ Sync
+ domain_types::types::CardConversionHelper<T>
+ 'static,
>(
&self,
connector_data: ConnectorData<T>,
payment_flow_data: &PaymentFlowData,
connector_auth_details: ConnectorAuthType,
payload: &PaymentServiceAuthorizeRequest,
connector_name: &str,
service_name: &str,
event_params: EventParams<'_>,
) -> Result<ConnectorCustomerResponse, PaymentAuthorizationError> {
// Get connector integration for CreateConnectorCustomer flow
let connector_integration: BoxedConnectorIntegrationV2<
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 950,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_975_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
#[allow(clippy::too_many_arguments)]
async fn handle_connector_customer<
T: PaymentMethodDataTypes
+ Default
+ Eq
+ Debug
+ Send
+ serde::Serialize
+ serde::de::DeserializeOwned
+ Clone
+ Sync
+ domain_types::types::CardConversionHelper<T>
+ 'static,
>(
&self,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 975,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_975_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
#[allow(clippy::too_many_arguments)]
async fn handle_connector_customer<
T: PaymentMethodDataTypes
+ Default
+ Eq
+ Debug
+ Send
+ serde::Serialize
+ serde::de::DeserializeOwned
+ Clone
+ Sync
+ domain_types::types::CardConversionHelper<T>
+ 'static,
>(
&self,
connector_data: ConnectorData<T>,
payment_flow_data: &PaymentFlowData,
connector_auth_details: ConnectorAuthType,
payload: &PaymentServiceAuthorizeRequest,
connector_name: &str,
service_name: &str,
event_params: EventParams<'_>,
) -> Result<ConnectorCustomerResponse, PaymentAuthorizationError> {
// Get connector integration for CreateConnectorCustomer flow
let connector_integration: BoxedConnectorIntegrationV2<
'_,
CreateConnectorCustomer,
PaymentFlowData,
ConnectorCustomerData,
ConnectorCustomerResponse,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 975,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_975_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
#[allow(clippy::too_many_arguments)]
async fn handle_connector_customer<
T: PaymentMethodDataTypes
+ Default
+ Eq
+ Debug
+ Send
+ serde::Serialize
+ serde::de::DeserializeOwned
+ Clone
+ Sync
+ domain_types::types::CardConversionHelper<T>
+ 'static,
>(
&self,
connector_data: ConnectorData<T>,
payment_flow_data: &PaymentFlowData,
connector_auth_details: ConnectorAuthType,
payload: &PaymentServiceAuthorizeRequest,
connector_name: &str,
service_name: &str,
event_params: EventParams<'_>,
) -> Result<ConnectorCustomerResponse, PaymentAuthorizationError> {
// Get connector integration for CreateConnectorCustomer flow
let connector_integration: BoxedConnectorIntegrationV2<
'_,
CreateConnectorCustomer,
PaymentFlowData,
ConnectorCustomerData,
ConnectorCustomerResponse,
> = connector_data.connector.get_connector_integration_v2();
// Create connector customer request data using ForeignTryFrom
let connector_customer_request_data =
ConnectorCustomerData::foreign_try_from(payload.clone()).map_err(|err| {
tracing::error!("Failed to process connector customer data: {:?}", err);
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some("Failed to process connector customer data".to_string()),
Some("CONNECTOR_CUSTOMER_DATA_ERROR".to_string()),
None,
)
})?;
// Create router data for connector customer flow
let connector_customer_router_data = RouterDataV2::<
CreateConnectorCustomer,
PaymentFlowData,
ConnectorCustomerData,
ConnectorCustomerResponse,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 975,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1000_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
'_,
CreateConnectorCustomer,
PaymentFlowData,
ConnectorCustomerData,
ConnectorCustomerResponse,
> = connector_data.connector.get_connector_integration_v2();
// Create connector customer request data using ForeignTryFrom
let connector_customer_request_data =
ConnectorCustomerData::foreign_try_from(payload.clone()).map_err(|err| {
tracing::error!("Failed to process connector customer data: {:?}", err);
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some("Failed to process connector customer data".to_string()),
Some("CONNECTOR_CUSTOMER_DATA_ERROR".to_string()),
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1000,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1000_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
'_,
CreateConnectorCustomer,
PaymentFlowData,
ConnectorCustomerData,
ConnectorCustomerResponse,
> = connector_data.connector.get_connector_integration_v2();
// Create connector customer request data using ForeignTryFrom
let connector_customer_request_data =
ConnectorCustomerData::foreign_try_from(payload.clone()).map_err(|err| {
tracing::error!("Failed to process connector customer data: {:?}", err);
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some("Failed to process connector customer data".to_string()),
Some("CONNECTOR_CUSTOMER_DATA_ERROR".to_string()),
None,
)
})?;
// Create router data for connector customer flow
let connector_customer_router_data = RouterDataV2::<
CreateConnectorCustomer,
PaymentFlowData,
ConnectorCustomerData,
ConnectorCustomerResponse,
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data.clone(),
connector_auth_type: connector_auth_details,
request: connector_customer_request_data,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1000,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1000_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
'_,
CreateConnectorCustomer,
PaymentFlowData,
ConnectorCustomerData,
ConnectorCustomerResponse,
> = connector_data.connector.get_connector_integration_v2();
// Create connector customer request data using ForeignTryFrom
let connector_customer_request_data =
ConnectorCustomerData::foreign_try_from(payload.clone()).map_err(|err| {
tracing::error!("Failed to process connector customer data: {:?}", err);
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some("Failed to process connector customer data".to_string()),
Some("CONNECTOR_CUSTOMER_DATA_ERROR".to_string()),
None,
)
})?;
// Create router data for connector customer flow
let connector_customer_router_data = RouterDataV2::<
CreateConnectorCustomer,
PaymentFlowData,
ConnectorCustomerData,
ConnectorCustomerResponse,
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data.clone(),
connector_auth_type: connector_auth_details,
request: connector_customer_request_data,
response: Err(ErrorResponse::default()),
};
// Execute connector processing
let external_event_params = EventProcessingParams {
connector_name,
service_name,
flow_name: FlowName::CreateConnectorCustomer,
event_config: &self.config.events,
request_id: event_params.request_id,
lineage_ids: event_params.lineage_ids,
reference_id: event_params.reference_id,
shadow_mode: event_params.shadow_mode,
};
let response = Box::pin(
external_services::service::execute_connector_processing_step(
&self.config.proxy,
connector_integration,
connector_customer_router_data,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1000,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1025_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data.clone(),
connector_auth_type: connector_auth_details,
request: connector_customer_request_data,
response: Err(ErrorResponse::default()),
};
// Execute connector processing
let external_event_params = EventProcessingParams {
connector_name,
service_name,
flow_name: FlowName::CreateConnectorCustomer,
event_config: &self.config.events,
request_id: event_params.request_id,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1025,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1025_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data.clone(),
connector_auth_type: connector_auth_details,
request: connector_customer_request_data,
response: Err(ErrorResponse::default()),
};
// Execute connector processing
let external_event_params = EventProcessingParams {
connector_name,
service_name,
flow_name: FlowName::CreateConnectorCustomer,
event_config: &self.config.events,
request_id: event_params.request_id,
lineage_ids: event_params.lineage_ids,
reference_id: event_params.reference_id,
shadow_mode: event_params.shadow_mode,
};
let response = Box::pin(
external_services::service::execute_connector_processing_step(
&self.config.proxy,
connector_integration,
connector_customer_router_data,
None,
external_event_params,
None,
common_enums::CallConnectorAction::Trigger,
),
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1025,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1025_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data.clone(),
connector_auth_type: connector_auth_details,
request: connector_customer_request_data,
response: Err(ErrorResponse::default()),
};
// Execute connector processing
let external_event_params = EventProcessingParams {
connector_name,
service_name,
flow_name: FlowName::CreateConnectorCustomer,
event_config: &self.config.events,
request_id: event_params.request_id,
lineage_ids: event_params.lineage_ids,
reference_id: event_params.reference_id,
shadow_mode: event_params.shadow_mode,
};
let response = Box::pin(
external_services::service::execute_connector_processing_step(
&self.config.proxy,
connector_integration,
connector_customer_router_data,
None,
external_event_params,
None,
common_enums::CallConnectorAction::Trigger,
),
)
.await
.switch()
.map_err(|e: error_stack::Report<ApplicationErrorResponse>| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Connector customer creation failed: {e}")),
Some("CONNECTOR_CUSTOMER_CREATION_ERROR".to_string()),
Some(500),
)
})?;
match response.response {
Ok(connector_customer_data) => Ok(connector_customer_data),
Err(ErrorResponse {
message,
status_code,
..
}) => Err(PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1025,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1050_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
None,
external_event_params,
None,
common_enums::CallConnectorAction::Trigger,
),
)
.await
.switch()
.map_err(|e: error_stack::Report<ApplicationErrorResponse>| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Connector customer creation failed: {e}")),
Some("CONNECTOR_CUSTOMER_CREATION_ERROR".to_string()),
Some(500),
)
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1050,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1050_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
None,
external_event_params,
None,
common_enums::CallConnectorAction::Trigger,
),
)
.await
.switch()
.map_err(|e: error_stack::Report<ApplicationErrorResponse>| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Connector customer creation failed: {e}")),
Some("CONNECTOR_CUSTOMER_CREATION_ERROR".to_string()),
Some(500),
)
})?;
match response.response {
Ok(connector_customer_data) => Ok(connector_customer_data),
Err(ErrorResponse {
message,
status_code,
..
}) => Err(PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Connector customer creation failed: {message}")),
Some("CONNECTOR_CUSTOMER_CREATION_ERROR".to_string()),
Some(status_code.into()),
)),
}
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1050,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1050_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
None,
external_event_params,
None,
common_enums::CallConnectorAction::Trigger,
),
)
.await
.switch()
.map_err(|e: error_stack::Report<ApplicationErrorResponse>| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Connector customer creation failed: {e}")),
Some("CONNECTOR_CUSTOMER_CREATION_ERROR".to_string()),
Some(500),
)
})?;
match response.response {
Ok(connector_customer_data) => Ok(connector_customer_data),
Err(ErrorResponse {
message,
status_code,
..
}) => Err(PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Connector customer creation failed: {message}")),
Some("CONNECTOR_CUSTOMER_CREATION_ERROR".to_string()),
Some(status_code.into()),
)),
}
}
#[allow(clippy::too_many_arguments)]
async fn handle_connector_customer_for_setup_mandate<
T: PaymentMethodDataTypes
+ Default
+ Eq
+ Debug
+ Send
+ serde::Serialize
+ serde::de::DeserializeOwned
+ Clone
+ Sync
+ domain_types::types::CardConversionHelper<T>
+ 'static,
>(
&self,
connector_data: ConnectorData<T>,
payment_flow_data: &PaymentFlowData,
connector_auth_details: ConnectorAuthType,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1050,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1075_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
Some(format!("Connector customer creation failed: {message}")),
Some("CONNECTOR_CUSTOMER_CREATION_ERROR".to_string()),
Some(status_code.into()),
)),
}
}
#[allow(clippy::too_many_arguments)]
async fn handle_connector_customer_for_setup_mandate<
T: PaymentMethodDataTypes
+ Default
+ Eq
+ Debug
+ Send
+ serde::Serialize
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1075,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1075_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
Some(format!("Connector customer creation failed: {message}")),
Some("CONNECTOR_CUSTOMER_CREATION_ERROR".to_string()),
Some(status_code.into()),
)),
}
}
#[allow(clippy::too_many_arguments)]
async fn handle_connector_customer_for_setup_mandate<
T: PaymentMethodDataTypes
+ Default
+ Eq
+ Debug
+ Send
+ serde::Serialize
+ serde::de::DeserializeOwned
+ Clone
+ Sync
+ domain_types::types::CardConversionHelper<T>
+ 'static,
>(
&self,
connector_data: ConnectorData<T>,
payment_flow_data: &PaymentFlowData,
connector_auth_details: ConnectorAuthType,
payload: &PaymentServiceRegisterRequest,
connector_name: &str,
service_name: &str,
event_params: EventParams<'_>,
) -> Result<ConnectorCustomerResponse, tonic::Status> {
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1075,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1075_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
Some(format!("Connector customer creation failed: {message}")),
Some("CONNECTOR_CUSTOMER_CREATION_ERROR".to_string()),
Some(status_code.into()),
)),
}
}
#[allow(clippy::too_many_arguments)]
async fn handle_connector_customer_for_setup_mandate<
T: PaymentMethodDataTypes
+ Default
+ Eq
+ Debug
+ Send
+ serde::Serialize
+ serde::de::DeserializeOwned
+ Clone
+ Sync
+ domain_types::types::CardConversionHelper<T>
+ 'static,
>(
&self,
connector_data: ConnectorData<T>,
payment_flow_data: &PaymentFlowData,
connector_auth_details: ConnectorAuthType,
payload: &PaymentServiceRegisterRequest,
connector_name: &str,
service_name: &str,
event_params: EventParams<'_>,
) -> Result<ConnectorCustomerResponse, tonic::Status> {
// Get connector integration for CreateConnectorCustomer flow
let connector_integration: BoxedConnectorIntegrationV2<
'_,
CreateConnectorCustomer,
PaymentFlowData,
ConnectorCustomerData,
ConnectorCustomerResponse,
> = connector_data.connector.get_connector_integration_v2();
// Create connector customer request data using ForeignTryFrom
let connector_customer_request_data =
ConnectorCustomerData::foreign_try_from(payload.clone()).map_err(|err| {
tracing::error!("Failed to process connector customer data: {:?}", err);
tonic::Status::internal(format!("Failed to process connector customer data: {err}"))
})?;
// Create router data for connector customer flow
let connector_customer_router_data = RouterDataV2::<
CreateConnectorCustomer,
PaymentFlowData,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1075,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1100_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
payload: &PaymentServiceRegisterRequest,
connector_name: &str,
service_name: &str,
event_params: EventParams<'_>,
) -> Result<ConnectorCustomerResponse, tonic::Status> {
// Get connector integration for CreateConnectorCustomer flow
let connector_integration: BoxedConnectorIntegrationV2<
'_,
CreateConnectorCustomer,
PaymentFlowData,
ConnectorCustomerData,
ConnectorCustomerResponse,
> = connector_data.connector.get_connector_integration_v2();
// Create connector customer request data using ForeignTryFrom
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1100,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1100_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
payload: &PaymentServiceRegisterRequest,
connector_name: &str,
service_name: &str,
event_params: EventParams<'_>,
) -> Result<ConnectorCustomerResponse, tonic::Status> {
// Get connector integration for CreateConnectorCustomer flow
let connector_integration: BoxedConnectorIntegrationV2<
'_,
CreateConnectorCustomer,
PaymentFlowData,
ConnectorCustomerData,
ConnectorCustomerResponse,
> = connector_data.connector.get_connector_integration_v2();
// Create connector customer request data using ForeignTryFrom
let connector_customer_request_data =
ConnectorCustomerData::foreign_try_from(payload.clone()).map_err(|err| {
tracing::error!("Failed to process connector customer data: {:?}", err);
tonic::Status::internal(format!("Failed to process connector customer data: {err}"))
})?;
// Create router data for connector customer flow
let connector_customer_router_data = RouterDataV2::<
CreateConnectorCustomer,
PaymentFlowData,
ConnectorCustomerData,
ConnectorCustomerResponse,
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data.clone(),
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1100,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1100_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
payload: &PaymentServiceRegisterRequest,
connector_name: &str,
service_name: &str,
event_params: EventParams<'_>,
) -> Result<ConnectorCustomerResponse, tonic::Status> {
// Get connector integration for CreateConnectorCustomer flow
let connector_integration: BoxedConnectorIntegrationV2<
'_,
CreateConnectorCustomer,
PaymentFlowData,
ConnectorCustomerData,
ConnectorCustomerResponse,
> = connector_data.connector.get_connector_integration_v2();
// Create connector customer request data using ForeignTryFrom
let connector_customer_request_data =
ConnectorCustomerData::foreign_try_from(payload.clone()).map_err(|err| {
tracing::error!("Failed to process connector customer data: {:?}", err);
tonic::Status::internal(format!("Failed to process connector customer data: {err}"))
})?;
// Create router data for connector customer flow
let connector_customer_router_data = RouterDataV2::<
CreateConnectorCustomer,
PaymentFlowData,
ConnectorCustomerData,
ConnectorCustomerResponse,
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data.clone(),
connector_auth_type: connector_auth_details,
request: connector_customer_request_data,
response: Err(ErrorResponse::default()),
};
// Execute connector processing
let external_event_params = EventProcessingParams {
connector_name,
service_name,
flow_name: FlowName::CreateConnectorCustomer,
event_config: &self.config.events,
request_id: event_params.request_id,
lineage_ids: event_params.lineage_ids,
reference_id: event_params.reference_id,
shadow_mode: event_params.shadow_mode,
};
let response = Box::pin(
external_services::service::execute_connector_processing_step(
&self.config.proxy,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1100,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1125_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
ConnectorCustomerData,
ConnectorCustomerResponse,
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data.clone(),
connector_auth_type: connector_auth_details,
request: connector_customer_request_data,
response: Err(ErrorResponse::default()),
};
// Execute connector processing
let external_event_params = EventProcessingParams {
connector_name,
service_name,
flow_name: FlowName::CreateConnectorCustomer,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1125,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1125_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
ConnectorCustomerData,
ConnectorCustomerResponse,
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data.clone(),
connector_auth_type: connector_auth_details,
request: connector_customer_request_data,
response: Err(ErrorResponse::default()),
};
// Execute connector processing
let external_event_params = EventProcessingParams {
connector_name,
service_name,
flow_name: FlowName::CreateConnectorCustomer,
event_config: &self.config.events,
request_id: event_params.request_id,
lineage_ids: event_params.lineage_ids,
reference_id: event_params.reference_id,
shadow_mode: event_params.shadow_mode,
};
let response = Box::pin(
external_services::service::execute_connector_processing_step(
&self.config.proxy,
connector_integration,
connector_customer_router_data,
None,
external_event_params,
None,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1125,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1125_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
ConnectorCustomerData,
ConnectorCustomerResponse,
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data.clone(),
connector_auth_type: connector_auth_details,
request: connector_customer_request_data,
response: Err(ErrorResponse::default()),
};
// Execute connector processing
let external_event_params = EventProcessingParams {
connector_name,
service_name,
flow_name: FlowName::CreateConnectorCustomer,
event_config: &self.config.events,
request_id: event_params.request_id,
lineage_ids: event_params.lineage_ids,
reference_id: event_params.reference_id,
shadow_mode: event_params.shadow_mode,
};
let response = Box::pin(
external_services::service::execute_connector_processing_step(
&self.config.proxy,
connector_integration,
connector_customer_router_data,
None,
external_event_params,
None,
common_enums::CallConnectorAction::Trigger,
),
)
.await
.switch()
.map_err(|e: error_stack::Report<ApplicationErrorResponse>| {
tonic::Status::internal(format!("Connector customer creation failed: {e}"))
})?;
match response.response {
Ok(connector_customer_data) => Ok(connector_customer_data),
Err(ErrorResponse {
message,
status_code,
..
}) => Err(tonic::Status::internal(format!(
"Connector customer creation failed: {message} (status: {status_code})"
))),
}
}
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1125,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1150_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
connector_integration,
connector_customer_router_data,
None,
external_event_params,
None,
common_enums::CallConnectorAction::Trigger,
),
)
.await
.switch()
.map_err(|e: error_stack::Report<ApplicationErrorResponse>| {
tonic::Status::internal(format!("Connector customer creation failed: {e}"))
})?;
match response.response {
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1150,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1150_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
connector_integration,
connector_customer_router_data,
None,
external_event_params,
None,
common_enums::CallConnectorAction::Trigger,
),
)
.await
.switch()
.map_err(|e: error_stack::Report<ApplicationErrorResponse>| {
tonic::Status::internal(format!("Connector customer creation failed: {e}"))
})?;
match response.response {
Ok(connector_customer_data) => Ok(connector_customer_data),
Err(ErrorResponse {
message,
status_code,
..
}) => Err(tonic::Status::internal(format!(
"Connector customer creation failed: {message} (status: {status_code})"
))),
}
}
#[allow(clippy::too_many_arguments)]
async fn handle_payment_session_token<
T: PaymentMethodDataTypes
+ Default
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1150,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1150_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
connector_integration,
connector_customer_router_data,
None,
external_event_params,
None,
common_enums::CallConnectorAction::Trigger,
),
)
.await
.switch()
.map_err(|e: error_stack::Report<ApplicationErrorResponse>| {
tonic::Status::internal(format!("Connector customer creation failed: {e}"))
})?;
match response.response {
Ok(connector_customer_data) => Ok(connector_customer_data),
Err(ErrorResponse {
message,
status_code,
..
}) => Err(tonic::Status::internal(format!(
"Connector customer creation failed: {message} (status: {status_code})"
))),
}
}
#[allow(clippy::too_many_arguments)]
async fn handle_payment_session_token<
T: PaymentMethodDataTypes
+ Default
+ Eq
+ Debug
+ Send
+ serde::Serialize
+ serde::de::DeserializeOwned
+ Clone
+ Sync
+ domain_types::types::CardConversionHelper<T>,
>(
&self,
connector_data: ConnectorData<T>,
payment_flow_data: &PaymentFlowData,
connector_auth_details: ConnectorAuthType,
event_params: EventParams<'_>,
payload: &PaymentServiceAuthorizeRequest,
connector_name: &str,
service_name: &str,
) -> Result<PaymentMethodTokenResponse, PaymentAuthorizationError> {
// Get connector integration
let connector_integration: BoxedConnectorIntegrationV2<
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1150,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1175_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
#[allow(clippy::too_many_arguments)]
async fn handle_payment_session_token<
T: PaymentMethodDataTypes
+ Default
+ Eq
+ Debug
+ Send
+ serde::Serialize
+ serde::de::DeserializeOwned
+ Clone
+ Sync
+ domain_types::types::CardConversionHelper<T>,
>(
&self,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1175,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1175_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
#[allow(clippy::too_many_arguments)]
async fn handle_payment_session_token<
T: PaymentMethodDataTypes
+ Default
+ Eq
+ Debug
+ Send
+ serde::Serialize
+ serde::de::DeserializeOwned
+ Clone
+ Sync
+ domain_types::types::CardConversionHelper<T>,
>(
&self,
connector_data: ConnectorData<T>,
payment_flow_data: &PaymentFlowData,
connector_auth_details: ConnectorAuthType,
event_params: EventParams<'_>,
payload: &PaymentServiceAuthorizeRequest,
connector_name: &str,
service_name: &str,
) -> Result<PaymentMethodTokenResponse, PaymentAuthorizationError> {
// Get connector integration
let connector_integration: BoxedConnectorIntegrationV2<
'_,
PaymentMethodToken,
PaymentFlowData,
PaymentMethodTokenizationData<T>,
PaymentMethodTokenResponse,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1175,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1175_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
#[allow(clippy::too_many_arguments)]
async fn handle_payment_session_token<
T: PaymentMethodDataTypes
+ Default
+ Eq
+ Debug
+ Send
+ serde::Serialize
+ serde::de::DeserializeOwned
+ Clone
+ Sync
+ domain_types::types::CardConversionHelper<T>,
>(
&self,
connector_data: ConnectorData<T>,
payment_flow_data: &PaymentFlowData,
connector_auth_details: ConnectorAuthType,
event_params: EventParams<'_>,
payload: &PaymentServiceAuthorizeRequest,
connector_name: &str,
service_name: &str,
) -> Result<PaymentMethodTokenResponse, PaymentAuthorizationError> {
// Get connector integration
let connector_integration: BoxedConnectorIntegrationV2<
'_,
PaymentMethodToken,
PaymentFlowData,
PaymentMethodTokenizationData<T>,
PaymentMethodTokenResponse,
> = connector_data.connector.get_connector_integration_v2();
let currency =
common_enums::Currency::foreign_try_from(payload.currency()).map_err(|e| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Currency conversion failed: {e}")),
Some("CURRENCY_ERROR".to_string()),
None,
)
})?;
let payment_method_tokenization_data = PaymentMethodTokenizationData {
amount: common_utils::types::MinorUnit::new(payload.amount),
currency,
integrity_object: None,
browser_info: None,
customer_acceptance: None,
mandate_id: None,
setup_future_usage: None,
setup_mandate_details: None,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1175,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1200_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
'_,
PaymentMethodToken,
PaymentFlowData,
PaymentMethodTokenizationData<T>,
PaymentMethodTokenResponse,
> = connector_data.connector.get_connector_integration_v2();
let currency =
common_enums::Currency::foreign_try_from(payload.currency()).map_err(|e| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Currency conversion failed: {e}")),
Some("CURRENCY_ERROR".to_string()),
None,
)
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1200,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1200_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
'_,
PaymentMethodToken,
PaymentFlowData,
PaymentMethodTokenizationData<T>,
PaymentMethodTokenResponse,
> = connector_data.connector.get_connector_integration_v2();
let currency =
common_enums::Currency::foreign_try_from(payload.currency()).map_err(|e| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Currency conversion failed: {e}")),
Some("CURRENCY_ERROR".to_string()),
None,
)
})?;
let payment_method_tokenization_data = PaymentMethodTokenizationData {
amount: common_utils::types::MinorUnit::new(payload.amount),
currency,
integrity_object: None,
browser_info: None,
customer_acceptance: None,
mandate_id: None,
setup_future_usage: None,
setup_mandate_details: None,
payment_method_data:
domain_types::payment_method_data::PaymentMethodData::foreign_try_from(
payload.payment_method.clone().ok_or_else(|| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1200,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1200_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
'_,
PaymentMethodToken,
PaymentFlowData,
PaymentMethodTokenizationData<T>,
PaymentMethodTokenResponse,
> = connector_data.connector.get_connector_integration_v2();
let currency =
common_enums::Currency::foreign_try_from(payload.currency()).map_err(|e| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Currency conversion failed: {e}")),
Some("CURRENCY_ERROR".to_string()),
None,
)
})?;
let payment_method_tokenization_data = PaymentMethodTokenizationData {
amount: common_utils::types::MinorUnit::new(payload.amount),
currency,
integrity_object: None,
browser_info: None,
customer_acceptance: None,
mandate_id: None,
setup_future_usage: None,
setup_mandate_details: None,
payment_method_data:
domain_types::payment_method_data::PaymentMethodData::foreign_try_from(
payload.payment_method.clone().ok_or_else(|| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some("Payment method is required".to_string()),
Some("PAYMENT_METHOD_MISSING".to_string()),
None,
)
})?,
)
.map_err(|e| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Payment method data conversion failed: {e}")),
Some("PAYMENT_METHOD_DATA_ERROR".to_string()),
None,
)
})?,
};
let payment_method_token_router_data = RouterDataV2::<
PaymentMethodToken,
PaymentFlowData,
PaymentMethodTokenizationData<T>,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1200,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1225_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
payment_method_data:
domain_types::payment_method_data::PaymentMethodData::foreign_try_from(
payload.payment_method.clone().ok_or_else(|| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some("Payment method is required".to_string()),
Some("PAYMENT_METHOD_MISSING".to_string()),
None,
)
})?,
)
.map_err(|e| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Payment method data conversion failed: {e}")),
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1225,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1225_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
payment_method_data:
domain_types::payment_method_data::PaymentMethodData::foreign_try_from(
payload.payment_method.clone().ok_or_else(|| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some("Payment method is required".to_string()),
Some("PAYMENT_METHOD_MISSING".to_string()),
None,
)
})?,
)
.map_err(|e| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Payment method data conversion failed: {e}")),
Some("PAYMENT_METHOD_DATA_ERROR".to_string()),
None,
)
})?,
};
let payment_method_token_router_data = RouterDataV2::<
PaymentMethodToken,
PaymentFlowData,
PaymentMethodTokenizationData<T>,
PaymentMethodTokenResponse,
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data.clone(),
connector_auth_type: connector_auth_details,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1225,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1225_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
payment_method_data:
domain_types::payment_method_data::PaymentMethodData::foreign_try_from(
payload.payment_method.clone().ok_or_else(|| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some("Payment method is required".to_string()),
Some("PAYMENT_METHOD_MISSING".to_string()),
None,
)
})?,
)
.map_err(|e| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Payment method data conversion failed: {e}")),
Some("PAYMENT_METHOD_DATA_ERROR".to_string()),
None,
)
})?,
};
let payment_method_token_router_data = RouterDataV2::<
PaymentMethodToken,
PaymentFlowData,
PaymentMethodTokenizationData<T>,
PaymentMethodTokenResponse,
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data.clone(),
connector_auth_type: connector_auth_details,
request: payment_method_tokenization_data,
response: Err(ErrorResponse::default()),
};
// Execute connector processing
let external_event_params = EventProcessingParams {
connector_name,
service_name,
flow_name: FlowName::PaymentMethodToken,
event_config: &self.config.events,
request_id: event_params.request_id,
lineage_ids: event_params.lineage_ids,
reference_id: event_params.reference_id,
shadow_mode: event_params.shadow_mode,
};
let response = external_services::service::execute_connector_processing_step(
&self.config.proxy,
connector_integration,
payment_method_token_router_data,
None,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1225,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1250_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
PaymentMethodTokenResponse,
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data.clone(),
connector_auth_type: connector_auth_details,
request: payment_method_tokenization_data,
response: Err(ErrorResponse::default()),
};
// Execute connector processing
let external_event_params = EventProcessingParams {
connector_name,
service_name,
flow_name: FlowName::PaymentMethodToken,
event_config: &self.config.events,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1250,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1250_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
PaymentMethodTokenResponse,
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data.clone(),
connector_auth_type: connector_auth_details,
request: payment_method_tokenization_data,
response: Err(ErrorResponse::default()),
};
// Execute connector processing
let external_event_params = EventProcessingParams {
connector_name,
service_name,
flow_name: FlowName::PaymentMethodToken,
event_config: &self.config.events,
request_id: event_params.request_id,
lineage_ids: event_params.lineage_ids,
reference_id: event_params.reference_id,
shadow_mode: event_params.shadow_mode,
};
let response = external_services::service::execute_connector_processing_step(
&self.config.proxy,
connector_integration,
payment_method_token_router_data,
None,
external_event_params,
None,
common_enums::CallConnectorAction::Trigger,
)
.await
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1250,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1250_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
PaymentMethodTokenResponse,
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data.clone(),
connector_auth_type: connector_auth_details,
request: payment_method_tokenization_data,
response: Err(ErrorResponse::default()),
};
// Execute connector processing
let external_event_params = EventProcessingParams {
connector_name,
service_name,
flow_name: FlowName::PaymentMethodToken,
event_config: &self.config.events,
request_id: event_params.request_id,
lineage_ids: event_params.lineage_ids,
reference_id: event_params.reference_id,
shadow_mode: event_params.shadow_mode,
};
let response = external_services::service::execute_connector_processing_step(
&self.config.proxy,
connector_integration,
payment_method_token_router_data,
None,
external_event_params,
None,
common_enums::CallConnectorAction::Trigger,
)
.await
.switch()
.map_err(|e: error_stack::Report<ApplicationErrorResponse>| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Payment Method Token creation failed: {e}")),
Some("PAYMENT_METHOD_TOKEN_CREATION_ERROR".to_string()),
Some(500),
)
})?;
match response.response {
Ok(payment_method_token_data) => {
tracing::info!("Payment method token created successfully");
Ok(payment_method_token_data)
}
Err(ErrorResponse {
message,
status_code,
..
}) => Err(PaymentAuthorizationError::new(
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1250,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1275_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
external_event_params,
None,
common_enums::CallConnectorAction::Trigger,
)
.await
.switch()
.map_err(|e: error_stack::Report<ApplicationErrorResponse>| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Payment Method Token creation failed: {e}")),
Some("PAYMENT_METHOD_TOKEN_CREATION_ERROR".to_string()),
Some(500),
)
})?;
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1275,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1275_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
external_event_params,
None,
common_enums::CallConnectorAction::Trigger,
)
.await
.switch()
.map_err(|e: error_stack::Report<ApplicationErrorResponse>| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Payment Method Token creation failed: {e}")),
Some("PAYMENT_METHOD_TOKEN_CREATION_ERROR".to_string()),
Some(500),
)
})?;
match response.response {
Ok(payment_method_token_data) => {
tracing::info!("Payment method token created successfully");
Ok(payment_method_token_data)
}
Err(ErrorResponse {
message,
status_code,
..
}) => Err(PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Payment Method Token creation failed: {message}")),
Some("PAYMENT_METHOD_TOKEN_CREATION_ERROR".to_string()),
Some(status_code.into()),
)),
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1275,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1275_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
external_event_params,
None,
common_enums::CallConnectorAction::Trigger,
)
.await
.switch()
.map_err(|e: error_stack::Report<ApplicationErrorResponse>| {
PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Payment Method Token creation failed: {e}")),
Some("PAYMENT_METHOD_TOKEN_CREATION_ERROR".to_string()),
Some(500),
)
})?;
match response.response {
Ok(payment_method_token_data) => {
tracing::info!("Payment method token created successfully");
Ok(payment_method_token_data)
}
Err(ErrorResponse {
message,
status_code,
..
}) => Err(PaymentAuthorizationError::new(
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Payment Method Token creation failed: {message}")),
Some("PAYMENT_METHOD_TOKEN_CREATION_ERROR".to_string()),
Some(status_code.into()),
)),
}
}
}
impl PaymentOperationsInternal for Payments {
implement_connector_operation!(
fn_name: internal_void_payment,
log_prefix: "PAYMENT_VOID",
request_type: PaymentServiceVoidRequest,
response_type: PaymentServiceVoidResponse,
flow_marker: Void,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentVoidData,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentVoidData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_void_response,
all_keys_required: None
);
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1275,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1300_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Payment Method Token creation failed: {message}")),
Some("PAYMENT_METHOD_TOKEN_CREATION_ERROR".to_string()),
Some(status_code.into()),
)),
}
}
}
impl PaymentOperationsInternal for Payments {
implement_connector_operation!(
fn_name: internal_void_payment,
log_prefix: "PAYMENT_VOID",
request_type: PaymentServiceVoidRequest,
response_type: PaymentServiceVoidResponse,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1300,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1300_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Payment Method Token creation failed: {message}")),
Some("PAYMENT_METHOD_TOKEN_CREATION_ERROR".to_string()),
Some(status_code.into()),
)),
}
}
}
impl PaymentOperationsInternal for Payments {
implement_connector_operation!(
fn_name: internal_void_payment,
log_prefix: "PAYMENT_VOID",
request_type: PaymentServiceVoidRequest,
response_type: PaymentServiceVoidResponse,
flow_marker: Void,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentVoidData,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentVoidData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_void_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_refund,
log_prefix: "REFUND",
request_type: PaymentServiceRefundRequest,
response_type: RefundResponse,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1300,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1300_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
grpc_api_types::payments::PaymentStatus::Pending,
Some(format!("Payment Method Token creation failed: {message}")),
Some("PAYMENT_METHOD_TOKEN_CREATION_ERROR".to_string()),
Some(status_code.into()),
)),
}
}
}
impl PaymentOperationsInternal for Payments {
implement_connector_operation!(
fn_name: internal_void_payment,
log_prefix: "PAYMENT_VOID",
request_type: PaymentServiceVoidRequest,
response_type: PaymentServiceVoidResponse,
flow_marker: Void,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentVoidData,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentVoidData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_void_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_refund,
log_prefix: "REFUND",
request_type: PaymentServiceRefundRequest,
response_type: RefundResponse,
flow_marker: Refund,
resource_common_data_type: RefundFlowData,
request_data_type: RefundsData,
response_data_type: RefundsResponseData,
request_data_constructor: RefundsData::foreign_try_from,
common_flow_data_constructor: RefundFlowData::foreign_try_from,
generate_response_fn: generate_refund_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_payment_capture,
log_prefix: "PAYMENT_CAPTURE",
request_type: PaymentServiceCaptureRequest,
response_type: PaymentServiceCaptureResponse,
flow_marker: Capture,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsCaptureData,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsCaptureData::foreign_try_from,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1300,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1325_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
implement_connector_operation!(
fn_name: internal_refund,
log_prefix: "REFUND",
request_type: PaymentServiceRefundRequest,
response_type: RefundResponse,
flow_marker: Refund,
resource_common_data_type: RefundFlowData,
request_data_type: RefundsData,
response_data_type: RefundsResponseData,
request_data_constructor: RefundsData::foreign_try_from,
common_flow_data_constructor: RefundFlowData::foreign_try_from,
generate_response_fn: generate_refund_response,
all_keys_required: None
);
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1325,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1325_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
implement_connector_operation!(
fn_name: internal_refund,
log_prefix: "REFUND",
request_type: PaymentServiceRefundRequest,
response_type: RefundResponse,
flow_marker: Refund,
resource_common_data_type: RefundFlowData,
request_data_type: RefundsData,
response_data_type: RefundsResponseData,
request_data_constructor: RefundsData::foreign_try_from,
common_flow_data_constructor: RefundFlowData::foreign_try_from,
generate_response_fn: generate_refund_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_payment_capture,
log_prefix: "PAYMENT_CAPTURE",
request_type: PaymentServiceCaptureRequest,
response_type: PaymentServiceCaptureResponse,
flow_marker: Capture,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsCaptureData,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsCaptureData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_capture_response,
all_keys_required: None
);
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1325,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1325_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
implement_connector_operation!(
fn_name: internal_refund,
log_prefix: "REFUND",
request_type: PaymentServiceRefundRequest,
response_type: RefundResponse,
flow_marker: Refund,
resource_common_data_type: RefundFlowData,
request_data_type: RefundsData,
response_data_type: RefundsResponseData,
request_data_constructor: RefundsData::foreign_try_from,
common_flow_data_constructor: RefundFlowData::foreign_try_from,
generate_response_fn: generate_refund_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_payment_capture,
log_prefix: "PAYMENT_CAPTURE",
request_type: PaymentServiceCaptureRequest,
response_type: PaymentServiceCaptureResponse,
flow_marker: Capture,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsCaptureData,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsCaptureData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_capture_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_pre_authenticate,
log_prefix: "PRE_AUTHENTICATE",
request_type: PaymentServicePreAuthenticateRequest,
response_type: PaymentServicePreAuthenticateResponse,
flow_marker: PreAuthenticate,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsPreAuthenticateData<DefaultPCIHolder>,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsPreAuthenticateData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_pre_authenticate_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_authenticate,
log_prefix: "AUTHENTICATE",
request_type: PaymentServiceAuthenticateRequest,
response_type: PaymentServiceAuthenticateResponse,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1325,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1350_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_capture_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_pre_authenticate,
log_prefix: "PRE_AUTHENTICATE",
request_type: PaymentServicePreAuthenticateRequest,
response_type: PaymentServicePreAuthenticateResponse,
flow_marker: PreAuthenticate,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsPreAuthenticateData<DefaultPCIHolder>,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsPreAuthenticateData::foreign_try_from,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1350,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1350_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_capture_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_pre_authenticate,
log_prefix: "PRE_AUTHENTICATE",
request_type: PaymentServicePreAuthenticateRequest,
response_type: PaymentServicePreAuthenticateResponse,
flow_marker: PreAuthenticate,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsPreAuthenticateData<DefaultPCIHolder>,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsPreAuthenticateData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_pre_authenticate_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_authenticate,
log_prefix: "AUTHENTICATE",
request_type: PaymentServiceAuthenticateRequest,
response_type: PaymentServiceAuthenticateResponse,
flow_marker: Authenticate,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsAuthenticateData<DefaultPCIHolder>,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsAuthenticateData::foreign_try_from,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1350,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1350_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_capture_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_pre_authenticate,
log_prefix: "PRE_AUTHENTICATE",
request_type: PaymentServicePreAuthenticateRequest,
response_type: PaymentServicePreAuthenticateResponse,
flow_marker: PreAuthenticate,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsPreAuthenticateData<DefaultPCIHolder>,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsPreAuthenticateData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_pre_authenticate_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_authenticate,
log_prefix: "AUTHENTICATE",
request_type: PaymentServiceAuthenticateRequest,
response_type: PaymentServiceAuthenticateResponse,
flow_marker: Authenticate,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsAuthenticateData<DefaultPCIHolder>,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsAuthenticateData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_authenticate_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_post_authenticate,
log_prefix: "POST_AUTHENTICATE",
request_type: PaymentServicePostAuthenticateRequest,
response_type: PaymentServicePostAuthenticateResponse,
flow_marker: PostAuthenticate,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsPostAuthenticateData<DefaultPCIHolder>,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsPostAuthenticateData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_post_authenticate_response,
all_keys_required: None
);
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1350,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1375_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
flow_marker: Authenticate,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsAuthenticateData<DefaultPCIHolder>,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsAuthenticateData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_authenticate_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_post_authenticate,
log_prefix: "POST_AUTHENTICATE",
request_type: PaymentServicePostAuthenticateRequest,
response_type: PaymentServicePostAuthenticateResponse,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1375,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1375_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
flow_marker: Authenticate,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsAuthenticateData<DefaultPCIHolder>,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsAuthenticateData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_authenticate_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_post_authenticate,
log_prefix: "POST_AUTHENTICATE",
request_type: PaymentServicePostAuthenticateRequest,
response_type: PaymentServicePostAuthenticateResponse,
flow_marker: PostAuthenticate,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsPostAuthenticateData<DefaultPCIHolder>,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsPostAuthenticateData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_post_authenticate_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_void_post_capture,
log_prefix: "PAYMENT_VOID_POST_CAPTURE",
request_type: PaymentServiceVoidPostCaptureRequest,
response_type: PaymentServiceVoidPostCaptureResponse,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1375,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1375_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
flow_marker: Authenticate,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsAuthenticateData<DefaultPCIHolder>,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsAuthenticateData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_authenticate_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_post_authenticate,
log_prefix: "POST_AUTHENTICATE",
request_type: PaymentServicePostAuthenticateRequest,
response_type: PaymentServicePostAuthenticateResponse,
flow_marker: PostAuthenticate,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsPostAuthenticateData<DefaultPCIHolder>,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsPostAuthenticateData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_post_authenticate_response,
all_keys_required: None
);
implement_connector_operation!(
fn_name: internal_void_post_capture,
log_prefix: "PAYMENT_VOID_POST_CAPTURE",
request_type: PaymentServiceVoidPostCaptureRequest,
response_type: PaymentServiceVoidPostCaptureResponse,
flow_marker: VoidPC,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsCancelPostCaptureData,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsCancelPostCaptureData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_void_post_capture_response,
all_keys_required: None
);
}
#[tonic::async_trait]
impl PaymentService for Payments {
#[tracing::instrument(
name = "payment_authorize",
fields(
name = common_utils::consts::NAME,
service_name = tracing::field::Empty,
service_method = FlowName::Authorize.as_str(),
request_body = tracing::field::Empty,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1375,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1400_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
implement_connector_operation!(
fn_name: internal_void_post_capture,
log_prefix: "PAYMENT_VOID_POST_CAPTURE",
request_type: PaymentServiceVoidPostCaptureRequest,
response_type: PaymentServiceVoidPostCaptureResponse,
flow_marker: VoidPC,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsCancelPostCaptureData,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsCancelPostCaptureData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_void_post_capture_response,
all_keys_required: None
);
}
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1400,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1400_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
implement_connector_operation!(
fn_name: internal_void_post_capture,
log_prefix: "PAYMENT_VOID_POST_CAPTURE",
request_type: PaymentServiceVoidPostCaptureRequest,
response_type: PaymentServiceVoidPostCaptureResponse,
flow_marker: VoidPC,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsCancelPostCaptureData,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsCancelPostCaptureData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_void_post_capture_response,
all_keys_required: None
);
}
#[tonic::async_trait]
impl PaymentService for Payments {
#[tracing::instrument(
name = "payment_authorize",
fields(
name = common_utils::consts::NAME,
service_name = tracing::field::Empty,
service_method = FlowName::Authorize.as_str(),
request_body = tracing::field::Empty,
response_body = tracing::field::Empty,
error_message = tracing::field::Empty,
merchant_id = tracing::field::Empty,
gateway = tracing::field::Empty,
request_id = tracing::field::Empty,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1400,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1400_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
implement_connector_operation!(
fn_name: internal_void_post_capture,
log_prefix: "PAYMENT_VOID_POST_CAPTURE",
request_type: PaymentServiceVoidPostCaptureRequest,
response_type: PaymentServiceVoidPostCaptureResponse,
flow_marker: VoidPC,
resource_common_data_type: PaymentFlowData,
request_data_type: PaymentsCancelPostCaptureData,
response_data_type: PaymentsResponseData,
request_data_constructor: PaymentsCancelPostCaptureData::foreign_try_from,
common_flow_data_constructor: PaymentFlowData::foreign_try_from,
generate_response_fn: generate_payment_void_post_capture_response,
all_keys_required: None
);
}
#[tonic::async_trait]
impl PaymentService for Payments {
#[tracing::instrument(
name = "payment_authorize",
fields(
name = common_utils::consts::NAME,
service_name = tracing::field::Empty,
service_method = FlowName::Authorize.as_str(),
request_body = tracing::field::Empty,
response_body = tracing::field::Empty,
error_message = tracing::field::Empty,
merchant_id = tracing::field::Empty,
gateway = tracing::field::Empty,
request_id = tracing::field::Empty,
status_code = tracing::field::Empty,
message_ = "Golden Log Line (incoming)",
response_time = tracing::field::Empty,
tenant_id = tracing::field::Empty,
flow = FlowName::Authorize.as_str(),
flow_specific_fields.status = tracing::field::Empty,
)
skip(self, request)
)]
async fn authorize(
&self,
request: tonic::Request<PaymentServiceAuthorizeRequest>,
) -> Result<tonic::Response<PaymentServiceAuthorizeResponse>, tonic::Status> {
info!("PAYMENT_AUTHORIZE_FLOW: initiated");
let service_name = request
.extensions()
.get::<String>()
.cloned()
.unwrap_or_else(|| "PaymentService".to_string());
grpc_logging_wrapper(request, &service_name, self.config.clone(), FlowName::Authorize, |request_data| {
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1400,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1425_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
response_body = tracing::field::Empty,
error_message = tracing::field::Empty,
merchant_id = tracing::field::Empty,
gateway = tracing::field::Empty,
request_id = tracing::field::Empty,
status_code = tracing::field::Empty,
message_ = "Golden Log Line (incoming)",
response_time = tracing::field::Empty,
tenant_id = tracing::field::Empty,
flow = FlowName::Authorize.as_str(),
flow_specific_fields.status = tracing::field::Empty,
)
skip(self, request)
)]
async fn authorize(
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1425,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1425_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
response_body = tracing::field::Empty,
error_message = tracing::field::Empty,
merchant_id = tracing::field::Empty,
gateway = tracing::field::Empty,
request_id = tracing::field::Empty,
status_code = tracing::field::Empty,
message_ = "Golden Log Line (incoming)",
response_time = tracing::field::Empty,
tenant_id = tracing::field::Empty,
flow = FlowName::Authorize.as_str(),
flow_specific_fields.status = tracing::field::Empty,
)
skip(self, request)
)]
async fn authorize(
&self,
request: tonic::Request<PaymentServiceAuthorizeRequest>,
) -> Result<tonic::Response<PaymentServiceAuthorizeResponse>, tonic::Status> {
info!("PAYMENT_AUTHORIZE_FLOW: initiated");
let service_name = request
.extensions()
.get::<String>()
.cloned()
.unwrap_or_else(|| "PaymentService".to_string());
grpc_logging_wrapper(request, &service_name, self.config.clone(), FlowName::Authorize, |request_data| {
let service_name = service_name.clone();
Box::pin(async move {
let metadata_payload = request_data.extracted_metadata;
let metadata = &request_data.masked_metadata;
let payload = request_data.payload;
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1425,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1425_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
response_body = tracing::field::Empty,
error_message = tracing::field::Empty,
merchant_id = tracing::field::Empty,
gateway = tracing::field::Empty,
request_id = tracing::field::Empty,
status_code = tracing::field::Empty,
message_ = "Golden Log Line (incoming)",
response_time = tracing::field::Empty,
tenant_id = tracing::field::Empty,
flow = FlowName::Authorize.as_str(),
flow_specific_fields.status = tracing::field::Empty,
)
skip(self, request)
)]
async fn authorize(
&self,
request: tonic::Request<PaymentServiceAuthorizeRequest>,
) -> Result<tonic::Response<PaymentServiceAuthorizeResponse>, tonic::Status> {
info!("PAYMENT_AUTHORIZE_FLOW: initiated");
let service_name = request
.extensions()
.get::<String>()
.cloned()
.unwrap_or_else(|| "PaymentService".to_string());
grpc_logging_wrapper(request, &service_name, self.config.clone(), FlowName::Authorize, |request_data| {
let service_name = service_name.clone();
Box::pin(async move {
let metadata_payload = request_data.extracted_metadata;
let metadata = &request_data.masked_metadata;
let payload = request_data.payload;
let authorize_response = match payload.payment_method.as_ref() {
Some(pm) => {
match pm.payment_method.as_ref() {
Some(payment_method::PaymentMethod::Card(card_details)) => {
match &card_details.card_type {
Some(grpc_api_types::payments::card_payment_method_type::CardType::CreditProxy(proxy_card_details)) | Some(grpc_api_types::payments::card_payment_method_type::CardType::DebitProxy(proxy_card_details)) => {
let token_data = proxy_card_details.to_token_data();
match Box::pin(self.process_authorization_internal::<VaultTokenHolder>(
payload.clone(),
metadata_payload.connector,
metadata_payload.connector_auth_type.clone(),
metadata,
&metadata_payload,
&service_name,
&metadata_payload.request_id,
Some(token_data),
))
.await
{
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1425,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1450_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
let service_name = service_name.clone();
Box::pin(async move {
let metadata_payload = request_data.extracted_metadata;
let metadata = &request_data.masked_metadata;
let payload = request_data.payload;
let authorize_response = match payload.payment_method.as_ref() {
Some(pm) => {
match pm.payment_method.as_ref() {
Some(payment_method::PaymentMethod::Card(card_details)) => {
match &card_details.card_type {
Some(grpc_api_types::payments::card_payment_method_type::CardType::CreditProxy(proxy_card_details)) | Some(grpc_api_types::payments::card_payment_method_type::CardType::DebitProxy(proxy_card_details)) => {
let token_data = proxy_card_details.to_token_data();
match Box::pin(self.process_authorization_internal::<VaultTokenHolder>(
payload.clone(),
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1450,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1450_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
let service_name = service_name.clone();
Box::pin(async move {
let metadata_payload = request_data.extracted_metadata;
let metadata = &request_data.masked_metadata;
let payload = request_data.payload;
let authorize_response = match payload.payment_method.as_ref() {
Some(pm) => {
match pm.payment_method.as_ref() {
Some(payment_method::PaymentMethod::Card(card_details)) => {
match &card_details.card_type {
Some(grpc_api_types::payments::card_payment_method_type::CardType::CreditProxy(proxy_card_details)) | Some(grpc_api_types::payments::card_payment_method_type::CardType::DebitProxy(proxy_card_details)) => {
let token_data = proxy_card_details.to_token_data();
match Box::pin(self.process_authorization_internal::<VaultTokenHolder>(
payload.clone(),
metadata_payload.connector,
metadata_payload.connector_auth_type.clone(),
metadata,
&metadata_payload,
&service_name,
&metadata_payload.request_id,
Some(token_data),
))
.await
{
Ok(response) => {
tracing::info!("INJECTOR: Authorization completed successfully with injector");
response
},
Err(error_response) => {
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1450,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1450_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
let service_name = service_name.clone();
Box::pin(async move {
let metadata_payload = request_data.extracted_metadata;
let metadata = &request_data.masked_metadata;
let payload = request_data.payload;
let authorize_response = match payload.payment_method.as_ref() {
Some(pm) => {
match pm.payment_method.as_ref() {
Some(payment_method::PaymentMethod::Card(card_details)) => {
match &card_details.card_type {
Some(grpc_api_types::payments::card_payment_method_type::CardType::CreditProxy(proxy_card_details)) | Some(grpc_api_types::payments::card_payment_method_type::CardType::DebitProxy(proxy_card_details)) => {
let token_data = proxy_card_details.to_token_data();
match Box::pin(self.process_authorization_internal::<VaultTokenHolder>(
payload.clone(),
metadata_payload.connector,
metadata_payload.connector_auth_type.clone(),
metadata,
&metadata_payload,
&service_name,
&metadata_payload.request_id,
Some(token_data),
))
.await
{
Ok(response) => {
tracing::info!("INJECTOR: Authorization completed successfully with injector");
response
},
Err(error_response) => {
tracing::error!("INJECTOR: Authorization failed with injector - error: {:?}", error_response);
PaymentServiceAuthorizeResponse::from(error_response)
},
}
}
_ => {
tracing::info!("REGULAR: Processing regular payment (no injector)");
match Box::pin(self.process_authorization_internal::<DefaultPCIHolder>(
payload.clone(),
metadata_payload.connector,
metadata_payload.connector_auth_type.clone(),
metadata,
&metadata_payload,
&service_name,
&metadata_payload.request_id,
None,
))
.await
{
Ok(response) => {
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1450,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1475_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
Ok(response) => {
tracing::info!("INJECTOR: Authorization completed successfully with injector");
response
},
Err(error_response) => {
tracing::error!("INJECTOR: Authorization failed with injector - error: {:?}", error_response);
PaymentServiceAuthorizeResponse::from(error_response)
},
}
}
_ => {
tracing::info!("REGULAR: Processing regular payment (no injector)");
match Box::pin(self.process_authorization_internal::<DefaultPCIHolder>(
payload.clone(),
metadata_payload.connector,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1475,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1475_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
Ok(response) => {
tracing::info!("INJECTOR: Authorization completed successfully with injector");
response
},
Err(error_response) => {
tracing::error!("INJECTOR: Authorization failed with injector - error: {:?}", error_response);
PaymentServiceAuthorizeResponse::from(error_response)
},
}
}
_ => {
tracing::info!("REGULAR: Processing regular payment (no injector)");
match Box::pin(self.process_authorization_internal::<DefaultPCIHolder>(
payload.clone(),
metadata_payload.connector,
metadata_payload.connector_auth_type.clone(),
metadata,
&metadata_payload,
&service_name,
&metadata_payload.request_id,
None,
))
.await
{
Ok(response) => {
tracing::info!("REGULAR: Authorization completed successfully without injector");
response
},
Err(error_response) => {
tracing::error!("REGULAR: Authorization failed without injector - error: {:?}", error_response);
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1475,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1475_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
Ok(response) => {
tracing::info!("INJECTOR: Authorization completed successfully with injector");
response
},
Err(error_response) => {
tracing::error!("INJECTOR: Authorization failed with injector - error: {:?}", error_response);
PaymentServiceAuthorizeResponse::from(error_response)
},
}
}
_ => {
tracing::info!("REGULAR: Processing regular payment (no injector)");
match Box::pin(self.process_authorization_internal::<DefaultPCIHolder>(
payload.clone(),
metadata_payload.connector,
metadata_payload.connector_auth_type.clone(),
metadata,
&metadata_payload,
&service_name,
&metadata_payload.request_id,
None,
))
.await
{
Ok(response) => {
tracing::info!("REGULAR: Authorization completed successfully without injector");
response
},
Err(error_response) => {
tracing::error!("REGULAR: Authorization failed without injector - error: {:?}", error_response);
PaymentServiceAuthorizeResponse::from(error_response)
},
}
}
}
}
_ => {
match Box::pin(self.process_authorization_internal::<DefaultPCIHolder>(
payload.clone(),
metadata_payload.connector,
metadata_payload.connector_auth_type.clone(),
metadata,
&metadata_payload,
&service_name,
&metadata_payload.request_id,
None,
))
.await
{
Ok(response) => response,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1475,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1500_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
tracing::info!("REGULAR: Authorization completed successfully without injector");
response
},
Err(error_response) => {
tracing::error!("REGULAR: Authorization failed without injector - error: {:?}", error_response);
PaymentServiceAuthorizeResponse::from(error_response)
},
}
}
}
}
_ => {
match Box::pin(self.process_authorization_internal::<DefaultPCIHolder>(
payload.clone(),
metadata_payload.connector,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1500,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1500_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
tracing::info!("REGULAR: Authorization completed successfully without injector");
response
},
Err(error_response) => {
tracing::error!("REGULAR: Authorization failed without injector - error: {:?}", error_response);
PaymentServiceAuthorizeResponse::from(error_response)
},
}
}
}
}
_ => {
match Box::pin(self.process_authorization_internal::<DefaultPCIHolder>(
payload.clone(),
metadata_payload.connector,
metadata_payload.connector_auth_type.clone(),
metadata,
&metadata_payload,
&service_name,
&metadata_payload.request_id,
None,
))
.await
{
Ok(response) => response,
Err(error_response) => PaymentServiceAuthorizeResponse::from(error_response),
}
}
}
}
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1500,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1500_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
tracing::info!("REGULAR: Authorization completed successfully without injector");
response
},
Err(error_response) => {
tracing::error!("REGULAR: Authorization failed without injector - error: {:?}", error_response);
PaymentServiceAuthorizeResponse::from(error_response)
},
}
}
}
}
_ => {
match Box::pin(self.process_authorization_internal::<DefaultPCIHolder>(
payload.clone(),
metadata_payload.connector,
metadata_payload.connector_auth_type.clone(),
metadata,
&metadata_payload,
&service_name,
&metadata_payload.request_id,
None,
))
.await
{
Ok(response) => response,
Err(error_response) => PaymentServiceAuthorizeResponse::from(error_response),
}
}
}
}
_ => {
match Box::pin(self.process_authorization_internal::<DefaultPCIHolder>(
payload.clone(),
metadata_payload.connector,
metadata_payload.connector_auth_type.clone(),
metadata,
&metadata_payload,
&service_name,
&metadata_payload.request_id,
None,
))
.await
{
Ok(response) => response,
Err(error_response) => PaymentServiceAuthorizeResponse::from(error_response),
}
}
};
Ok(tonic::Response::new(authorize_response))
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1500,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1525_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
Err(error_response) => PaymentServiceAuthorizeResponse::from(error_response),
}
}
}
}
_ => {
match Box::pin(self.process_authorization_internal::<DefaultPCIHolder>(
payload.clone(),
metadata_payload.connector,
metadata_payload.connector_auth_type.clone(),
metadata,
&metadata_payload,
&service_name,
&metadata_payload.request_id,
None,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1525,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1525_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
Err(error_response) => PaymentServiceAuthorizeResponse::from(error_response),
}
}
}
}
_ => {
match Box::pin(self.process_authorization_internal::<DefaultPCIHolder>(
payload.clone(),
metadata_payload.connector,
metadata_payload.connector_auth_type.clone(),
metadata,
&metadata_payload,
&service_name,
&metadata_payload.request_id,
None,
))
.await
{
Ok(response) => response,
Err(error_response) => PaymentServiceAuthorizeResponse::from(error_response),
}
}
};
Ok(tonic::Response::new(authorize_response))
})
})
.await
}
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1525,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1525_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
Err(error_response) => PaymentServiceAuthorizeResponse::from(error_response),
}
}
}
}
_ => {
match Box::pin(self.process_authorization_internal::<DefaultPCIHolder>(
payload.clone(),
metadata_payload.connector,
metadata_payload.connector_auth_type.clone(),
metadata,
&metadata_payload,
&service_name,
&metadata_payload.request_id,
None,
))
.await
{
Ok(response) => response,
Err(error_response) => PaymentServiceAuthorizeResponse::from(error_response),
}
}
};
Ok(tonic::Response::new(authorize_response))
})
})
.await
}
#[tracing::instrument(
name = "payment_sync",
fields(
name = common_utils::consts::NAME,
service_name = common_utils::consts::PAYMENT_SERVICE_NAME,
service_method = FlowName::Psync.as_str(),
request_body = tracing::field::Empty,
response_body = tracing::field::Empty,
error_message = tracing::field::Empty,
merchant_id = tracing::field::Empty,
gateway = tracing::field::Empty,
request_id = tracing::field::Empty,
status_code = tracing::field::Empty,
message = "Golden Log Line (incoming)",
response_time = tracing::field::Empty,
tenant_id = tracing::field::Empty,
flow = FlowName::Psync.as_str(),
flow_specific_fields.status = tracing::field::Empty,
)
skip(self, request)
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1525,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1550_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
})
})
.await
}
#[tracing::instrument(
name = "payment_sync",
fields(
name = common_utils::consts::NAME,
service_name = common_utils::consts::PAYMENT_SERVICE_NAME,
service_method = FlowName::Psync.as_str(),
request_body = tracing::field::Empty,
response_body = tracing::field::Empty,
error_message = tracing::field::Empty,
merchant_id = tracing::field::Empty,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1550,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1550_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
})
})
.await
}
#[tracing::instrument(
name = "payment_sync",
fields(
name = common_utils::consts::NAME,
service_name = common_utils::consts::PAYMENT_SERVICE_NAME,
service_method = FlowName::Psync.as_str(),
request_body = tracing::field::Empty,
response_body = tracing::field::Empty,
error_message = tracing::field::Empty,
merchant_id = tracing::field::Empty,
gateway = tracing::field::Empty,
request_id = tracing::field::Empty,
status_code = tracing::field::Empty,
message = "Golden Log Line (incoming)",
response_time = tracing::field::Empty,
tenant_id = tracing::field::Empty,
flow = FlowName::Psync.as_str(),
flow_specific_fields.status = tracing::field::Empty,
)
skip(self, request)
)]
async fn get(
&self,
request: tonic::Request<PaymentServiceGetRequest>,
) -> Result<tonic::Response<PaymentServiceGetResponse>, tonic::Status> {
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1550,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1550_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
})
})
.await
}
#[tracing::instrument(
name = "payment_sync",
fields(
name = common_utils::consts::NAME,
service_name = common_utils::consts::PAYMENT_SERVICE_NAME,
service_method = FlowName::Psync.as_str(),
request_body = tracing::field::Empty,
response_body = tracing::field::Empty,
error_message = tracing::field::Empty,
merchant_id = tracing::field::Empty,
gateway = tracing::field::Empty,
request_id = tracing::field::Empty,
status_code = tracing::field::Empty,
message = "Golden Log Line (incoming)",
response_time = tracing::field::Empty,
tenant_id = tracing::field::Empty,
flow = FlowName::Psync.as_str(),
flow_specific_fields.status = tracing::field::Empty,
)
skip(self, request)
)]
async fn get(
&self,
request: tonic::Request<PaymentServiceGetRequest>,
) -> Result<tonic::Response<PaymentServiceGetResponse>, tonic::Status> {
info!("PAYMENT_SYNC_FLOW: initiated");
let service_name = request
.extensions()
.get::<String>()
.cloned()
.unwrap_or_else(|| "PaymentService".to_string());
grpc_logging_wrapper(
request,
&service_name,
self.config.clone(),
FlowName::Psync,
|request_data| {
let service_name = service_name.clone();
Box::pin(async move {
let metadata_payload = request_data.extracted_metadata;
let utils::MetadataPayload {
connector,
ref request_id,
ref lineage_ids,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1550,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1575_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
)]
async fn get(
&self,
request: tonic::Request<PaymentServiceGetRequest>,
) -> Result<tonic::Response<PaymentServiceGetResponse>, tonic::Status> {
info!("PAYMENT_SYNC_FLOW: initiated");
let service_name = request
.extensions()
.get::<String>()
.cloned()
.unwrap_or_else(|| "PaymentService".to_string());
grpc_logging_wrapper(
request,
&service_name,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1575,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1575_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
)]
async fn get(
&self,
request: tonic::Request<PaymentServiceGetRequest>,
) -> Result<tonic::Response<PaymentServiceGetResponse>, tonic::Status> {
info!("PAYMENT_SYNC_FLOW: initiated");
let service_name = request
.extensions()
.get::<String>()
.cloned()
.unwrap_or_else(|| "PaymentService".to_string());
grpc_logging_wrapper(
request,
&service_name,
self.config.clone(),
FlowName::Psync,
|request_data| {
let service_name = service_name.clone();
Box::pin(async move {
let metadata_payload = request_data.extracted_metadata;
let utils::MetadataPayload {
connector,
ref request_id,
ref lineage_ids,
ref reference_id,
..
} = metadata_payload;
let payload = request_data.payload;
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1575,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1575_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
)]
async fn get(
&self,
request: tonic::Request<PaymentServiceGetRequest>,
) -> Result<tonic::Response<PaymentServiceGetResponse>, tonic::Status> {
info!("PAYMENT_SYNC_FLOW: initiated");
let service_name = request
.extensions()
.get::<String>()
.cloned()
.unwrap_or_else(|| "PaymentService".to_string());
grpc_logging_wrapper(
request,
&service_name,
self.config.clone(),
FlowName::Psync,
|request_data| {
let service_name = service_name.clone();
Box::pin(async move {
let metadata_payload = request_data.extracted_metadata;
let utils::MetadataPayload {
connector,
ref request_id,
ref lineage_ids,
ref reference_id,
..
} = metadata_payload;
let payload = request_data.payload;
// Get connector data
let connector_data: ConnectorData<DefaultPCIHolder> =
ConnectorData::get_connector_by_name(&connector);
// Get connector integration
let connector_integration: BoxedConnectorIntegrationV2<
'_,
PSync,
PaymentFlowData,
PaymentsSyncData,
PaymentsResponseData,
> = connector_data.connector.get_connector_integration_v2();
// Create connector request data
let payments_sync_data =
PaymentsSyncData::foreign_try_from(payload.clone()).into_grpc_status()?;
// Create common request data
let payment_flow_data = PaymentFlowData::foreign_try_from((
payload.clone(),
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1575,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1600_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
ref reference_id,
..
} = metadata_payload;
let payload = request_data.payload;
// Get connector data
let connector_data: ConnectorData<DefaultPCIHolder> =
ConnectorData::get_connector_by_name(&connector);
// Get connector integration
let connector_integration: BoxedConnectorIntegrationV2<
'_,
PSync,
PaymentFlowData,
PaymentsSyncData,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1600,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1600_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
ref reference_id,
..
} = metadata_payload;
let payload = request_data.payload;
// Get connector data
let connector_data: ConnectorData<DefaultPCIHolder> =
ConnectorData::get_connector_by_name(&connector);
// Get connector integration
let connector_integration: BoxedConnectorIntegrationV2<
'_,
PSync,
PaymentFlowData,
PaymentsSyncData,
PaymentsResponseData,
> = connector_data.connector.get_connector_integration_v2();
// Create connector request data
let payments_sync_data =
PaymentsSyncData::foreign_try_from(payload.clone()).into_grpc_status()?;
// Create common request data
let payment_flow_data = PaymentFlowData::foreign_try_from((
payload.clone(),
self.config.connectors.clone(),
&request_data.masked_metadata,
))
.into_grpc_status()?;
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1600,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1600_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
ref reference_id,
..
} = metadata_payload;
let payload = request_data.payload;
// Get connector data
let connector_data: ConnectorData<DefaultPCIHolder> =
ConnectorData::get_connector_by_name(&connector);
// Get connector integration
let connector_integration: BoxedConnectorIntegrationV2<
'_,
PSync,
PaymentFlowData,
PaymentsSyncData,
PaymentsResponseData,
> = connector_data.connector.get_connector_integration_v2();
// Create connector request data
let payments_sync_data =
PaymentsSyncData::foreign_try_from(payload.clone()).into_grpc_status()?;
// Create common request data
let payment_flow_data = PaymentFlowData::foreign_try_from((
payload.clone(),
self.config.connectors.clone(),
&request_data.masked_metadata,
))
.into_grpc_status()?;
// Extract access token from Hyperswitch request
let cached_access_token = payload
.state
.as_ref()
.and_then(|state| state.access_token.as_ref())
.map(|access| (access.token.clone(), access.expires_in_seconds));
// Check if connector supports access tokens
let should_do_access_token = connector_data.connector.should_do_access_token();
// Conditional token generation - ONLY if not provided in request
let payment_flow_data = if should_do_access_token {
let access_token_data = match cached_access_token {
Some((token, expires_in)) => {
// If provided cached token - use it, don't generate new one
tracing::info!("Using cached access token from Hyperswitch");
Some(AccessTokenResponseData {
access_token: token,
token_type: None,
expires_in,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1600,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1625_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
self.config.connectors.clone(),
&request_data.masked_metadata,
))
.into_grpc_status()?;
// Extract access token from Hyperswitch request
let cached_access_token = payload
.state
.as_ref()
.and_then(|state| state.access_token.as_ref())
.map(|access| (access.token.clone(), access.expires_in_seconds));
// Check if connector supports access tokens
let should_do_access_token = connector_data.connector.should_do_access_token();
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1625,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1625_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
self.config.connectors.clone(),
&request_data.masked_metadata,
))
.into_grpc_status()?;
// Extract access token from Hyperswitch request
let cached_access_token = payload
.state
.as_ref()
.and_then(|state| state.access_token.as_ref())
.map(|access| (access.token.clone(), access.expires_in_seconds));
// Check if connector supports access tokens
let should_do_access_token = connector_data.connector.should_do_access_token();
// Conditional token generation - ONLY if not provided in request
let payment_flow_data = if should_do_access_token {
let access_token_data = match cached_access_token {
Some((token, expires_in)) => {
// If provided cached token - use it, don't generate new one
tracing::info!("Using cached access token from Hyperswitch");
Some(AccessTokenResponseData {
access_token: token,
token_type: None,
expires_in,
})
}
None => {
// No cached token - generate fresh one
tracing::info!(
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1625,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1625_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
self.config.connectors.clone(),
&request_data.masked_metadata,
))
.into_grpc_status()?;
// Extract access token from Hyperswitch request
let cached_access_token = payload
.state
.as_ref()
.and_then(|state| state.access_token.as_ref())
.map(|access| (access.token.clone(), access.expires_in_seconds));
// Check if connector supports access tokens
let should_do_access_token = connector_data.connector.should_do_access_token();
// Conditional token generation - ONLY if not provided in request
let payment_flow_data = if should_do_access_token {
let access_token_data = match cached_access_token {
Some((token, expires_in)) => {
// If provided cached token - use it, don't generate new one
tracing::info!("Using cached access token from Hyperswitch");
Some(AccessTokenResponseData {
access_token: token,
token_type: None,
expires_in,
})
}
None => {
// No cached token - generate fresh one
tracing::info!(
"No cached access token found, generating new token"
);
let event_params = EventParams {
_connector_name: &connector.to_string(),
_service_name: &service_name,
request_id,
lineage_ids,
reference_id,
shadow_mode: metadata_payload.shadow_mode,
};
let access_token_data = Box::pin(self.handle_access_token(
connector_data.clone(),
&payment_flow_data,
metadata_payload.connector_auth_type.clone(),
&metadata_payload.connector.to_string(),
&service_name,
event_params,
))
.await
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1625,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1650_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
})
}
None => {
// No cached token - generate fresh one
tracing::info!(
"No cached access token found, generating new token"
);
let event_params = EventParams {
_connector_name: &connector.to_string(),
_service_name: &service_name,
request_id,
lineage_ids,
reference_id,
shadow_mode: metadata_payload.shadow_mode,
};
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1650,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1650_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
})
}
None => {
// No cached token - generate fresh one
tracing::info!(
"No cached access token found, generating new token"
);
let event_params = EventParams {
_connector_name: &connector.to_string(),
_service_name: &service_name,
request_id,
lineage_ids,
reference_id,
shadow_mode: metadata_payload.shadow_mode,
};
let access_token_data = Box::pin(self.handle_access_token(
connector_data.clone(),
&payment_flow_data,
metadata_payload.connector_auth_type.clone(),
&metadata_payload.connector.to_string(),
&service_name,
event_params,
))
.await
.map_err(|e| {
let message = e.error_message.unwrap_or_else(|| {
"Access token creation failed".to_string()
});
tonic::Status::internal(message)
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1650,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1650_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
})
}
None => {
// No cached token - generate fresh one
tracing::info!(
"No cached access token found, generating new token"
);
let event_params = EventParams {
_connector_name: &connector.to_string(),
_service_name: &service_name,
request_id,
lineage_ids,
reference_id,
shadow_mode: metadata_payload.shadow_mode,
};
let access_token_data = Box::pin(self.handle_access_token(
connector_data.clone(),
&payment_flow_data,
metadata_payload.connector_auth_type.clone(),
&metadata_payload.connector.to_string(),
&service_name,
event_params,
))
.await
.map_err(|e| {
let message = e.error_message.unwrap_or_else(|| {
"Access token creation failed".to_string()
});
tonic::Status::internal(message)
})?;
tracing::info!(
"Access token created successfully with expiry: {:?}",
access_token_data.expires_in
);
Some(access_token_data)
}
};
// Store in flow data for connector API calls
payment_flow_data.set_access_token(access_token_data)
} else {
// Connector doesn't support access tokens
payment_flow_data
};
// Create router data
let router_data = RouterDataV2::<
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1650,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1675_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
.map_err(|e| {
let message = e.error_message.unwrap_or_else(|| {
"Access token creation failed".to_string()
});
tonic::Status::internal(message)
})?;
tracing::info!(
"Access token created successfully with expiry: {:?}",
access_token_data.expires_in
);
Some(access_token_data)
}
};
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1675,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1675_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
.map_err(|e| {
let message = e.error_message.unwrap_or_else(|| {
"Access token creation failed".to_string()
});
tonic::Status::internal(message)
})?;
tracing::info!(
"Access token created successfully with expiry: {:?}",
access_token_data.expires_in
);
Some(access_token_data)
}
};
// Store in flow data for connector API calls
payment_flow_data.set_access_token(access_token_data)
} else {
// Connector doesn't support access tokens
payment_flow_data
};
// Create router data
let router_data = RouterDataV2::<
PSync,
PaymentFlowData,
PaymentsSyncData,
PaymentsResponseData,
> {
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1675,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1675_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
.map_err(|e| {
let message = e.error_message.unwrap_or_else(|| {
"Access token creation failed".to_string()
});
tonic::Status::internal(message)
})?;
tracing::info!(
"Access token created successfully with expiry: {:?}",
access_token_data.expires_in
);
Some(access_token_data)
}
};
// Store in flow data for connector API calls
payment_flow_data.set_access_token(access_token_data)
} else {
// Connector doesn't support access tokens
payment_flow_data
};
// Create router data
let router_data = RouterDataV2::<
PSync,
PaymentFlowData,
PaymentsSyncData,
PaymentsResponseData,
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data,
connector_auth_type: metadata_payload.connector_auth_type.clone(),
request: payments_sync_data,
response: Err(ErrorResponse::default()),
};
// Execute connector processing
let flow_name = utils::flow_marker_to_flow_name::<PSync>();
let event_params = EventProcessingParams {
connector_name: &metadata_payload.connector.to_string(),
service_name: &service_name,
flow_name,
event_config: &self.config.events,
request_id: &metadata_payload.request_id,
lineage_ids: &metadata_payload.lineage_ids,
reference_id: &metadata_payload.reference_id,
shadow_mode: metadata_payload.shadow_mode,
};
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1675,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1700_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
PSync,
PaymentFlowData,
PaymentsSyncData,
PaymentsResponseData,
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data,
connector_auth_type: metadata_payload.connector_auth_type.clone(),
request: payments_sync_data,
response: Err(ErrorResponse::default()),
};
// Execute connector processing
let flow_name = utils::flow_marker_to_flow_name::<PSync>();
let event_params = EventProcessingParams {
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1700,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1700_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
PSync,
PaymentFlowData,
PaymentsSyncData,
PaymentsResponseData,
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data,
connector_auth_type: metadata_payload.connector_auth_type.clone(),
request: payments_sync_data,
response: Err(ErrorResponse::default()),
};
// Execute connector processing
let flow_name = utils::flow_marker_to_flow_name::<PSync>();
let event_params = EventProcessingParams {
connector_name: &metadata_payload.connector.to_string(),
service_name: &service_name,
flow_name,
event_config: &self.config.events,
request_id: &metadata_payload.request_id,
lineage_ids: &metadata_payload.lineage_ids,
reference_id: &metadata_payload.reference_id,
shadow_mode: metadata_payload.shadow_mode,
};
let consume_or_trigger_flow = match payload.handle_response {
Some(resource_object) => {
common_enums::CallConnectorAction::HandleResponse(resource_object)
}
None => common_enums::CallConnectorAction::Trigger,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1700,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1700_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
PSync,
PaymentFlowData,
PaymentsSyncData,
PaymentsResponseData,
> {
flow: std::marker::PhantomData,
resource_common_data: payment_flow_data,
connector_auth_type: metadata_payload.connector_auth_type.clone(),
request: payments_sync_data,
response: Err(ErrorResponse::default()),
};
// Execute connector processing
let flow_name = utils::flow_marker_to_flow_name::<PSync>();
let event_params = EventProcessingParams {
connector_name: &metadata_payload.connector.to_string(),
service_name: &service_name,
flow_name,
event_config: &self.config.events,
request_id: &metadata_payload.request_id,
lineage_ids: &metadata_payload.lineage_ids,
reference_id: &metadata_payload.reference_id,
shadow_mode: metadata_payload.shadow_mode,
};
let consume_or_trigger_flow = match payload.handle_response {
Some(resource_object) => {
common_enums::CallConnectorAction::HandleResponse(resource_object)
}
None => common_enums::CallConnectorAction::Trigger,
};
let response_result = Box::pin(
external_services::service::execute_connector_processing_step(
&self.config.proxy,
connector_integration,
router_data,
None,
event_params,
None,
consume_or_trigger_flow,
),
)
.await
.switch()
.into_grpc_status()?;
// Generate response
let final_response =
generate_payment_sync_response(response_result).into_grpc_status()?;
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1700,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1725_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
let consume_or_trigger_flow = match payload.handle_response {
Some(resource_object) => {
common_enums::CallConnectorAction::HandleResponse(resource_object)
}
None => common_enums::CallConnectorAction::Trigger,
};
let response_result = Box::pin(
external_services::service::execute_connector_processing_step(
&self.config.proxy,
connector_integration,
router_data,
None,
event_params,
None,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1725,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1725_30
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
let consume_or_trigger_flow = match payload.handle_response {
Some(resource_object) => {
common_enums::CallConnectorAction::HandleResponse(resource_object)
}
None => common_enums::CallConnectorAction::Trigger,
};
let response_result = Box::pin(
external_services::service::execute_connector_processing_step(
&self.config.proxy,
connector_integration,
router_data,
None,
event_params,
None,
consume_or_trigger_flow,
),
)
.await
.switch()
.into_grpc_status()?;
// Generate response
let final_response =
generate_payment_sync_response(response_result).into_grpc_status()?;
Ok(tonic::Response::new(final_response))
})
},
)
.await
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1725,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1725_50
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
let consume_or_trigger_flow = match payload.handle_response {
Some(resource_object) => {
common_enums::CallConnectorAction::HandleResponse(resource_object)
}
None => common_enums::CallConnectorAction::Trigger,
};
let response_result = Box::pin(
external_services::service::execute_connector_processing_step(
&self.config.proxy,
connector_integration,
router_data,
None,
event_params,
None,
consume_or_trigger_flow,
),
)
.await
.switch()
.into_grpc_status()?;
// Generate response
let final_response =
generate_payment_sync_response(response_result).into_grpc_status()?;
Ok(tonic::Response::new(final_response))
})
},
)
.await
}
#[tracing::instrument(
name = "payment_void",
fields(
name = common_utils::consts::NAME,
service_name = common_utils::consts::PAYMENT_SERVICE_NAME,
service_method = FlowName::Void.as_str(),
request_body = tracing::field::Empty,
response_body = tracing::field::Empty,
error_message = tracing::field::Empty,
merchant_id = tracing::field::Empty,
gateway = tracing::field::Empty,
request_id = tracing::field::Empty,
status_code = tracing::field::Empty,
message_ = "Golden Log Line (incoming)",
response_time = tracing::field::Empty,
tenant_id = tracing::field::Empty,
flow = FlowName::Void.as_str(),
flow_specific_fields.status = tracing::field::Empty,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1725,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
connector-service_snippet_8474653292087038763_1750_15
|
clm
|
snippet
|
// connector-service/backend/grpc-server/src/server/payments.rs
Ok(tonic::Response::new(final_response))
})
},
)
.await
}
#[tracing::instrument(
name = "payment_void",
fields(
name = common_utils::consts::NAME,
service_name = common_utils::consts::PAYMENT_SERVICE_NAME,
service_method = FlowName::Void.as_str(),
request_body = tracing::field::Empty,
response_body = tracing::field::Empty,
|
{
"chunk": null,
"crate": "grpc-server",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1750,
"struct_name": null,
"total_crates": null,
"trait_name": null
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.