id
stringlengths
20
153
type
stringclasses
1 value
granularity
stringclasses
14 values
content
stringlengths
16
84.3k
metadata
dict
connector-service_snippet_9109066662545807561_1500_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs connector_response_reference_id, status_code: item.http_code, }); Ok(Self { resource_common_data: PaymentFlowData { status, ..item.router_data.resource_common_data }, response, ..item.router_data }) } } fn extract_redirection_data( response: &WorldpayPaymentsResponse, ) -> Result<(Option<RedirectForm>, Option<String>), error_stack::Report<errors::ConnectorError>> { match &response.other_fields { Some(WorldpayPaymentResponseFields::ThreeDsChallenged(challenged)) => { let redirect_form = RedirectForm::Form { endpoint: challenged.challenge.url.to_string(), method: common_utils::request::Method::Post, form_fields: std::collections::HashMap::from([( "JWT".to_string(), challenged.challenge.jwt.clone().expose(), )]), }; Ok(( Some(redirect_form), Some(challenged.challenge.reference.clone()), )) } Some(WorldpayPaymentResponseFields::DDCResponse(ddc)) => { let link_data = ddc .actions .supply_ddc_data .href .split('/') .nth_back(1) .map(|s| s.to_string()); let redirect_form = RedirectForm::WorldpayDDCForm { endpoint: ddc.device_data_collection.url.clone(), method: common_utils::request::Method::Post, collection_id: link_data, form_fields: std::collections::HashMap::from([ ( FORM_FIELD_BIN.to_string(), ddc.device_data_collection.bin.clone().expose(), ),
{ "chunk": null, "crate": "connector-integration", "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_9109066662545807561_1525_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs challenged.challenge.jwt.clone().expose(), )]), }; Ok(( Some(redirect_form), Some(challenged.challenge.reference.clone()), )) } Some(WorldpayPaymentResponseFields::DDCResponse(ddc)) => { let link_data = ddc .actions .supply_ddc_data .href .split('/') .nth_back(1)
{ "chunk": null, "crate": "connector-integration", "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_9109066662545807561_1525_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs challenged.challenge.jwt.clone().expose(), )]), }; Ok(( Some(redirect_form), Some(challenged.challenge.reference.clone()), )) } Some(WorldpayPaymentResponseFields::DDCResponse(ddc)) => { let link_data = ddc .actions .supply_ddc_data .href .split('/') .nth_back(1) .map(|s| s.to_string()); let redirect_form = RedirectForm::WorldpayDDCForm { endpoint: ddc.device_data_collection.url.clone(), method: common_utils::request::Method::Post, collection_id: link_data, form_fields: std::collections::HashMap::from([ ( FORM_FIELD_BIN.to_string(), ddc.device_data_collection.bin.clone().expose(), ), ( FORM_FIELD_JWT.to_string(), ddc.device_data_collection.jwt.clone().expose(), ), ]),
{ "chunk": null, "crate": "connector-integration", "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_9109066662545807561_1525_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs challenged.challenge.jwt.clone().expose(), )]), }; Ok(( Some(redirect_form), Some(challenged.challenge.reference.clone()), )) } Some(WorldpayPaymentResponseFields::DDCResponse(ddc)) => { let link_data = ddc .actions .supply_ddc_data .href .split('/') .nth_back(1) .map(|s| s.to_string()); let redirect_form = RedirectForm::WorldpayDDCForm { endpoint: ddc.device_data_collection.url.clone(), method: common_utils::request::Method::Post, collection_id: link_data, form_fields: std::collections::HashMap::from([ ( FORM_FIELD_BIN.to_string(), ddc.device_data_collection.bin.clone().expose(), ), ( FORM_FIELD_JWT.to_string(), ddc.device_data_collection.jwt.clone().expose(), ), ]), }; Ok(( Some(redirect_form), Some(METADATA_DDC_REFERENCE.to_string()), )) } _ => Ok((None, None)), } } // Helper function to extract 3DS authentication metadata fn extract_three_ds_metadata(response: &WorldpayPaymentsResponse) -> Option<serde_json::Value> { match &response.other_fields { Some(WorldpayPaymentResponseFields::RefusedResponse(refused)) => { // Check for 3DS data in refused response if let Some(three_ds) = &refused.three_ds { let mut metadata = serde_json::Map::new(); if let Some(version) = &three_ds.version { metadata.insert( METADATA_3DS_VERSION.to_string(),
{ "chunk": null, "crate": "connector-integration", "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_9109066662545807561_1550_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs ( FORM_FIELD_JWT.to_string(), ddc.device_data_collection.jwt.clone().expose(), ), ]), }; Ok(( Some(redirect_form), Some(METADATA_DDC_REFERENCE.to_string()), )) } _ => Ok((None, None)), } }
{ "chunk": null, "crate": "connector-integration", "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_9109066662545807561_1550_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs ( FORM_FIELD_JWT.to_string(), ddc.device_data_collection.jwt.clone().expose(), ), ]), }; Ok(( Some(redirect_form), Some(METADATA_DDC_REFERENCE.to_string()), )) } _ => Ok((None, None)), } } // Helper function to extract 3DS authentication metadata fn extract_three_ds_metadata(response: &WorldpayPaymentsResponse) -> Option<serde_json::Value> { match &response.other_fields { Some(WorldpayPaymentResponseFields::RefusedResponse(refused)) => { // Check for 3DS data in refused response if let Some(three_ds) = &refused.three_ds { let mut metadata = serde_json::Map::new(); if let Some(version) = &three_ds.version { metadata.insert( METADATA_3DS_VERSION.to_string(), serde_json::Value::String(version.clone()), ); } if let Some(eci) = &three_ds.eci { metadata.insert(
{ "chunk": null, "crate": "connector-integration", "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_9109066662545807561_1550_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs ( FORM_FIELD_JWT.to_string(), ddc.device_data_collection.jwt.clone().expose(), ), ]), }; Ok(( Some(redirect_form), Some(METADATA_DDC_REFERENCE.to_string()), )) } _ => Ok((None, None)), } } // Helper function to extract 3DS authentication metadata fn extract_three_ds_metadata(response: &WorldpayPaymentsResponse) -> Option<serde_json::Value> { match &response.other_fields { Some(WorldpayPaymentResponseFields::RefusedResponse(refused)) => { // Check for 3DS data in refused response if let Some(three_ds) = &refused.three_ds { let mut metadata = serde_json::Map::new(); if let Some(version) = &three_ds.version { metadata.insert( METADATA_3DS_VERSION.to_string(), serde_json::Value::String(version.clone()), ); } if let Some(eci) = &three_ds.eci { metadata.insert( METADATA_ECI.to_string(), serde_json::Value::String(eci.clone()), ); } if let Some(applied) = &three_ds.applied { metadata.insert( METADATA_AUTH_APPLIED.to_string(), serde_json::Value::String(applied.clone()), ); } if !metadata.is_empty() { return Some(serde_json::Value::Object(metadata)); } } None } Some(WorldpayPaymentResponseFields::ThreeDsChallenged(challenged)) => { let mut metadata = serde_json::Map::new(); metadata.insert( METADATA_3DS_VERSION.to_string(),
{ "chunk": null, "crate": "connector-integration", "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_9109066662545807561_1575_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs serde_json::Value::String(version.clone()), ); } if let Some(eci) = &three_ds.eci { metadata.insert( METADATA_ECI.to_string(), serde_json::Value::String(eci.clone()), ); } if let Some(applied) = &three_ds.applied { metadata.insert( METADATA_AUTH_APPLIED.to_string(), serde_json::Value::String(applied.clone()), ); }
{ "chunk": null, "crate": "connector-integration", "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_9109066662545807561_1575_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs serde_json::Value::String(version.clone()), ); } if let Some(eci) = &three_ds.eci { metadata.insert( METADATA_ECI.to_string(), serde_json::Value::String(eci.clone()), ); } if let Some(applied) = &three_ds.applied { metadata.insert( METADATA_AUTH_APPLIED.to_string(), serde_json::Value::String(applied.clone()), ); } if !metadata.is_empty() { return Some(serde_json::Value::Object(metadata)); } } None } Some(WorldpayPaymentResponseFields::ThreeDsChallenged(challenged)) => { let mut metadata = serde_json::Map::new(); metadata.insert( METADATA_3DS_VERSION.to_string(), serde_json::Value::String(challenged.authentication.version.clone()), ); if let Some(eci) = &challenged.authentication.eci { metadata.insert( METADATA_ECI.to_string(),
{ "chunk": null, "crate": "connector-integration", "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_9109066662545807561_1575_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs serde_json::Value::String(version.clone()), ); } if let Some(eci) = &three_ds.eci { metadata.insert( METADATA_ECI.to_string(), serde_json::Value::String(eci.clone()), ); } if let Some(applied) = &three_ds.applied { metadata.insert( METADATA_AUTH_APPLIED.to_string(), serde_json::Value::String(applied.clone()), ); } if !metadata.is_empty() { return Some(serde_json::Value::Object(metadata)); } } None } Some(WorldpayPaymentResponseFields::ThreeDsChallenged(challenged)) => { let mut metadata = serde_json::Map::new(); metadata.insert( METADATA_3DS_VERSION.to_string(), serde_json::Value::String(challenged.authentication.version.clone()), ); if let Some(eci) = &challenged.authentication.eci { metadata.insert( METADATA_ECI.to_string(), serde_json::Value::String(eci.clone()), ); } // Extract linkData and stage for Authenticate response with 3DS challenge if let Some(link_data) = challenged .actions .complete_three_ds_challenge .href .split('/') .nth_back(1) { metadata.insert( "link_data".to_string(), serde_json::Value::String(link_data.to_string()), ); metadata.insert( "3ds_stage".to_string(), serde_json::Value::String("challenge".to_string()), ); }
{ "chunk": null, "crate": "connector-integration", "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_9109066662545807561_1600_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs serde_json::Value::String(challenged.authentication.version.clone()), ); if let Some(eci) = &challenged.authentication.eci { metadata.insert( METADATA_ECI.to_string(), serde_json::Value::String(eci.clone()), ); } // Extract linkData and stage for Authenticate response with 3DS challenge if let Some(link_data) = challenged .actions .complete_three_ds_challenge .href .split('/') .nth_back(1)
{ "chunk": null, "crate": "connector-integration", "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_9109066662545807561_1600_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs serde_json::Value::String(challenged.authentication.version.clone()), ); if let Some(eci) = &challenged.authentication.eci { metadata.insert( METADATA_ECI.to_string(), serde_json::Value::String(eci.clone()), ); } // Extract linkData and stage for Authenticate response with 3DS challenge if let Some(link_data) = challenged .actions .complete_three_ds_challenge .href .split('/') .nth_back(1) { metadata.insert( "link_data".to_string(), serde_json::Value::String(link_data.to_string()), ); metadata.insert( "3ds_stage".to_string(), serde_json::Value::String("challenge".to_string()), ); } Some(serde_json::Value::Object(metadata)) } Some(WorldpayPaymentResponseFields::DDCResponse(ddc)) => { // Extract linkData and stage for Authenticate response with DDC let mut metadata = serde_json::Map::new();
{ "chunk": null, "crate": "connector-integration", "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_9109066662545807561_1600_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs serde_json::Value::String(challenged.authentication.version.clone()), ); if let Some(eci) = &challenged.authentication.eci { metadata.insert( METADATA_ECI.to_string(), serde_json::Value::String(eci.clone()), ); } // Extract linkData and stage for Authenticate response with 3DS challenge if let Some(link_data) = challenged .actions .complete_three_ds_challenge .href .split('/') .nth_back(1) { metadata.insert( "link_data".to_string(), serde_json::Value::String(link_data.to_string()), ); metadata.insert( "3ds_stage".to_string(), serde_json::Value::String("challenge".to_string()), ); } Some(serde_json::Value::Object(metadata)) } Some(WorldpayPaymentResponseFields::DDCResponse(ddc)) => { // Extract linkData and stage for Authenticate response with DDC let mut metadata = serde_json::Map::new(); if let Some(link_data) = ddc.actions.supply_ddc_data.href.split('/').nth_back(1) { metadata.insert( "link_data".to_string(), serde_json::Value::String(link_data.to_string()), ); metadata.insert( "3ds_stage".to_string(), serde_json::Value::String("ddc".to_string()), ); } if !metadata.is_empty() { Some(serde_json::Value::Object(metadata)) } else { None } } _ => None, } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 49, "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_9109066662545807561_1625_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs Some(serde_json::Value::Object(metadata)) } Some(WorldpayPaymentResponseFields::DDCResponse(ddc)) => { // Extract linkData and stage for Authenticate response with DDC let mut metadata = serde_json::Map::new(); if let Some(link_data) = ddc.actions.supply_ddc_data.href.split('/').nth_back(1) { metadata.insert( "link_data".to_string(), serde_json::Value::String(link_data.to_string()), ); metadata.insert( "3ds_stage".to_string(), serde_json::Value::String("ddc".to_string()), ); }
{ "chunk": null, "crate": "connector-integration", "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_9109066662545807561_1625_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs Some(serde_json::Value::Object(metadata)) } Some(WorldpayPaymentResponseFields::DDCResponse(ddc)) => { // Extract linkData and stage for Authenticate response with DDC let mut metadata = serde_json::Map::new(); if let Some(link_data) = ddc.actions.supply_ddc_data.href.split('/').nth_back(1) { metadata.insert( "link_data".to_string(), serde_json::Value::String(link_data.to_string()), ); metadata.insert( "3ds_stage".to_string(), serde_json::Value::String("ddc".to_string()), ); } if !metadata.is_empty() { Some(serde_json::Value::Object(metadata)) } else { None } } _ => None, } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 24, "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_9109066662545807561_1625_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs Some(serde_json::Value::Object(metadata)) } Some(WorldpayPaymentResponseFields::DDCResponse(ddc)) => { // Extract linkData and stage for Authenticate response with DDC let mut metadata = serde_json::Map::new(); if let Some(link_data) = ddc.actions.supply_ddc_data.href.split('/').nth_back(1) { metadata.insert( "link_data".to_string(), serde_json::Value::String(link_data.to_string()), ); metadata.insert( "3ds_stage".to_string(), serde_json::Value::String("ddc".to_string()), ); } if !metadata.is_empty() { Some(serde_json::Value::Object(metadata)) } else { None } } _ => None, } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 24, "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_426009472564931438_0_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs use common_utils::types::MinorUnit; use hyperswitch_masking::Secret; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct WorldpayAuthorizeRequest< T: domain_types::payment_method_data::PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + serde::Serialize, > { pub transaction_reference: String,
{ "chunk": null, "crate": "connector-integration", "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": 0, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_0_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs use common_utils::types::MinorUnit; use hyperswitch_masking::Secret; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct WorldpayAuthorizeRequest< T: domain_types::payment_method_data::PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + serde::Serialize, > { pub transaction_reference: String, pub merchant: Merchant, pub instruction: Instruction<T>, #[serde(skip_serializing_if = "Option::is_none")] pub customer: Option<Customer>, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Merchant { pub entity: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub mcc: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub payment_facilitator: Option<PaymentFacilitator>, }
{ "chunk": null, "crate": "connector-integration", "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": 0, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_0_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs use common_utils::types::MinorUnit; use hyperswitch_masking::Secret; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct WorldpayAuthorizeRequest< T: domain_types::payment_method_data::PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + serde::Serialize, > { pub transaction_reference: String, pub merchant: Merchant, pub instruction: Instruction<T>, #[serde(skip_serializing_if = "Option::is_none")] pub customer: Option<Customer>, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Merchant { pub entity: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub mcc: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub payment_facilitator: Option<PaymentFacilitator>, } #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct Instruction< T: domain_types::payment_method_data::PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + serde::Serialize, > { #[serde(skip_serializing_if = "Option::is_none")] pub settlement: Option<AutoSettlement>, pub method: PaymentMethod, pub payment_instrument: PaymentInstrument<T>, pub narrative: InstructionNarrative, pub value: PaymentValue, #[serde(skip_serializing_if = "Option::is_none")] pub debt_repayment: Option<bool>, #[serde(rename = "threeDS", skip_serializing_if = "Option::is_none")]
{ "chunk": null, "crate": "connector-integration", "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": 0, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_25_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[serde(skip_serializing_if = "Option::is_none")] pub mcc: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub payment_facilitator: Option<PaymentFacilitator>, } #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct Instruction< T: domain_types::payment_method_data::PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + serde::Serialize,
{ "chunk": null, "crate": "connector-integration", "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": 25, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_25_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[serde(skip_serializing_if = "Option::is_none")] pub mcc: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub payment_facilitator: Option<PaymentFacilitator>, } #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct Instruction< T: domain_types::payment_method_data::PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + serde::Serialize, > { #[serde(skip_serializing_if = "Option::is_none")] pub settlement: Option<AutoSettlement>, pub method: PaymentMethod, pub payment_instrument: PaymentInstrument<T>, pub narrative: InstructionNarrative, pub value: PaymentValue, #[serde(skip_serializing_if = "Option::is_none")] pub debt_repayment: Option<bool>, #[serde(rename = "threeDS", skip_serializing_if = "Option::is_none")] pub three_ds: Option<ThreeDSRequest>, /// For setting up mandates pub token_creation: Option<TokenCreation>, /// For specifying CIT vs MIT pub customer_agreement: Option<CustomerAgreement>,
{ "chunk": null, "crate": "connector-integration", "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": 25, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_25_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[serde(skip_serializing_if = "Option::is_none")] pub mcc: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub payment_facilitator: Option<PaymentFacilitator>, } #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct Instruction< T: domain_types::payment_method_data::PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + serde::Serialize, > { #[serde(skip_serializing_if = "Option::is_none")] pub settlement: Option<AutoSettlement>, pub method: PaymentMethod, pub payment_instrument: PaymentInstrument<T>, pub narrative: InstructionNarrative, pub value: PaymentValue, #[serde(skip_serializing_if = "Option::is_none")] pub debt_repayment: Option<bool>, #[serde(rename = "threeDS", skip_serializing_if = "Option::is_none")] pub three_ds: Option<ThreeDSRequest>, /// For setting up mandates pub token_creation: Option<TokenCreation>, /// For specifying CIT vs MIT pub customer_agreement: Option<CustomerAgreement>, } #[derive(Clone, Debug, PartialEq, Serialize)] pub struct TokenCreation { #[serde(rename = "type")] pub token_type: TokenCreationType, } #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "lowercase")] pub enum TokenCreationType { Worldpay, } #[serde_with::skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct CustomerAgreement { #[serde(rename = "type")] pub agreement_type: CustomerAgreementType,
{ "chunk": null, "crate": "connector-integration", "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": 25, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_50_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs pub three_ds: Option<ThreeDSRequest>, /// For setting up mandates pub token_creation: Option<TokenCreation>, /// For specifying CIT vs MIT pub customer_agreement: Option<CustomerAgreement>, } #[derive(Clone, Debug, PartialEq, Serialize)] pub struct TokenCreation { #[serde(rename = "type")] pub token_type: TokenCreationType, } #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "lowercase")]
{ "chunk": null, "crate": "connector-integration", "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": 50, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_50_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs pub three_ds: Option<ThreeDSRequest>, /// For setting up mandates pub token_creation: Option<TokenCreation>, /// For specifying CIT vs MIT pub customer_agreement: Option<CustomerAgreement>, } #[derive(Clone, Debug, PartialEq, Serialize)] pub struct TokenCreation { #[serde(rename = "type")] pub token_type: TokenCreationType, } #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "lowercase")] pub enum TokenCreationType { Worldpay, } #[serde_with::skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct CustomerAgreement { #[serde(rename = "type")] pub agreement_type: CustomerAgreementType, pub stored_card_usage: Option<StoredCardUsageType>, #[serde(skip_serializing_if = "Option::is_none")] pub scheme_reference: Option<Secret<String>>, }
{ "chunk": null, "crate": "connector-integration", "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": 50, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_50_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs pub three_ds: Option<ThreeDSRequest>, /// For setting up mandates pub token_creation: Option<TokenCreation>, /// For specifying CIT vs MIT pub customer_agreement: Option<CustomerAgreement>, } #[derive(Clone, Debug, PartialEq, Serialize)] pub struct TokenCreation { #[serde(rename = "type")] pub token_type: TokenCreationType, } #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "lowercase")] pub enum TokenCreationType { Worldpay, } #[serde_with::skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct CustomerAgreement { #[serde(rename = "type")] pub agreement_type: CustomerAgreementType, pub stored_card_usage: Option<StoredCardUsageType>, #[serde(skip_serializing_if = "Option::is_none")] pub scheme_reference: Option<Secret<String>>, } #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "lowercase")] pub enum CustomerAgreementType { Subscription, Unscheduled, } #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "lowercase")] pub enum StoredCardUsageType { First, Subsequent, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum PaymentInstrument< T: domain_types::payment_method_data::PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync
{ "chunk": null, "crate": "connector-integration", "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": 50, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_75_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs pub stored_card_usage: Option<StoredCardUsageType>, #[serde(skip_serializing_if = "Option::is_none")] pub scheme_reference: Option<Secret<String>>, } #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "lowercase")] pub enum CustomerAgreementType { Subscription, Unscheduled, } #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "lowercase")] pub enum StoredCardUsageType {
{ "chunk": null, "crate": "connector-integration", "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": 75, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_75_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs pub stored_card_usage: Option<StoredCardUsageType>, #[serde(skip_serializing_if = "Option::is_none")] pub scheme_reference: Option<Secret<String>>, } #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "lowercase")] pub enum CustomerAgreementType { Subscription, Unscheduled, } #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "lowercase")] pub enum StoredCardUsageType { First, Subsequent, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum PaymentInstrument< T: domain_types::payment_method_data::PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + serde::Serialize, > { Card(CardPayment<T>),
{ "chunk": null, "crate": "connector-integration", "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": 75, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_75_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs pub stored_card_usage: Option<StoredCardUsageType>, #[serde(skip_serializing_if = "Option::is_none")] pub scheme_reference: Option<Secret<String>>, } #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "lowercase")] pub enum CustomerAgreementType { Subscription, Unscheduled, } #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(rename_all = "lowercase")] pub enum StoredCardUsageType { First, Subsequent, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum PaymentInstrument< T: domain_types::payment_method_data::PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + serde::Serialize, > { Card(CardPayment<T>), CardToken(CardToken), RawCardForNTI(RawCardDetails<domain_types::payment_method_data::DefaultPCIHolder>), Googlepay(WalletPayment), Applepay(WalletPayment), } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CardPayment< T: domain_types::payment_method_data::PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + serde::Serialize, > { #[serde(flatten)] pub raw_card_details: RawCardDetails<T>, pub cvc: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")]
{ "chunk": null, "crate": "connector-integration", "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": 75, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_100_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs + std::marker::Send + 'static + serde::Serialize, > { Card(CardPayment<T>), CardToken(CardToken), RawCardForNTI(RawCardDetails<domain_types::payment_method_data::DefaultPCIHolder>), Googlepay(WalletPayment), Applepay(WalletPayment), } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CardPayment< T: domain_types::payment_method_data::PaymentMethodDataTypes
{ "chunk": null, "crate": "connector-integration", "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": 100, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_100_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs + std::marker::Send + 'static + serde::Serialize, > { Card(CardPayment<T>), CardToken(CardToken), RawCardForNTI(RawCardDetails<domain_types::payment_method_data::DefaultPCIHolder>), Googlepay(WalletPayment), Applepay(WalletPayment), } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CardPayment< T: domain_types::payment_method_data::PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + serde::Serialize, > { #[serde(flatten)] pub raw_card_details: RawCardDetails<T>, pub cvc: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub card_holder_name: Option<Secret<String>>, #[serde(skip_serializing_if = "Option::is_none")] pub billing_address: Option<BillingAddress>, }
{ "chunk": null, "crate": "connector-integration", "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": 100, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_100_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs + std::marker::Send + 'static + serde::Serialize, > { Card(CardPayment<T>), CardToken(CardToken), RawCardForNTI(RawCardDetails<domain_types::payment_method_data::DefaultPCIHolder>), Googlepay(WalletPayment), Applepay(WalletPayment), } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CardPayment< T: domain_types::payment_method_data::PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + serde::Serialize, > { #[serde(flatten)] pub raw_card_details: RawCardDetails<T>, pub cvc: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub card_holder_name: Option<Secret<String>>, #[serde(skip_serializing_if = "Option::is_none")] pub billing_address: Option<BillingAddress>, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct RawCardDetails< T: domain_types::payment_method_data::PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + serde::Serialize, > { #[serde(rename = "type")] pub payment_type: PaymentType, pub card_number: domain_types::payment_method_data::RawCardNumber<T>, pub expiry_date: ExpiryDate, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CardToken { #[serde(rename = "type")]
{ "chunk": null, "crate": "connector-integration", "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": 100, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_125_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs pub card_holder_name: Option<Secret<String>>, #[serde(skip_serializing_if = "Option::is_none")] pub billing_address: Option<BillingAddress>, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct RawCardDetails< T: domain_types::payment_method_data::PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + serde::Serialize, > {
{ "chunk": null, "crate": "connector-integration", "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": 125, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_125_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs pub card_holder_name: Option<Secret<String>>, #[serde(skip_serializing_if = "Option::is_none")] pub billing_address: Option<BillingAddress>, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct RawCardDetails< T: domain_types::payment_method_data::PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + serde::Serialize, > { #[serde(rename = "type")] pub payment_type: PaymentType, pub card_number: domain_types::payment_method_data::RawCardNumber<T>, pub expiry_date: ExpiryDate, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CardToken { #[serde(rename = "type")] pub payment_type: PaymentType, pub href: String, #[serde(skip_serializing_if = "Option::is_none")] pub cvc: Option<Secret<String>>, }
{ "chunk": null, "crate": "connector-integration", "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": 125, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_125_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs pub card_holder_name: Option<Secret<String>>, #[serde(skip_serializing_if = "Option::is_none")] pub billing_address: Option<BillingAddress>, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct RawCardDetails< T: domain_types::payment_method_data::PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + serde::Serialize, > { #[serde(rename = "type")] pub payment_type: PaymentType, pub card_number: domain_types::payment_method_data::RawCardNumber<T>, pub expiry_date: ExpiryDate, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CardToken { #[serde(rename = "type")] pub payment_type: PaymentType, pub href: String, #[serde(skip_serializing_if = "Option::is_none")] pub cvc: Option<Secret<String>>, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WalletPayment { #[serde(rename = "type")] pub payment_type: PaymentType, pub wallet_token: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub billing_address: Option<BillingAddress>, } #[derive( Clone, Copy, Debug, Eq, Default, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, )] #[serde(rename_all = "lowercase")] pub enum PaymentType { #[default] Plain, Token, Encrypted,
{ "chunk": null, "crate": "connector-integration", "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": 125, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_150_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs pub payment_type: PaymentType, pub href: String, #[serde(skip_serializing_if = "Option::is_none")] pub cvc: Option<Secret<String>>, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WalletPayment { #[serde(rename = "type")] pub payment_type: PaymentType, pub wallet_token: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub billing_address: Option<BillingAddress>, }
{ "chunk": null, "crate": "connector-integration", "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": 150, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_150_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs pub payment_type: PaymentType, pub href: String, #[serde(skip_serializing_if = "Option::is_none")] pub cvc: Option<Secret<String>>, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WalletPayment { #[serde(rename = "type")] pub payment_type: PaymentType, pub wallet_token: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub billing_address: Option<BillingAddress>, } #[derive( Clone, Copy, Debug, Eq, Default, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, )] #[serde(rename_all = "lowercase")] pub enum PaymentType { #[default] Plain, Token, Encrypted, Checkout, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ExpiryDate {
{ "chunk": null, "crate": "connector-integration", "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": 150, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_150_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs pub payment_type: PaymentType, pub href: String, #[serde(skip_serializing_if = "Option::is_none")] pub cvc: Option<Secret<String>>, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WalletPayment { #[serde(rename = "type")] pub payment_type: PaymentType, pub wallet_token: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub billing_address: Option<BillingAddress>, } #[derive( Clone, Copy, Debug, Eq, Default, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, )] #[serde(rename_all = "lowercase")] pub enum PaymentType { #[default] Plain, Token, Encrypted, Checkout, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ExpiryDate { pub month: Secret<i8>, pub year: Secret<i32>, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct BillingAddress { pub address1: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub address2: Option<Secret<String>>, #[serde(skip_serializing_if = "Option::is_none")] pub address3: Option<Secret<String>>, pub city: String, #[serde(skip_serializing_if = "Option::is_none")] pub state: Option<Secret<String>>, pub postal_code: Secret<String>, pub country_code: common_enums::CountryAlpha2, } #[derive(
{ "chunk": null, "crate": "connector-integration", "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": 150, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_175_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs Checkout, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ExpiryDate { pub month: Secret<i8>, pub year: Secret<i32>, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct BillingAddress { pub address1: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub address2: Option<Secret<String>>,
{ "chunk": null, "crate": "connector-integration", "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": 175, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_175_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs Checkout, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ExpiryDate { pub month: Secret<i8>, pub year: Secret<i32>, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct BillingAddress { pub address1: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub address2: Option<Secret<String>>, #[serde(skip_serializing_if = "Option::is_none")] pub address3: Option<Secret<String>>, pub city: String, #[serde(skip_serializing_if = "Option::is_none")] pub state: Option<Secret<String>>, pub postal_code: Secret<String>, pub country_code: common_enums::CountryAlpha2, } #[derive( Clone, Copy, Default, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, )] #[serde(rename_all = "camelCase")] pub enum Channel { #[default]
{ "chunk": null, "crate": "connector-integration", "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": 175, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_175_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs Checkout, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ExpiryDate { pub month: Secret<i8>, pub year: Secret<i32>, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct BillingAddress { pub address1: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub address2: Option<Secret<String>>, #[serde(skip_serializing_if = "Option::is_none")] pub address3: Option<Secret<String>>, pub city: String, #[serde(skip_serializing_if = "Option::is_none")] pub state: Option<Secret<String>>, pub postal_code: Secret<String>, pub country_code: common_enums::CountryAlpha2, } #[derive( Clone, Copy, Default, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, )] #[serde(rename_all = "camelCase")] pub enum Channel { #[default] Ecom, Moto, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Customer { #[serde(skip_serializing_if = "Option::is_none")] pub risk_profile: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub authentication: Option<CustomerAuthentication>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub enum CustomerAuthentication { ThreeDS(ThreeDS), Token(NetworkToken), } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
{ "chunk": null, "crate": "connector-integration", "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": 175, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_200_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs Clone, Copy, Default, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, )] #[serde(rename_all = "camelCase")] pub enum Channel { #[default] Ecom, Moto, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Customer { #[serde(skip_serializing_if = "Option::is_none")] pub risk_profile: Option<String>, #[serde(skip_serializing_if = "Option::is_none")]
{ "chunk": null, "crate": "connector-integration", "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": 200, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_200_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs Clone, Copy, Default, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, )] #[serde(rename_all = "camelCase")] pub enum Channel { #[default] Ecom, Moto, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Customer { #[serde(skip_serializing_if = "Option::is_none")] pub risk_profile: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub authentication: Option<CustomerAuthentication>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub enum CustomerAuthentication { ThreeDS(ThreeDS), Token(NetworkToken), } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ThreeDS { #[serde(skip_serializing_if = "Option::is_none")] pub authentication_value: Option<Secret<String>>, pub version: ThreeDSVersion,
{ "chunk": null, "crate": "connector-integration", "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": 200, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_200_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs Clone, Copy, Default, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, )] #[serde(rename_all = "camelCase")] pub enum Channel { #[default] Ecom, Moto, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Customer { #[serde(skip_serializing_if = "Option::is_none")] pub risk_profile: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub authentication: Option<CustomerAuthentication>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub enum CustomerAuthentication { ThreeDS(ThreeDS), Token(NetworkToken), } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ThreeDS { #[serde(skip_serializing_if = "Option::is_none")] pub authentication_value: Option<Secret<String>>, pub version: ThreeDSVersion, #[serde(skip_serializing_if = "Option::is_none")] pub transaction_id: Option<String>, pub eci: String, #[serde(rename = "type")] pub auth_type: CustomerAuthType, } #[derive( Clone, Copy, Default, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, )] pub enum ThreeDSVersion { #[default] #[serde(rename = "1")] One, #[serde(rename = "2")] Two, } #[derive( Clone, Copy, Default, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize,
{ "chunk": null, "crate": "connector-integration", "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": 200, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_225_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[serde(rename_all = "camelCase")] pub struct ThreeDS { #[serde(skip_serializing_if = "Option::is_none")] pub authentication_value: Option<Secret<String>>, pub version: ThreeDSVersion, #[serde(skip_serializing_if = "Option::is_none")] pub transaction_id: Option<String>, pub eci: String, #[serde(rename = "type")] pub auth_type: CustomerAuthType, } #[derive( Clone, Copy, Default, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, )]
{ "chunk": null, "crate": "connector-integration", "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": 225, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_225_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[serde(rename_all = "camelCase")] pub struct ThreeDS { #[serde(skip_serializing_if = "Option::is_none")] pub authentication_value: Option<Secret<String>>, pub version: ThreeDSVersion, #[serde(skip_serializing_if = "Option::is_none")] pub transaction_id: Option<String>, pub eci: String, #[serde(rename = "type")] pub auth_type: CustomerAuthType, } #[derive( Clone, Copy, Default, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, )] pub enum ThreeDSVersion { #[default] #[serde(rename = "1")] One, #[serde(rename = "2")] Two, } #[derive( Clone, Copy, Default, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, )] pub enum CustomerAuthType { #[serde(rename = "3DS")] #[default] Variant3Ds,
{ "chunk": null, "crate": "connector-integration", "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": 225, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_225_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[serde(rename_all = "camelCase")] pub struct ThreeDS { #[serde(skip_serializing_if = "Option::is_none")] pub authentication_value: Option<Secret<String>>, pub version: ThreeDSVersion, #[serde(skip_serializing_if = "Option::is_none")] pub transaction_id: Option<String>, pub eci: String, #[serde(rename = "type")] pub auth_type: CustomerAuthType, } #[derive( Clone, Copy, Default, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, )] pub enum ThreeDSVersion { #[default] #[serde(rename = "1")] One, #[serde(rename = "2")] Two, } #[derive( Clone, Copy, Default, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, )] pub enum CustomerAuthType { #[serde(rename = "3DS")] #[default] Variant3Ds, #[serde(rename = "card/networkToken")] NetworkToken, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct NetworkToken { #[serde(rename = "type")] pub auth_type: CustomerAuthType, pub authentication_value: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub eci: Option<String>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AutoSettlement { pub auto: bool, }
{ "chunk": null, "crate": "connector-integration", "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": 225, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_250_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs )] pub enum CustomerAuthType { #[serde(rename = "3DS")] #[default] Variant3Ds, #[serde(rename = "card/networkToken")] NetworkToken, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct NetworkToken { #[serde(rename = "type")] pub auth_type: CustomerAuthType, pub authentication_value: Secret<String>,
{ "chunk": null, "crate": "connector-integration", "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": 250, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_250_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs )] pub enum CustomerAuthType { #[serde(rename = "3DS")] #[default] Variant3Ds, #[serde(rename = "card/networkToken")] NetworkToken, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct NetworkToken { #[serde(rename = "type")] pub auth_type: CustomerAuthType, pub authentication_value: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub eci: Option<String>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AutoSettlement { pub auto: bool, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ThreeDSRequest { #[serde(rename = "type")] pub three_ds_type: String,
{ "chunk": null, "crate": "connector-integration", "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": 250, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_250_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs )] pub enum CustomerAuthType { #[serde(rename = "3DS")] #[default] Variant3Ds, #[serde(rename = "card/networkToken")] NetworkToken, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct NetworkToken { #[serde(rename = "type")] pub auth_type: CustomerAuthType, pub authentication_value: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub eci: Option<String>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AutoSettlement { pub auto: bool, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ThreeDSRequest { #[serde(rename = "type")] pub three_ds_type: String, pub mode: String, pub device_data: ThreeDSRequestDeviceData, pub challenge: ThreeDSRequestChallenge, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ThreeDSRequestDeviceData { pub accept_header: String, pub user_agent_header: String, pub browser_language: Option<String>, pub browser_screen_width: Option<u32>, pub browser_screen_height: Option<u32>, pub browser_color_depth: Option<String>, pub time_zone: Option<String>, pub browser_java_enabled: Option<bool>, pub browser_javascript_enabled: Option<bool>, pub channel: Option<ThreeDSRequestChannel>, }
{ "chunk": null, "crate": "connector-integration", "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": 250, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_275_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ThreeDSRequest { #[serde(rename = "type")] pub three_ds_type: String, pub mode: String, pub device_data: ThreeDSRequestDeviceData, pub challenge: ThreeDSRequestChallenge, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ThreeDSRequestDeviceData { pub accept_header: String, pub user_agent_header: String,
{ "chunk": null, "crate": "connector-integration", "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": 275, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_275_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ThreeDSRequest { #[serde(rename = "type")] pub three_ds_type: String, pub mode: String, pub device_data: ThreeDSRequestDeviceData, pub challenge: ThreeDSRequestChallenge, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ThreeDSRequestDeviceData { pub accept_header: String, pub user_agent_header: String, pub browser_language: Option<String>, pub browser_screen_width: Option<u32>, pub browser_screen_height: Option<u32>, pub browser_color_depth: Option<String>, pub time_zone: Option<String>, pub browser_java_enabled: Option<bool>, pub browser_javascript_enabled: Option<bool>, pub channel: Option<ThreeDSRequestChannel>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] pub enum ThreeDSRequestChannel { Browser, Native,
{ "chunk": null, "crate": "connector-integration", "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": 275, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_275_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ThreeDSRequest { #[serde(rename = "type")] pub three_ds_type: String, pub mode: String, pub device_data: ThreeDSRequestDeviceData, pub challenge: ThreeDSRequestChallenge, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ThreeDSRequestDeviceData { pub accept_header: String, pub user_agent_header: String, pub browser_language: Option<String>, pub browser_screen_width: Option<u32>, pub browser_screen_height: Option<u32>, pub browser_color_depth: Option<String>, pub time_zone: Option<String>, pub browser_java_enabled: Option<bool>, pub browser_javascript_enabled: Option<bool>, pub channel: Option<ThreeDSRequestChannel>, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] pub enum ThreeDSRequestChannel { Browser, Native, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ThreeDSRequestChallenge { pub return_url: String, #[serde(skip_serializing_if = "Option::is_none")] pub preference: Option<String>, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] pub enum PaymentMethod { #[default] Card, ApplePay, GooglePay, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
{ "chunk": null, "crate": "connector-integration", "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": 275, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_300_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] pub enum ThreeDSRequestChannel { Browser, Native, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ThreeDSRequestChallenge { pub return_url: String, #[serde(skip_serializing_if = "Option::is_none")] pub preference: Option<String>, }
{ "chunk": null, "crate": "connector-integration", "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": 300, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_300_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] pub enum ThreeDSRequestChannel { Browser, Native, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ThreeDSRequestChallenge { pub return_url: String, #[serde(skip_serializing_if = "Option::is_none")] pub preference: Option<String>, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] pub enum PaymentMethod { #[default] Card, ApplePay, GooglePay, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct InstructionNarrative { pub line1: String, }
{ "chunk": null, "crate": "connector-integration", "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": 300, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_300_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] pub enum ThreeDSRequestChannel { Browser, Native, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ThreeDSRequestChallenge { pub return_url: String, #[serde(skip_serializing_if = "Option::is_none")] pub preference: Option<String>, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] pub enum PaymentMethod { #[default] Card, ApplePay, GooglePay, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct InstructionNarrative { pub line1: String, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct PaymentValue { pub amount: MinorUnit, pub currency: common_enums::Currency, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PaymentFacilitator { pub pf_id: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub iso_id: Option<Secret<String>>, pub sub_merchant: SubMerchant, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SubMerchant { pub city: String, pub name: Secret<String>,
{ "chunk": null, "crate": "connector-integration", "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": 300, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_325_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[serde(rename_all = "camelCase")] pub struct InstructionNarrative { pub line1: String, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct PaymentValue { pub amount: MinorUnit, pub currency: common_enums::Currency, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PaymentFacilitator { pub pf_id: Secret<String>,
{ "chunk": null, "crate": "connector-integration", "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": 325, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_325_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[serde(rename_all = "camelCase")] pub struct InstructionNarrative { pub line1: String, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct PaymentValue { pub amount: MinorUnit, pub currency: common_enums::Currency, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PaymentFacilitator { pub pf_id: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub iso_id: Option<Secret<String>>, pub sub_merchant: SubMerchant, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SubMerchant { pub city: String, pub name: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub state: Option<String>, pub postal_code: Secret<String>, pub merchant_id: Secret<String>, pub country_code: String,
{ "chunk": null, "crate": "connector-integration", "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": 325, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_325_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[serde(rename_all = "camelCase")] pub struct InstructionNarrative { pub line1: String, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct PaymentValue { pub amount: MinorUnit, pub currency: common_enums::Currency, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PaymentFacilitator { pub pf_id: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub iso_id: Option<Secret<String>>, pub sub_merchant: SubMerchant, } #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SubMerchant { pub city: String, pub name: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub state: Option<String>, pub postal_code: Secret<String>, pub merchant_id: Secret<String>, pub country_code: String, pub street: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub tax_id: Option<Secret<String>>, } #[derive(Default, Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct WorldpayPartialRequest { #[serde(skip_serializing_if = "Option::is_none")] pub value: Option<PaymentValue>, #[serde(skip_serializing_if = "Option::is_none")] pub reference: Option<String>, } // Type aliases to avoid duplicate template structs in macro generation pub type WorldpayCaptureRequest = WorldpayPartialRequest; pub type WorldpayRefundRequest = WorldpayPartialRequest; pub(super) const THREE_DS_MODE: &str = "always"; pub(super) const THREE_DS_TYPE: &str = "integrated";
{ "chunk": null, "crate": "connector-integration", "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": 325, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_350_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[serde(skip_serializing_if = "Option::is_none")] pub state: Option<String>, pub postal_code: Secret<String>, pub merchant_id: Secret<String>, pub country_code: String, pub street: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub tax_id: Option<Secret<String>>, } #[derive(Default, Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct WorldpayPartialRequest { #[serde(skip_serializing_if = "Option::is_none")] pub value: Option<PaymentValue>,
{ "chunk": null, "crate": "connector-integration", "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": 350, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_350_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[serde(skip_serializing_if = "Option::is_none")] pub state: Option<String>, pub postal_code: Secret<String>, pub merchant_id: Secret<String>, pub country_code: String, pub street: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub tax_id: Option<Secret<String>>, } #[derive(Default, Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct WorldpayPartialRequest { #[serde(skip_serializing_if = "Option::is_none")] pub value: Option<PaymentValue>, #[serde(skip_serializing_if = "Option::is_none")] pub reference: Option<String>, } // Type aliases to avoid duplicate template structs in macro generation pub type WorldpayCaptureRequest = WorldpayPartialRequest; pub type WorldpayRefundRequest = WorldpayPartialRequest; pub(super) const THREE_DS_MODE: &str = "always"; pub(super) const THREE_DS_TYPE: &str = "integrated"; pub(super) const THREE_DS_CHALLENGE_PREFERENCE: &str = "challengeMandated"; #[derive(Clone, Debug, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WorldpayAuthenticateRequest {
{ "chunk": null, "crate": "connector-integration", "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": 350, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_350_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs #[serde(skip_serializing_if = "Option::is_none")] pub state: Option<String>, pub postal_code: Secret<String>, pub merchant_id: Secret<String>, pub country_code: String, pub street: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub tax_id: Option<Secret<String>>, } #[derive(Default, Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct WorldpayPartialRequest { #[serde(skip_serializing_if = "Option::is_none")] pub value: Option<PaymentValue>, #[serde(skip_serializing_if = "Option::is_none")] pub reference: Option<String>, } // Type aliases to avoid duplicate template structs in macro generation pub type WorldpayCaptureRequest = WorldpayPartialRequest; pub type WorldpayRefundRequest = WorldpayPartialRequest; pub(super) const THREE_DS_MODE: &str = "always"; pub(super) const THREE_DS_TYPE: &str = "integrated"; pub(super) const THREE_DS_CHALLENGE_PREFERENCE: &str = "challengeMandated"; #[derive(Clone, Debug, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WorldpayAuthenticateRequest { #[serde(skip_serializing_if = "Option::is_none")] pub collection_reference: Option<String>, } // Type aliases to avoid duplicate template structs in macro generation pub type WorldpayPreAuthenticateRequest = WorldpayAuthenticateRequest; pub type WorldpayPostAuthenticateRequest = WorldpayAuthenticateRequest; // RepeatPayment uses the same request structure as Authorize (MIT vs CIT) pub type WorldpayRepeatPaymentRequest<T> = WorldpayAuthorizeRequest<T>;
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 40, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 350, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_375_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs pub(super) const THREE_DS_CHALLENGE_PREFERENCE: &str = "challengeMandated"; #[derive(Clone, Debug, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WorldpayAuthenticateRequest { #[serde(skip_serializing_if = "Option::is_none")] pub collection_reference: Option<String>, } // Type aliases to avoid duplicate template structs in macro generation pub type WorldpayPreAuthenticateRequest = WorldpayAuthenticateRequest; pub type WorldpayPostAuthenticateRequest = WorldpayAuthenticateRequest; // RepeatPayment uses the same request structure as Authorize (MIT vs CIT) pub type WorldpayRepeatPaymentRequest<T> = WorldpayAuthorizeRequest<T>;
{ "chunk": null, "crate": "connector-integration", "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": 375, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_375_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs pub(super) const THREE_DS_CHALLENGE_PREFERENCE: &str = "challengeMandated"; #[derive(Clone, Debug, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WorldpayAuthenticateRequest { #[serde(skip_serializing_if = "Option::is_none")] pub collection_reference: Option<String>, } // Type aliases to avoid duplicate template structs in macro generation pub type WorldpayPreAuthenticateRequest = WorldpayAuthenticateRequest; pub type WorldpayPostAuthenticateRequest = WorldpayAuthenticateRequest; // RepeatPayment uses the same request structure as Authorize (MIT vs CIT) pub type WorldpayRepeatPaymentRequest<T> = WorldpayAuthorizeRequest<T>;
{ "chunk": null, "crate": "connector-integration", "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": 375, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_426009472564931438_375_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/worldpay/requests.rs pub(super) const THREE_DS_CHALLENGE_PREFERENCE: &str = "challengeMandated"; #[derive(Clone, Debug, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WorldpayAuthenticateRequest { #[serde(skip_serializing_if = "Option::is_none")] pub collection_reference: Option<String>, } // Type aliases to avoid duplicate template structs in macro generation pub type WorldpayPreAuthenticateRequest = WorldpayAuthenticateRequest; pub type WorldpayPostAuthenticateRequest = WorldpayAuthenticateRequest; // RepeatPayment uses the same request structure as Authorize (MIT vs CIT) pub type WorldpayRepeatPaymentRequest<T> = WorldpayAuthorizeRequest<T>;
{ "chunk": null, "crate": "connector-integration", "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": 375, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_0_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs use common_enums::{self, AttemptStatus, Currency}; use common_utils::{pii::IpAddress, Email}; use domain_types::{ connector_flow::{Authorize, PSync}, connector_types::{ PaymentFlowData, PaymentsAuthorizeData, PaymentsResponseData, PaymentsSyncData, ResponseId, }, errors::ConnectorError, payment_method_data::{PaymentMethodData, PaymentMethodDataTypes, UpiData}, router_data::{ConnectorAuthType, ErrorResponse}, router_data_v2::RouterDataV2, router_request_types::AuthoriseIntegrityObject, router_response_types::RedirectForm, }; use error_stack::{report, ResultExt};
{ "chunk": null, "crate": "connector-integration", "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": 0, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_0_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs use common_enums::{self, AttemptStatus, Currency}; use common_utils::{pii::IpAddress, Email}; use domain_types::{ connector_flow::{Authorize, PSync}, connector_types::{ PaymentFlowData, PaymentsAuthorizeData, PaymentsResponseData, PaymentsSyncData, ResponseId, }, errors::ConnectorError, payment_method_data::{PaymentMethodData, PaymentMethodDataTypes, UpiData}, router_data::{ConnectorAuthType, ErrorResponse}, router_data_v2::RouterDataV2, router_request_types::AuthoriseIntegrityObject, router_response_types::RedirectForm, }; use error_stack::{report, ResultExt}; use hyperswitch_masking::{ExposeInterface, PeekInterface, Secret}; use serde::{Deserialize, Serialize}; use crate::types::ResponseRouterData; pub mod constants { // Payu API versions pub const API_VERSION: &str = "2.0"; // Payu device info pub const DEVICE_INFO: &str = "web"; // Payu UPI specific constants pub const PRODUCT_INFO: &str = "Payment"; // Default product info pub const UPI_PG: &str = "UPI"; // UPI payment gateway
{ "chunk": null, "crate": "connector-integration", "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": 0, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_0_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs use common_enums::{self, AttemptStatus, Currency}; use common_utils::{pii::IpAddress, Email}; use domain_types::{ connector_flow::{Authorize, PSync}, connector_types::{ PaymentFlowData, PaymentsAuthorizeData, PaymentsResponseData, PaymentsSyncData, ResponseId, }, errors::ConnectorError, payment_method_data::{PaymentMethodData, PaymentMethodDataTypes, UpiData}, router_data::{ConnectorAuthType, ErrorResponse}, router_data_v2::RouterDataV2, router_request_types::AuthoriseIntegrityObject, router_response_types::RedirectForm, }; use error_stack::{report, ResultExt}; use hyperswitch_masking::{ExposeInterface, PeekInterface, Secret}; use serde::{Deserialize, Serialize}; use crate::types::ResponseRouterData; pub mod constants { // Payu API versions pub const API_VERSION: &str = "2.0"; // Payu device info pub const DEVICE_INFO: &str = "web"; // Payu UPI specific constants pub const PRODUCT_INFO: &str = "Payment"; // Default product info pub const UPI_PG: &str = "UPI"; // UPI payment gateway pub const UPI_COLLECT_BANKCODE: &str = "UPI"; // UPI Collect bank code pub const UPI_INTENT_BANKCODE: &str = "INTENT"; // UPI Intent bank code pub const UPI_S2S_FLOW: &str = "2"; // S2S flow type for UPI // Payu PSync specific constants pub const COMMAND: &str = "verify_payment"; } // PayU Status enum to handle both integer and string status values #[derive(Debug, Serialize, Clone)] pub enum PayuStatusValue { IntStatus(i32), // 1 for UPI Intent success StringStatus(String), // "success" for UPI Collect success } // Custom deserializer for PayU status field that can be either int or string fn deserialize_payu_status<'de, D>(deserializer: D) -> Result<Option<PayuStatusValue>, D::Error> where D: serde::Deserializer<'de>, {
{ "chunk": null, "crate": "connector-integration", "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": 0, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_25_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs pub const DEVICE_INFO: &str = "web"; // Payu UPI specific constants pub const PRODUCT_INFO: &str = "Payment"; // Default product info pub const UPI_PG: &str = "UPI"; // UPI payment gateway pub const UPI_COLLECT_BANKCODE: &str = "UPI"; // UPI Collect bank code pub const UPI_INTENT_BANKCODE: &str = "INTENT"; // UPI Intent bank code pub const UPI_S2S_FLOW: &str = "2"; // S2S flow type for UPI // Payu PSync specific constants pub const COMMAND: &str = "verify_payment"; } // PayU Status enum to handle both integer and string status values #[derive(Debug, Serialize, Clone)]
{ "chunk": null, "crate": "connector-integration", "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": 25, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_25_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs pub const DEVICE_INFO: &str = "web"; // Payu UPI specific constants pub const PRODUCT_INFO: &str = "Payment"; // Default product info pub const UPI_PG: &str = "UPI"; // UPI payment gateway pub const UPI_COLLECT_BANKCODE: &str = "UPI"; // UPI Collect bank code pub const UPI_INTENT_BANKCODE: &str = "INTENT"; // UPI Intent bank code pub const UPI_S2S_FLOW: &str = "2"; // S2S flow type for UPI // Payu PSync specific constants pub const COMMAND: &str = "verify_payment"; } // PayU Status enum to handle both integer and string status values #[derive(Debug, Serialize, Clone)] pub enum PayuStatusValue { IntStatus(i32), // 1 for UPI Intent success StringStatus(String), // "success" for UPI Collect success } // Custom deserializer for PayU status field that can be either int or string fn deserialize_payu_status<'de, D>(deserializer: D) -> Result<Option<PayuStatusValue>, D::Error> where D: serde::Deserializer<'de>, { use serde_json::Value; let value: Option<Value> = Option::deserialize(deserializer)?; match value { Some(Value::Number(n)) => {
{ "chunk": null, "crate": "connector-integration", "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": 25, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_25_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs pub const DEVICE_INFO: &str = "web"; // Payu UPI specific constants pub const PRODUCT_INFO: &str = "Payment"; // Default product info pub const UPI_PG: &str = "UPI"; // UPI payment gateway pub const UPI_COLLECT_BANKCODE: &str = "UPI"; // UPI Collect bank code pub const UPI_INTENT_BANKCODE: &str = "INTENT"; // UPI Intent bank code pub const UPI_S2S_FLOW: &str = "2"; // S2S flow type for UPI // Payu PSync specific constants pub const COMMAND: &str = "verify_payment"; } // PayU Status enum to handle both integer and string status values #[derive(Debug, Serialize, Clone)] pub enum PayuStatusValue { IntStatus(i32), // 1 for UPI Intent success StringStatus(String), // "success" for UPI Collect success } // Custom deserializer for PayU status field that can be either int or string fn deserialize_payu_status<'de, D>(deserializer: D) -> Result<Option<PayuStatusValue>, D::Error> where D: serde::Deserializer<'de>, { use serde_json::Value; let value: Option<Value> = Option::deserialize(deserializer)?; match value { Some(Value::Number(n)) => { if let Some(i) = n.as_i64() { Ok(Some(PayuStatusValue::IntStatus(i as i32))) } else { Ok(None) } } Some(Value::String(s)) => Ok(Some(PayuStatusValue::StringStatus(s))), _ => Ok(None), } } // Authentication structure based on Payu analysis #[derive(Debug, Clone)] pub struct PayuAuthType { pub api_key: Secret<String>, pub api_secret: Secret<String>, // Merchant salt for signature } impl TryFrom<&ConnectorAuthType> for PayuAuthType { type Error = error_stack::Report<ConnectorError>;
{ "chunk": null, "crate": "connector-integration", "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": 25, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_50_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs use serde_json::Value; let value: Option<Value> = Option::deserialize(deserializer)?; match value { Some(Value::Number(n)) => { if let Some(i) = n.as_i64() { Ok(Some(PayuStatusValue::IntStatus(i as i32))) } else { Ok(None) } } Some(Value::String(s)) => Ok(Some(PayuStatusValue::StringStatus(s))), _ => Ok(None), } }
{ "chunk": null, "crate": "connector-integration", "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": 50, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_50_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs use serde_json::Value; let value: Option<Value> = Option::deserialize(deserializer)?; match value { Some(Value::Number(n)) => { if let Some(i) = n.as_i64() { Ok(Some(PayuStatusValue::IntStatus(i as i32))) } else { Ok(None) } } Some(Value::String(s)) => Ok(Some(PayuStatusValue::StringStatus(s))), _ => Ok(None), } } // Authentication structure based on Payu analysis #[derive(Debug, Clone)] pub struct PayuAuthType { pub api_key: Secret<String>, pub api_secret: Secret<String>, // Merchant salt for signature } impl TryFrom<&ConnectorAuthType> for PayuAuthType { type Error = error_stack::Report<ConnectorError>; fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> { match auth_type { ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self { api_key: api_key.to_owned(),
{ "chunk": null, "crate": "connector-integration", "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": 50, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_50_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs use serde_json::Value; let value: Option<Value> = Option::deserialize(deserializer)?; match value { Some(Value::Number(n)) => { if let Some(i) = n.as_i64() { Ok(Some(PayuStatusValue::IntStatus(i as i32))) } else { Ok(None) } } Some(Value::String(s)) => Ok(Some(PayuStatusValue::StringStatus(s))), _ => Ok(None), } } // Authentication structure based on Payu analysis #[derive(Debug, Clone)] pub struct PayuAuthType { pub api_key: Secret<String>, pub api_secret: Secret<String>, // Merchant salt for signature } impl TryFrom<&ConnectorAuthType> for PayuAuthType { type Error = error_stack::Report<ConnectorError>; fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> { match auth_type { ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self { api_key: api_key.to_owned(), api_secret: key1.to_owned(), // key1 is merchant salt }), _ => Err(ConnectorError::FailedToObtainAuthType.into()), } } } // Note: Integrity Framework implementation will be handled by the framework itself // since we can't implement foreign traits for foreign types (orphan rules) // Request structure based on Payu UPI analysis #[derive(Debug, Serialize)] pub struct PayuPaymentRequest { // Core payment fields pub key: String, // Merchant key pub txnid: String, // Transaction ID pub amount: common_utils::types::StringMajorUnit, // Amount in string major units pub currency: Currency, // Currency code pub productinfo: String, // Product description
{ "chunk": null, "crate": "connector-integration", "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": 50, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_75_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> { match auth_type { ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self { api_key: api_key.to_owned(), api_secret: key1.to_owned(), // key1 is merchant salt }), _ => Err(ConnectorError::FailedToObtainAuthType.into()), } } } // Note: Integrity Framework implementation will be handled by the framework itself // since we can't implement foreign traits for foreign types (orphan rules)
{ "chunk": null, "crate": "connector-integration", "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": 75, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_75_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> { match auth_type { ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self { api_key: api_key.to_owned(), api_secret: key1.to_owned(), // key1 is merchant salt }), _ => Err(ConnectorError::FailedToObtainAuthType.into()), } } } // Note: Integrity Framework implementation will be handled by the framework itself // since we can't implement foreign traits for foreign types (orphan rules) // Request structure based on Payu UPI analysis #[derive(Debug, Serialize)] pub struct PayuPaymentRequest { // Core payment fields pub key: String, // Merchant key pub txnid: String, // Transaction ID pub amount: common_utils::types::StringMajorUnit, // Amount in string major units pub currency: Currency, // Currency code pub productinfo: String, // Product description // Customer information pub firstname: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub lastname: Option<Secret<String>>, pub email: Email,
{ "chunk": null, "crate": "connector-integration", "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": 75, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_75_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> { match auth_type { ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self { api_key: api_key.to_owned(), api_secret: key1.to_owned(), // key1 is merchant salt }), _ => Err(ConnectorError::FailedToObtainAuthType.into()), } } } // Note: Integrity Framework implementation will be handled by the framework itself // since we can't implement foreign traits for foreign types (orphan rules) // Request structure based on Payu UPI analysis #[derive(Debug, Serialize)] pub struct PayuPaymentRequest { // Core payment fields pub key: String, // Merchant key pub txnid: String, // Transaction ID pub amount: common_utils::types::StringMajorUnit, // Amount in string major units pub currency: Currency, // Currency code pub productinfo: String, // Product description // Customer information pub firstname: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub lastname: Option<Secret<String>>, pub email: Email, pub phone: Secret<String>, // URLs pub surl: String, // Success URL pub furl: String, // Failure URL // Payment method specific #[serde(skip_serializing_if = "Option::is_none")] pub pg: Option<String>, // Payment gateway code (UPI) #[serde(skip_serializing_if = "Option::is_none")] pub bankcode: Option<String>, // Bank code (TEZ, INTENT, TEZOMNI) #[serde(skip_serializing_if = "Option::is_none")] pub vpa: Option<Secret<String>>, // UPI VPA (for collect) // UPI specific fields pub txn_s2s_flow: String, // S2S flow type ("2" for UPI) pub s2s_client_ip: Secret<String, IpAddress>, // Client IP pub s2s_device_info: String, // Device info #[serde(skip_serializing_if = "Option::is_none")] pub api_version: Option<String>, // API version ("2.0")
{ "chunk": null, "crate": "connector-integration", "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": 75, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_100_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs // Customer information pub firstname: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub lastname: Option<Secret<String>>, pub email: Email, pub phone: Secret<String>, // URLs pub surl: String, // Success URL pub furl: String, // Failure URL // Payment method specific #[serde(skip_serializing_if = "Option::is_none")] pub pg: Option<String>, // Payment gateway code (UPI) #[serde(skip_serializing_if = "Option::is_none")]
{ "chunk": null, "crate": "connector-integration", "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": 100, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_100_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs // Customer information pub firstname: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub lastname: Option<Secret<String>>, pub email: Email, pub phone: Secret<String>, // URLs pub surl: String, // Success URL pub furl: String, // Failure URL // Payment method specific #[serde(skip_serializing_if = "Option::is_none")] pub pg: Option<String>, // Payment gateway code (UPI) #[serde(skip_serializing_if = "Option::is_none")] pub bankcode: Option<String>, // Bank code (TEZ, INTENT, TEZOMNI) #[serde(skip_serializing_if = "Option::is_none")] pub vpa: Option<Secret<String>>, // UPI VPA (for collect) // UPI specific fields pub txn_s2s_flow: String, // S2S flow type ("2" for UPI) pub s2s_client_ip: Secret<String, IpAddress>, // Client IP pub s2s_device_info: String, // Device info #[serde(skip_serializing_if = "Option::is_none")] pub api_version: Option<String>, // API version ("2.0") // Security pub hash: String, // SHA-512 signature // User defined fields (10 fields as per PayU spec)
{ "chunk": null, "crate": "connector-integration", "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": 100, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_100_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs // Customer information pub firstname: Secret<String>, #[serde(skip_serializing_if = "Option::is_none")] pub lastname: Option<Secret<String>>, pub email: Email, pub phone: Secret<String>, // URLs pub surl: String, // Success URL pub furl: String, // Failure URL // Payment method specific #[serde(skip_serializing_if = "Option::is_none")] pub pg: Option<String>, // Payment gateway code (UPI) #[serde(skip_serializing_if = "Option::is_none")] pub bankcode: Option<String>, // Bank code (TEZ, INTENT, TEZOMNI) #[serde(skip_serializing_if = "Option::is_none")] pub vpa: Option<Secret<String>>, // UPI VPA (for collect) // UPI specific fields pub txn_s2s_flow: String, // S2S flow type ("2" for UPI) pub s2s_client_ip: Secret<String, IpAddress>, // Client IP pub s2s_device_info: String, // Device info #[serde(skip_serializing_if = "Option::is_none")] pub api_version: Option<String>, // API version ("2.0") // Security pub hash: String, // SHA-512 signature // User defined fields (10 fields as per PayU spec) #[serde(skip_serializing_if = "Option::is_none")] pub udf1: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf2: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf3: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf4: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf5: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf6: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf7: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf8: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf9: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf10: Option<String>,
{ "chunk": null, "crate": "connector-integration", "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": 100, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_125_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs // Security pub hash: String, // SHA-512 signature // User defined fields (10 fields as per PayU spec) #[serde(skip_serializing_if = "Option::is_none")] pub udf1: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf2: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf3: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf4: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf5: Option<String>,
{ "chunk": null, "crate": "connector-integration", "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": 125, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_125_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs // Security pub hash: String, // SHA-512 signature // User defined fields (10 fields as per PayU spec) #[serde(skip_serializing_if = "Option::is_none")] pub udf1: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf2: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf3: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf4: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf5: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf6: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf7: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf8: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf9: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf10: Option<String>, // Optional PayU fields for UPI #[serde(skip_serializing_if = "Option::is_none")] pub offer_key: Option<String>, // Offer identifier #[serde(skip_serializing_if = "Option::is_none")]
{ "chunk": null, "crate": "connector-integration", "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": 125, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_125_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs // Security pub hash: String, // SHA-512 signature // User defined fields (10 fields as per PayU spec) #[serde(skip_serializing_if = "Option::is_none")] pub udf1: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf2: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf3: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf4: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf5: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf6: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf7: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf8: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf9: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub udf10: Option<String>, // Optional PayU fields for UPI #[serde(skip_serializing_if = "Option::is_none")] pub offer_key: Option<String>, // Offer identifier #[serde(skip_serializing_if = "Option::is_none")] pub si: Option<i32>, // Standing instruction flag #[serde(skip_serializing_if = "Option::is_none")] pub si_details: Option<String>, // SI details JSON #[serde(skip_serializing_if = "Option::is_none")] pub beneficiarydetail: Option<String>, // TPV beneficiary details #[serde(skip_serializing_if = "Option::is_none")] pub user_token: Option<String>, // User token for repeat transactions #[serde(skip_serializing_if = "Option::is_none")] pub offer_auto_apply: Option<i32>, // Auto apply offer flag (0 or 1) #[serde(skip_serializing_if = "Option::is_none")] pub additional_charges: Option<String>, // Surcharge/fee amount #[serde(skip_serializing_if = "Option::is_none")] pub additional_gst_charges: Option<String>, // GST charges #[serde(skip_serializing_if = "Option::is_none")] pub upi_app_name: Option<String>, // UPI app name for intent flows } // Response structure based on actual PayU API response #[derive(Debug, Deserialize, Serialize)] pub struct PayuPaymentResponse {
{ "chunk": null, "crate": "connector-integration", "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": 125, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_150_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs // Optional PayU fields for UPI #[serde(skip_serializing_if = "Option::is_none")] pub offer_key: Option<String>, // Offer identifier #[serde(skip_serializing_if = "Option::is_none")] pub si: Option<i32>, // Standing instruction flag #[serde(skip_serializing_if = "Option::is_none")] pub si_details: Option<String>, // SI details JSON #[serde(skip_serializing_if = "Option::is_none")] pub beneficiarydetail: Option<String>, // TPV beneficiary details #[serde(skip_serializing_if = "Option::is_none")] pub user_token: Option<String>, // User token for repeat transactions #[serde(skip_serializing_if = "Option::is_none")] pub offer_auto_apply: Option<i32>, // Auto apply offer flag (0 or 1) #[serde(skip_serializing_if = "Option::is_none")]
{ "chunk": null, "crate": "connector-integration", "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": 150, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_150_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs // Optional PayU fields for UPI #[serde(skip_serializing_if = "Option::is_none")] pub offer_key: Option<String>, // Offer identifier #[serde(skip_serializing_if = "Option::is_none")] pub si: Option<i32>, // Standing instruction flag #[serde(skip_serializing_if = "Option::is_none")] pub si_details: Option<String>, // SI details JSON #[serde(skip_serializing_if = "Option::is_none")] pub beneficiarydetail: Option<String>, // TPV beneficiary details #[serde(skip_serializing_if = "Option::is_none")] pub user_token: Option<String>, // User token for repeat transactions #[serde(skip_serializing_if = "Option::is_none")] pub offer_auto_apply: Option<i32>, // Auto apply offer flag (0 or 1) #[serde(skip_serializing_if = "Option::is_none")] pub additional_charges: Option<String>, // Surcharge/fee amount #[serde(skip_serializing_if = "Option::is_none")] pub additional_gst_charges: Option<String>, // GST charges #[serde(skip_serializing_if = "Option::is_none")] pub upi_app_name: Option<String>, // UPI app name for intent flows } // Response structure based on actual PayU API response #[derive(Debug, Deserialize, Serialize)] pub struct PayuPaymentResponse { // Success response fields - PayU can return status as either int or string #[serde(deserialize_with = "deserialize_payu_status")] pub status: Option<PayuStatusValue>, // Status can be 1 (int) or "success" (string) pub token: Option<String>, // PayU token #[serde(alias = "referenceId")]
{ "chunk": null, "crate": "connector-integration", "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": 150, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_150_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs // Optional PayU fields for UPI #[serde(skip_serializing_if = "Option::is_none")] pub offer_key: Option<String>, // Offer identifier #[serde(skip_serializing_if = "Option::is_none")] pub si: Option<i32>, // Standing instruction flag #[serde(skip_serializing_if = "Option::is_none")] pub si_details: Option<String>, // SI details JSON #[serde(skip_serializing_if = "Option::is_none")] pub beneficiarydetail: Option<String>, // TPV beneficiary details #[serde(skip_serializing_if = "Option::is_none")] pub user_token: Option<String>, // User token for repeat transactions #[serde(skip_serializing_if = "Option::is_none")] pub offer_auto_apply: Option<i32>, // Auto apply offer flag (0 or 1) #[serde(skip_serializing_if = "Option::is_none")] pub additional_charges: Option<String>, // Surcharge/fee amount #[serde(skip_serializing_if = "Option::is_none")] pub additional_gst_charges: Option<String>, // GST charges #[serde(skip_serializing_if = "Option::is_none")] pub upi_app_name: Option<String>, // UPI app name for intent flows } // Response structure based on actual PayU API response #[derive(Debug, Deserialize, Serialize)] pub struct PayuPaymentResponse { // Success response fields - PayU can return status as either int or string #[serde(deserialize_with = "deserialize_payu_status")] pub status: Option<PayuStatusValue>, // Status can be 1 (int) or "success" (string) pub token: Option<String>, // PayU token #[serde(alias = "referenceId")] pub reference_id: Option<String>, // PayU reference ID #[serde(alias = "returnUrl")] pub return_url: Option<String>, // Return URL #[serde(alias = "merchantName")] pub merchant_name: Option<String>, // Merchant display name #[serde(alias = "merchantVpa")] pub merchant_vpa: Option<Secret<String>>, // Merchant UPI VPA pub amount: Option<String>, // Transaction amount #[serde(alias = "txnId")] pub txn_id: Option<String>, // Transaction ID #[serde(alias = "intentURIData")] pub intent_uri_data: Option<String>, // UPI intent URI data // UPI-specific fields pub apps: Option<Vec<PayuUpiApp>>, // Available UPI apps #[serde(alias = "upiPushDisabled")] pub upi_push_disabled: Option<String>, // UPI push disabled flag #[serde(alias = "pushServiceUrl")] pub push_service_url: Option<String>, // Push service URL #[serde(alias = "pushServiceUrlV2")]
{ "chunk": null, "crate": "connector-integration", "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": 150, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_175_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs // Success response fields - PayU can return status as either int or string #[serde(deserialize_with = "deserialize_payu_status")] pub status: Option<PayuStatusValue>, // Status can be 1 (int) or "success" (string) pub token: Option<String>, // PayU token #[serde(alias = "referenceId")] pub reference_id: Option<String>, // PayU reference ID #[serde(alias = "returnUrl")] pub return_url: Option<String>, // Return URL #[serde(alias = "merchantName")] pub merchant_name: Option<String>, // Merchant display name #[serde(alias = "merchantVpa")] pub merchant_vpa: Option<Secret<String>>, // Merchant UPI VPA pub amount: Option<String>, // Transaction amount #[serde(alias = "txnId")] pub txn_id: Option<String>, // Transaction ID
{ "chunk": null, "crate": "connector-integration", "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": 175, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_175_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs // Success response fields - PayU can return status as either int or string #[serde(deserialize_with = "deserialize_payu_status")] pub status: Option<PayuStatusValue>, // Status can be 1 (int) or "success" (string) pub token: Option<String>, // PayU token #[serde(alias = "referenceId")] pub reference_id: Option<String>, // PayU reference ID #[serde(alias = "returnUrl")] pub return_url: Option<String>, // Return URL #[serde(alias = "merchantName")] pub merchant_name: Option<String>, // Merchant display name #[serde(alias = "merchantVpa")] pub merchant_vpa: Option<Secret<String>>, // Merchant UPI VPA pub amount: Option<String>, // Transaction amount #[serde(alias = "txnId")] pub txn_id: Option<String>, // Transaction ID #[serde(alias = "intentURIData")] pub intent_uri_data: Option<String>, // UPI intent URI data // UPI-specific fields pub apps: Option<Vec<PayuUpiApp>>, // Available UPI apps #[serde(alias = "upiPushDisabled")] pub upi_push_disabled: Option<String>, // UPI push disabled flag #[serde(alias = "pushServiceUrl")] pub push_service_url: Option<String>, // Push service URL #[serde(alias = "pushServiceUrlV2")] pub push_service_url_v2: Option<String>, // Push service URL V2 #[serde(alias = "encodedPayuId")] pub encoded_payu_id: Option<String>, // Encoded PayU ID #[serde(alias = "vpaRegex")] pub vpa_regex: Option<String>, // VPA validation regex
{ "chunk": null, "crate": "connector-integration", "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": 175, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_175_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs // Success response fields - PayU can return status as either int or string #[serde(deserialize_with = "deserialize_payu_status")] pub status: Option<PayuStatusValue>, // Status can be 1 (int) or "success" (string) pub token: Option<String>, // PayU token #[serde(alias = "referenceId")] pub reference_id: Option<String>, // PayU reference ID #[serde(alias = "returnUrl")] pub return_url: Option<String>, // Return URL #[serde(alias = "merchantName")] pub merchant_name: Option<String>, // Merchant display name #[serde(alias = "merchantVpa")] pub merchant_vpa: Option<Secret<String>>, // Merchant UPI VPA pub amount: Option<String>, // Transaction amount #[serde(alias = "txnId")] pub txn_id: Option<String>, // Transaction ID #[serde(alias = "intentURIData")] pub intent_uri_data: Option<String>, // UPI intent URI data // UPI-specific fields pub apps: Option<Vec<PayuUpiApp>>, // Available UPI apps #[serde(alias = "upiPushDisabled")] pub upi_push_disabled: Option<String>, // UPI push disabled flag #[serde(alias = "pushServiceUrl")] pub push_service_url: Option<String>, // Push service URL #[serde(alias = "pushServiceUrlV2")] pub push_service_url_v2: Option<String>, // Push service URL V2 #[serde(alias = "encodedPayuId")] pub encoded_payu_id: Option<String>, // Encoded PayU ID #[serde(alias = "vpaRegex")] pub vpa_regex: Option<String>, // VPA validation regex // Polling and timeout configuration #[serde(alias = "upiServicePollInterval")] pub upi_service_poll_interval: Option<String>, // Poll interval #[serde(alias = "sdkUpiPushExpiry")] pub sdk_upi_push_expiry: Option<String>, // Push expiry time #[serde(alias = "sdkUpiVerificationInterval")] pub sdk_upi_verification_interval: Option<String>, // Verification interval // Additional flags #[serde(alias = "disableIntentSeamlessFailure")] pub disable_intent_seamless_failure: Option<String>, #[serde(alias = "intentSdkCombineVerifyAndPayButton")] pub intent_sdk_combine_verify_and_pay_button: Option<String>, // Error response fields (actual PayU format) pub result: Option<PayuResult>, // PayU result field (null for errors) pub error: Option<String>, // Error code like "EX158" pub message: Option<String>, // Error message }
{ "chunk": null, "crate": "connector-integration", "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": 175, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_200_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs pub push_service_url_v2: Option<String>, // Push service URL V2 #[serde(alias = "encodedPayuId")] pub encoded_payu_id: Option<String>, // Encoded PayU ID #[serde(alias = "vpaRegex")] pub vpa_regex: Option<String>, // VPA validation regex // Polling and timeout configuration #[serde(alias = "upiServicePollInterval")] pub upi_service_poll_interval: Option<String>, // Poll interval #[serde(alias = "sdkUpiPushExpiry")] pub sdk_upi_push_expiry: Option<String>, // Push expiry time #[serde(alias = "sdkUpiVerificationInterval")] pub sdk_upi_verification_interval: Option<String>, // Verification interval // Additional flags
{ "chunk": null, "crate": "connector-integration", "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": 200, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_200_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs pub push_service_url_v2: Option<String>, // Push service URL V2 #[serde(alias = "encodedPayuId")] pub encoded_payu_id: Option<String>, // Encoded PayU ID #[serde(alias = "vpaRegex")] pub vpa_regex: Option<String>, // VPA validation regex // Polling and timeout configuration #[serde(alias = "upiServicePollInterval")] pub upi_service_poll_interval: Option<String>, // Poll interval #[serde(alias = "sdkUpiPushExpiry")] pub sdk_upi_push_expiry: Option<String>, // Push expiry time #[serde(alias = "sdkUpiVerificationInterval")] pub sdk_upi_verification_interval: Option<String>, // Verification interval // Additional flags #[serde(alias = "disableIntentSeamlessFailure")] pub disable_intent_seamless_failure: Option<String>, #[serde(alias = "intentSdkCombineVerifyAndPayButton")] pub intent_sdk_combine_verify_and_pay_button: Option<String>, // Error response fields (actual PayU format) pub result: Option<PayuResult>, // PayU result field (null for errors) pub error: Option<String>, // Error code like "EX158" pub message: Option<String>, // Error message } #[derive(Debug, Deserialize, Serialize)] pub struct PayuResult { pub status: String, // UPI Collect Status pub mihpayid: String, // ID
{ "chunk": null, "crate": "connector-integration", "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": 200, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_200_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs pub push_service_url_v2: Option<String>, // Push service URL V2 #[serde(alias = "encodedPayuId")] pub encoded_payu_id: Option<String>, // Encoded PayU ID #[serde(alias = "vpaRegex")] pub vpa_regex: Option<String>, // VPA validation regex // Polling and timeout configuration #[serde(alias = "upiServicePollInterval")] pub upi_service_poll_interval: Option<String>, // Poll interval #[serde(alias = "sdkUpiPushExpiry")] pub sdk_upi_push_expiry: Option<String>, // Push expiry time #[serde(alias = "sdkUpiVerificationInterval")] pub sdk_upi_verification_interval: Option<String>, // Verification interval // Additional flags #[serde(alias = "disableIntentSeamlessFailure")] pub disable_intent_seamless_failure: Option<String>, #[serde(alias = "intentSdkCombineVerifyAndPayButton")] pub intent_sdk_combine_verify_and_pay_button: Option<String>, // Error response fields (actual PayU format) pub result: Option<PayuResult>, // PayU result field (null for errors) pub error: Option<String>, // Error code like "EX158" pub message: Option<String>, // Error message } #[derive(Debug, Deserialize, Serialize)] pub struct PayuResult { pub status: String, // UPI Collect Status pub mihpayid: String, // ID } #[derive(Debug, Deserialize, Serialize)] pub struct PayuUpiApp { pub name: String, // App display name pub package: String, // Android package name } // Error response structure matching actual PayU format #[derive(Debug, Deserialize, Serialize)] pub struct PayuErrorResponse { pub result: Option<serde_json::Value>, // null for errors pub status: Option<String>, // "failed" for errors pub error: Option<String>, // Error code like "EX158", "EX311" pub message: Option<String>, // Error description // Legacy fields for backward compatibility pub error_code: Option<String>, pub error_message: Option<String>, pub error_description: Option<String>,
{ "chunk": null, "crate": "connector-integration", "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": 200, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_225_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs #[derive(Debug, Deserialize, Serialize)] pub struct PayuResult { pub status: String, // UPI Collect Status pub mihpayid: String, // ID } #[derive(Debug, Deserialize, Serialize)] pub struct PayuUpiApp { pub name: String, // App display name pub package: String, // Android package name } // Error response structure matching actual PayU format #[derive(Debug, Deserialize, Serialize)]
{ "chunk": null, "crate": "connector-integration", "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": 225, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_225_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs #[derive(Debug, Deserialize, Serialize)] pub struct PayuResult { pub status: String, // UPI Collect Status pub mihpayid: String, // ID } #[derive(Debug, Deserialize, Serialize)] pub struct PayuUpiApp { pub name: String, // App display name pub package: String, // Android package name } // Error response structure matching actual PayU format #[derive(Debug, Deserialize, Serialize)] pub struct PayuErrorResponse { pub result: Option<serde_json::Value>, // null for errors pub status: Option<String>, // "failed" for errors pub error: Option<String>, // Error code like "EX158", "EX311" pub message: Option<String>, // Error description // Legacy fields for backward compatibility pub error_code: Option<String>, pub error_message: Option<String>, pub error_description: Option<String>, pub transaction_id: Option<String>, } // Request conversion with Framework Integration impl<
{ "chunk": null, "crate": "connector-integration", "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": 225, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_225_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs #[derive(Debug, Deserialize, Serialize)] pub struct PayuResult { pub status: String, // UPI Collect Status pub mihpayid: String, // ID } #[derive(Debug, Deserialize, Serialize)] pub struct PayuUpiApp { pub name: String, // App display name pub package: String, // Android package name } // Error response structure matching actual PayU format #[derive(Debug, Deserialize, Serialize)] pub struct PayuErrorResponse { pub result: Option<serde_json::Value>, // null for errors pub status: Option<String>, // "failed" for errors pub error: Option<String>, // Error code like "EX158", "EX311" pub message: Option<String>, // Error description // Legacy fields for backward compatibility pub error_code: Option<String>, pub error_message: Option<String>, pub error_description: Option<String>, pub transaction_id: Option<String>, } // Request conversion with Framework Integration impl< T: PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize, > TryFrom< super::PayuRouterData< RouterDataV2< Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData, >, T, >, > for PayuPaymentRequest { type Error = error_stack::Report<ConnectorError>;
{ "chunk": null, "crate": "connector-integration", "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": 225, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_250_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs pub transaction_id: Option<String>, } // Request conversion with Framework Integration impl< T: PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize, > TryFrom< super::PayuRouterData< RouterDataV2<
{ "chunk": null, "crate": "connector-integration", "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": 250, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_250_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs pub transaction_id: Option<String>, } // Request conversion with Framework Integration impl< T: PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize, > TryFrom< super::PayuRouterData< RouterDataV2< Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData, >, T, >, > for PayuPaymentRequest { type Error = error_stack::Report<ConnectorError>; fn try_from( item: super::PayuRouterData< RouterDataV2< Authorize,
{ "chunk": null, "crate": "connector-integration", "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": 250, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_250_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs pub transaction_id: Option<String>, } // Request conversion with Framework Integration impl< T: PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize, > TryFrom< super::PayuRouterData< RouterDataV2< Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData, >, T, >, > for PayuPaymentRequest { type Error = error_stack::Report<ConnectorError>; fn try_from( item: super::PayuRouterData< RouterDataV2< Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData, >, T, >, ) -> Result<Self, Self::Error> { // Extract router data let router_data = &item.router_data; // Use AmountConvertor framework for proper amount handling let amount = item .connector .amount_converter .convert( router_data.request.minor_amount, router_data.request.currency, ) .change_context(ConnectorError::AmountConversionFailed)?;
{ "chunk": null, "crate": "connector-integration", "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": 250, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_275_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs fn try_from( item: super::PayuRouterData< RouterDataV2< Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData, >, T, >, ) -> Result<Self, Self::Error> { // Extract router data let router_data = &item.router_data;
{ "chunk": null, "crate": "connector-integration", "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": 275, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_275_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs fn try_from( item: super::PayuRouterData< RouterDataV2< Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData, >, T, >, ) -> Result<Self, Self::Error> { // Extract router data let router_data = &item.router_data; // Use AmountConvertor framework for proper amount handling let amount = item .connector .amount_converter .convert( router_data.request.minor_amount, router_data.request.currency, ) .change_context(ConnectorError::AmountConversionFailed)?; // Extract authentication let auth = PayuAuthType::try_from(&router_data.connector_auth_type)?; // Determine payment flow based on payment method let (pg, bankcode, vpa, s2s_flow) = determine_upi_flow(&router_data.request)?;
{ "chunk": null, "crate": "connector-integration", "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": 275, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-8005942479899491151_275_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/payu/transformers.rs fn try_from( item: super::PayuRouterData< RouterDataV2< Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData, >, T, >, ) -> Result<Self, Self::Error> { // Extract router data let router_data = &item.router_data; // Use AmountConvertor framework for proper amount handling let amount = item .connector .amount_converter .convert( router_data.request.minor_amount, router_data.request.currency, ) .change_context(ConnectorError::AmountConversionFailed)?; // Extract authentication let auth = PayuAuthType::try_from(&router_data.connector_auth_type)?; // Determine payment flow based on payment method let (pg, bankcode, vpa, s2s_flow) = determine_upi_flow(&router_data.request)?; // Generate UDF fields based on Haskell implementation let udf_fields = generate_udf_fields( &router_data.resource_common_data.payment_id, router_data .resource_common_data .merchant_id .get_string_repr(), router_data, ); // Build base request let mut request = Self { key: auth.api_key.peek().to_string(), txnid: router_data .resource_common_data .connector_request_reference_id .clone(), amount, currency: router_data.request.currency,
{ "chunk": null, "crate": "connector-integration", "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": 275, "struct_name": null, "total_crates": null, "trait_name": null }