id stringlengths 20 153 | type stringclasses 1
value | granularity stringclasses 14
values | content stringlengths 16 84.3k | metadata dict |
|---|---|---|---|---|
connector-service_snippet_86351679979432987_1000_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/adyen.rs
&self,
req: &RouterDataV2<SubmitEvidence, DisputeFlowData, SubmitEvidenceData, DisputeResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
let dispute_url = self.connector_base_url_disputes(req)
.ok_or(errors::ConnectorError::FailedToObtainIntegrationUrl)?;
Ok(format!("{dispute_url}ca/services/DisputeService/v30/supplyDefenseDocument"))
}
}
);
static ADYEN_SUPPORTED_PAYMENT_METHODS: LazyLock<SupportedPaymentMethods> = LazyLock::new(|| {
let adyen_supported_capture_methods = vec![
CaptureMethod::Automatic,
CaptureMethod::Manual,
CaptureMethod::ManualMultiple,
// CaptureMethod::Scheduled,
];
let adyen_supported_card_network = vec![
CardNetwork::AmericanExpress,
CardNetwork::CartesBancaires,
CardNetwork::UnionPay,
CardNetwork::DinersClub,
CardNetwork::Discover,
CardNetwork::Interac,
CardNetwork::JCB,
CardNetwork::Maestro,
CardNetwork::Mastercard,
CardNetwork::Visa,
];
let mut adyen_supported_payment_methods = SupportedPaymentMethods::new();
adyen_supported_payment_methods.add(
PaymentMethod::Card,
PaymentMethodType::Credit,
PaymentMethodDetails {
mandates: FeatureStatus::Supported,
refunds: FeatureStatus::Supported,
supported_capture_methods: adyen_supported_capture_methods.clone(),
specific_features: Some(PaymentMethodSpecificFeatures::Card(CardSpecificFeatures {
three_ds: FeatureStatus::Supported,
no_three_ds: FeatureStatus::Supported,
supported_card_networks: adyen_supported_card_network.clone(),
})),
},
);
adyen_supported_payment_methods.add(
PaymentMethod::Card,
| {
"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": 1000,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_86351679979432987_1025_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/adyen.rs
CardNetwork::JCB,
CardNetwork::Maestro,
CardNetwork::Mastercard,
CardNetwork::Visa,
];
let mut adyen_supported_payment_methods = SupportedPaymentMethods::new();
adyen_supported_payment_methods.add(
PaymentMethod::Card,
PaymentMethodType::Credit,
PaymentMethodDetails {
mandates: FeatureStatus::Supported,
refunds: FeatureStatus::Supported,
supported_capture_methods: adyen_supported_capture_methods.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": 1025,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_86351679979432987_1025_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/adyen.rs
CardNetwork::JCB,
CardNetwork::Maestro,
CardNetwork::Mastercard,
CardNetwork::Visa,
];
let mut adyen_supported_payment_methods = SupportedPaymentMethods::new();
adyen_supported_payment_methods.add(
PaymentMethod::Card,
PaymentMethodType::Credit,
PaymentMethodDetails {
mandates: FeatureStatus::Supported,
refunds: FeatureStatus::Supported,
supported_capture_methods: adyen_supported_capture_methods.clone(),
specific_features: Some(PaymentMethodSpecificFeatures::Card(CardSpecificFeatures {
three_ds: FeatureStatus::Supported,
no_three_ds: FeatureStatus::Supported,
supported_card_networks: adyen_supported_card_network.clone(),
})),
},
);
adyen_supported_payment_methods.add(
PaymentMethod::Card,
PaymentMethodType::Debit,
PaymentMethodDetails {
mandates: FeatureStatus::Supported,
refunds: FeatureStatus::Supported,
supported_capture_methods: adyen_supported_capture_methods.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": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1025,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_86351679979432987_1025_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/adyen.rs
CardNetwork::JCB,
CardNetwork::Maestro,
CardNetwork::Mastercard,
CardNetwork::Visa,
];
let mut adyen_supported_payment_methods = SupportedPaymentMethods::new();
adyen_supported_payment_methods.add(
PaymentMethod::Card,
PaymentMethodType::Credit,
PaymentMethodDetails {
mandates: FeatureStatus::Supported,
refunds: FeatureStatus::Supported,
supported_capture_methods: adyen_supported_capture_methods.clone(),
specific_features: Some(PaymentMethodSpecificFeatures::Card(CardSpecificFeatures {
three_ds: FeatureStatus::Supported,
no_three_ds: FeatureStatus::Supported,
supported_card_networks: adyen_supported_card_network.clone(),
})),
},
);
adyen_supported_payment_methods.add(
PaymentMethod::Card,
PaymentMethodType::Debit,
PaymentMethodDetails {
mandates: FeatureStatus::Supported,
refunds: FeatureStatus::Supported,
supported_capture_methods: adyen_supported_capture_methods.clone(),
specific_features: Some(PaymentMethodSpecificFeatures::Card(CardSpecificFeatures {
three_ds: FeatureStatus::Supported,
no_three_ds: FeatureStatus::Supported,
supported_card_networks: adyen_supported_card_network.clone(),
})),
},
);
adyen_supported_payment_methods
});
static ADYEN_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {
display_name: "Adyen",
description: "Adyen is a Dutch payment company with the status of an acquiring bank that allows businesses to accept e-commerce, mobile, and point-of-sale payments. It is listed on the stock exchange Euronext Amsterdam.",
connector_type: types::PaymentConnectorCategory::PaymentGateway,
};
static ADYEN_SUPPORTED_WEBHOOK_FLOWS: &[EventClass] = &[EventClass::Payments, EventClass::Refunds];
impl ConnectorSpecifications for Adyen<DefaultPCIHolder> {
| {
"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": 1025,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_86351679979432987_1050_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/adyen.rs
PaymentMethodType::Debit,
PaymentMethodDetails {
mandates: FeatureStatus::Supported,
refunds: FeatureStatus::Supported,
supported_capture_methods: adyen_supported_capture_methods.clone(),
specific_features: Some(PaymentMethodSpecificFeatures::Card(CardSpecificFeatures {
three_ds: FeatureStatus::Supported,
no_three_ds: FeatureStatus::Supported,
supported_card_networks: adyen_supported_card_network.clone(),
})),
},
);
adyen_supported_payment_methods
});
| {
"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": 1050,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_86351679979432987_1050_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/adyen.rs
PaymentMethodType::Debit,
PaymentMethodDetails {
mandates: FeatureStatus::Supported,
refunds: FeatureStatus::Supported,
supported_capture_methods: adyen_supported_capture_methods.clone(),
specific_features: Some(PaymentMethodSpecificFeatures::Card(CardSpecificFeatures {
three_ds: FeatureStatus::Supported,
no_three_ds: FeatureStatus::Supported,
supported_card_networks: adyen_supported_card_network.clone(),
})),
},
);
adyen_supported_payment_methods
});
static ADYEN_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {
display_name: "Adyen",
description: "Adyen is a Dutch payment company with the status of an acquiring bank that allows businesses to accept e-commerce, mobile, and point-of-sale payments. It is listed on the stock exchange Euronext Amsterdam.",
connector_type: types::PaymentConnectorCategory::PaymentGateway,
};
static ADYEN_SUPPORTED_WEBHOOK_FLOWS: &[EventClass] = &[EventClass::Payments, EventClass::Refunds];
impl ConnectorSpecifications for Adyen<DefaultPCIHolder> {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&ADYEN_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
| {
"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": 1050,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_86351679979432987_1050_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/adyen.rs
PaymentMethodType::Debit,
PaymentMethodDetails {
mandates: FeatureStatus::Supported,
refunds: FeatureStatus::Supported,
supported_capture_methods: adyen_supported_capture_methods.clone(),
specific_features: Some(PaymentMethodSpecificFeatures::Card(CardSpecificFeatures {
three_ds: FeatureStatus::Supported,
no_three_ds: FeatureStatus::Supported,
supported_card_networks: adyen_supported_card_network.clone(),
})),
},
);
adyen_supported_payment_methods
});
static ADYEN_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {
display_name: "Adyen",
description: "Adyen is a Dutch payment company with the status of an acquiring bank that allows businesses to accept e-commerce, mobile, and point-of-sale payments. It is listed on the stock exchange Euronext Amsterdam.",
connector_type: types::PaymentConnectorCategory::PaymentGateway,
};
static ADYEN_SUPPORTED_WEBHOOK_FLOWS: &[EventClass] = &[EventClass::Payments, EventClass::Refunds];
impl ConnectorSpecifications for Adyen<DefaultPCIHolder> {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&ADYEN_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&ADYEN_SUPPORTED_PAYMENT_METHODS)
}
fn get_supported_webhook_flows(&self) -> Option<&'static [EventClass]> {
Some(ADYEN_SUPPORTED_WEBHOOK_FLOWS)
}
}
impl ConnectorValidation for Adyen<DefaultPCIHolder> {
fn validate_mandate_payment(
&self,
pm_type: Option<PaymentMethodType>,
pm_data: PaymentMethodData<DefaultPCIHolder>,
) -> CustomResult<(), errors::ConnectorError> {
let mandate_supported_pmd = std::collections::HashSet::from([PaymentMethodDataType::Card]);
is_mandate_supported(pm_data, pm_type, mandate_supported_pmd, self.id())
}
fn validate_psync_reference_id(
&self,
| {
"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": 1050,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_86351679979432987_1075_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/adyen.rs
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&ADYEN_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&ADYEN_SUPPORTED_PAYMENT_METHODS)
}
fn get_supported_webhook_flows(&self) -> Option<&'static [EventClass]> {
Some(ADYEN_SUPPORTED_WEBHOOK_FLOWS)
}
}
impl ConnectorValidation for Adyen<DefaultPCIHolder> {
fn validate_mandate_payment(
| {
"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": 1075,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_86351679979432987_1075_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/adyen.rs
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&ADYEN_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&ADYEN_SUPPORTED_PAYMENT_METHODS)
}
fn get_supported_webhook_flows(&self) -> Option<&'static [EventClass]> {
Some(ADYEN_SUPPORTED_WEBHOOK_FLOWS)
}
}
impl ConnectorValidation for Adyen<DefaultPCIHolder> {
fn validate_mandate_payment(
&self,
pm_type: Option<PaymentMethodType>,
pm_data: PaymentMethodData<DefaultPCIHolder>,
) -> CustomResult<(), errors::ConnectorError> {
let mandate_supported_pmd = std::collections::HashSet::from([PaymentMethodDataType::Card]);
is_mandate_supported(pm_data, pm_type, mandate_supported_pmd, self.id())
}
fn validate_psync_reference_id(
&self,
data: &PaymentsSyncData,
_is_three_ds: bool,
_status: AttemptStatus,
_connector_meta_data: Option<SecretSerdeValue>,
) -> CustomResult<(), errors::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": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1075,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_86351679979432987_1075_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/adyen.rs
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&ADYEN_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&ADYEN_SUPPORTED_PAYMENT_METHODS)
}
fn get_supported_webhook_flows(&self) -> Option<&'static [EventClass]> {
Some(ADYEN_SUPPORTED_WEBHOOK_FLOWS)
}
}
impl ConnectorValidation for Adyen<DefaultPCIHolder> {
fn validate_mandate_payment(
&self,
pm_type: Option<PaymentMethodType>,
pm_data: PaymentMethodData<DefaultPCIHolder>,
) -> CustomResult<(), errors::ConnectorError> {
let mandate_supported_pmd = std::collections::HashSet::from([PaymentMethodDataType::Card]);
is_mandate_supported(pm_data, pm_type, mandate_supported_pmd, self.id())
}
fn validate_psync_reference_id(
&self,
data: &PaymentsSyncData,
_is_three_ds: bool,
_status: AttemptStatus,
_connector_meta_data: Option<SecretSerdeValue>,
) -> CustomResult<(), errors::ConnectorError> {
if data.encoded_data.is_some() {
return Ok(());
}
Err(errors::ConnectorError::MissingRequiredField {
field_name: "encoded_data",
}
.into())
}
fn is_webhook_source_verification_mandatory(&self) -> bool {
false
}
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
ConnectorIntegrationV2<
domain_types::connector_flow::RepeatPayment,
PaymentFlowData,
domain_types::connector_types::RepeatPaymentData,
PaymentsResponseData,
> for Adyen<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": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1075,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_86351679979432987_1100_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/adyen.rs
data: &PaymentsSyncData,
_is_three_ds: bool,
_status: AttemptStatus,
_connector_meta_data: Option<SecretSerdeValue>,
) -> CustomResult<(), errors::ConnectorError> {
if data.encoded_data.is_some() {
return Ok(());
}
Err(errors::ConnectorError::MissingRequiredField {
field_name: "encoded_data",
}
.into())
}
fn is_webhook_source_verification_mandatory(&self) -> bool {
false
| {
"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": 1100,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_86351679979432987_1100_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/adyen.rs
data: &PaymentsSyncData,
_is_three_ds: bool,
_status: AttemptStatus,
_connector_meta_data: Option<SecretSerdeValue>,
) -> CustomResult<(), errors::ConnectorError> {
if data.encoded_data.is_some() {
return Ok(());
}
Err(errors::ConnectorError::MissingRequiredField {
field_name: "encoded_data",
}
.into())
}
fn is_webhook_source_verification_mandatory(&self) -> bool {
false
}
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
ConnectorIntegrationV2<
domain_types::connector_flow::RepeatPayment,
PaymentFlowData,
domain_types::connector_types::RepeatPaymentData,
PaymentsResponseData,
> for Adyen<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
interfaces::verification::SourceVerification<
| {
"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": 1100,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_86351679979432987_1100_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/adyen.rs
data: &PaymentsSyncData,
_is_three_ds: bool,
_status: AttemptStatus,
_connector_meta_data: Option<SecretSerdeValue>,
) -> CustomResult<(), errors::ConnectorError> {
if data.encoded_data.is_some() {
return Ok(());
}
Err(errors::ConnectorError::MissingRequiredField {
field_name: "encoded_data",
}
.into())
}
fn is_webhook_source_verification_mandatory(&self) -> bool {
false
}
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
ConnectorIntegrationV2<
domain_types::connector_flow::RepeatPayment,
PaymentFlowData,
domain_types::connector_types::RepeatPaymentData,
PaymentsResponseData,
> for Adyen<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
interfaces::verification::SourceVerification<
domain_types::connector_flow::RepeatPayment,
PaymentFlowData,
domain_types::connector_types::RepeatPaymentData,
PaymentsResponseData,
> for Adyen<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
ConnectorIntegrationV2<
PaymentMethodToken,
PaymentFlowData,
PaymentMethodTokenizationData<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": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1100,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_86351679979432987_1125_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/adyen.rs
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
interfaces::verification::SourceVerification<
domain_types::connector_flow::RepeatPayment,
PaymentFlowData,
domain_types::connector_types::RepeatPaymentData,
PaymentsResponseData,
> for Adyen<T>
{
}
impl<
T: 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": 1125,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_86351679979432987_1125_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/adyen.rs
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
interfaces::verification::SourceVerification<
domain_types::connector_flow::RepeatPayment,
PaymentFlowData,
domain_types::connector_types::RepeatPaymentData,
PaymentsResponseData,
> for Adyen<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
ConnectorIntegrationV2<
PaymentMethodToken,
PaymentFlowData,
PaymentMethodTokenizationData<T>,
PaymentMethodTokenResponse,
> for Adyen<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": 29,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1125,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_86351679979432987_1125_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/adyen.rs
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
interfaces::verification::SourceVerification<
domain_types::connector_flow::RepeatPayment,
PaymentFlowData,
domain_types::connector_types::RepeatPaymentData,
PaymentsResponseData,
> for Adyen<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
ConnectorIntegrationV2<
PaymentMethodToken,
PaymentFlowData,
PaymentMethodTokenizationData<T>,
PaymentMethodTokenResponse,
> for Adyen<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": 29,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1125,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_0_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
use std::fmt::Debug;
use common_utils::{
consts::{NO_ERROR_CODE, NO_ERROR_MESSAGE},
errors::CustomResult,
events,
ext_traits::BytesExt,
types::StringMajorUnit,
Method,
};
use domain_types::{
connector_flow::{
Accept, Authenticate, Authorize, Capture, CreateAccessToken, CreateConnectorCustomer,
CreateOrder, CreateSessionToken, DefendDispute, PSync, PaymentMethodToken,
PostAuthenticate, PreAuthenticate, RSync, Refund, RepeatPayment, SetupMandate,
| {
"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_8636526284244175173_0_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
use std::fmt::Debug;
use common_utils::{
consts::{NO_ERROR_CODE, NO_ERROR_MESSAGE},
errors::CustomResult,
events,
ext_traits::BytesExt,
types::StringMajorUnit,
Method,
};
use domain_types::{
connector_flow::{
Accept, Authenticate, Authorize, Capture, CreateAccessToken, CreateConnectorCustomer,
CreateOrder, CreateSessionToken, DefendDispute, PSync, PaymentMethodToken,
PostAuthenticate, PreAuthenticate, RSync, Refund, RepeatPayment, SetupMandate,
SubmitEvidence, Void, VoidPC,
},
connector_types::{
AcceptDisputeData, AccessTokenRequestData, AccessTokenResponseData, ConnectorCustomerData,
ConnectorCustomerResponse, DisputeDefendData, DisputeFlowData, DisputeResponseData,
PaymentCreateOrderData, PaymentCreateOrderResponse, PaymentFlowData,
PaymentMethodTokenResponse, PaymentMethodTokenizationData, PaymentVoidData,
PaymentsAuthenticateData, PaymentsAuthorizeData, PaymentsCancelPostCaptureData,
PaymentsCaptureData, PaymentsPostAuthenticateData, PaymentsPreAuthenticateData,
PaymentsResponseData, PaymentsSyncData, RefundFlowData, RefundSyncData, RefundsData,
RefundsResponseData, RepeatPaymentData, SessionTokenRequestData, SessionTokenResponseData,
SetupMandateRequestData, SubmitEvidenceData,
},
errors,
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": 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_8636526284244175173_0_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
use std::fmt::Debug;
use common_utils::{
consts::{NO_ERROR_CODE, NO_ERROR_MESSAGE},
errors::CustomResult,
events,
ext_traits::BytesExt,
types::StringMajorUnit,
Method,
};
use domain_types::{
connector_flow::{
Accept, Authenticate, Authorize, Capture, CreateAccessToken, CreateConnectorCustomer,
CreateOrder, CreateSessionToken, DefendDispute, PSync, PaymentMethodToken,
PostAuthenticate, PreAuthenticate, RSync, Refund, RepeatPayment, SetupMandate,
SubmitEvidence, Void, VoidPC,
},
connector_types::{
AcceptDisputeData, AccessTokenRequestData, AccessTokenResponseData, ConnectorCustomerData,
ConnectorCustomerResponse, DisputeDefendData, DisputeFlowData, DisputeResponseData,
PaymentCreateOrderData, PaymentCreateOrderResponse, PaymentFlowData,
PaymentMethodTokenResponse, PaymentMethodTokenizationData, PaymentVoidData,
PaymentsAuthenticateData, PaymentsAuthorizeData, PaymentsCancelPostCaptureData,
PaymentsCaptureData, PaymentsPostAuthenticateData, PaymentsPreAuthenticateData,
PaymentsResponseData, PaymentsSyncData, RefundFlowData, RefundSyncData, RefundsData,
RefundsResponseData, RepeatPaymentData, SessionTokenRequestData, SessionTokenResponseData,
SetupMandateRequestData, SubmitEvidenceData,
},
errors,
payment_method_data::PaymentMethodDataTypes,
router_data::ErrorResponse,
router_data_v2::RouterDataV2,
router_response_types::Response,
types::{Connectors, HasConnectors},
};
use hyperswitch_masking::{ExposeInterface, Mask, Maskable, PeekInterface};
use interfaces::{
api::ConnectorCommon, connector_integration_v2::ConnectorIntegrationV2, connector_types,
};
use serde::Serialize;
pub mod transformers;
use base64::Engine;
use error_stack::{Report, ResultExt};
use ring::{digest, hmac};
use time::OffsetDateTime;
pub const BASE64_ENGINE: base64::engine::GeneralPurpose = base64::engine::general_purpose::STANDARD;
use transformers::{
self as cybersource, CybersourceAuthEnrollmentRequest, CybersourceAuthSetupRequest,
| {
"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_8636526284244175173_25_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
RefundsResponseData, RepeatPaymentData, SessionTokenRequestData, SessionTokenResponseData,
SetupMandateRequestData, SubmitEvidenceData,
},
errors,
payment_method_data::PaymentMethodDataTypes,
router_data::ErrorResponse,
router_data_v2::RouterDataV2,
router_response_types::Response,
types::{Connectors, HasConnectors},
};
use hyperswitch_masking::{ExposeInterface, Mask, Maskable, PeekInterface};
use interfaces::{
api::ConnectorCommon, connector_integration_v2::ConnectorIntegrationV2, connector_types,
};
| {
"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_8636526284244175173_25_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
RefundsResponseData, RepeatPaymentData, SessionTokenRequestData, SessionTokenResponseData,
SetupMandateRequestData, SubmitEvidenceData,
},
errors,
payment_method_data::PaymentMethodDataTypes,
router_data::ErrorResponse,
router_data_v2::RouterDataV2,
router_response_types::Response,
types::{Connectors, HasConnectors},
};
use hyperswitch_masking::{ExposeInterface, Mask, Maskable, PeekInterface};
use interfaces::{
api::ConnectorCommon, connector_integration_v2::ConnectorIntegrationV2, connector_types,
};
use serde::Serialize;
pub mod transformers;
use base64::Engine;
use error_stack::{Report, ResultExt};
use ring::{digest, hmac};
use time::OffsetDateTime;
pub const BASE64_ENGINE: base64::engine::GeneralPurpose = base64::engine::general_purpose::STANDARD;
use transformers::{
self as cybersource, CybersourceAuthEnrollmentRequest, CybersourceAuthSetupRequest,
CybersourceAuthSetupResponse, CybersourceAuthValidateRequest, CybersourceAuthenticateResponse,
CybersourceAuthenticateResponse as CybersourcePostAuthenticateResponse,
CybersourcePaymentsCaptureRequest, CybersourcePaymentsRequest, CybersourcePaymentsResponse,
CybersourcePaymentsResponse as CybersourceCaptureResponse,
CybersourcePaymentsResponse as CybersourceVoidResponse,
| {
"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_8636526284244175173_25_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
RefundsResponseData, RepeatPaymentData, SessionTokenRequestData, SessionTokenResponseData,
SetupMandateRequestData, SubmitEvidenceData,
},
errors,
payment_method_data::PaymentMethodDataTypes,
router_data::ErrorResponse,
router_data_v2::RouterDataV2,
router_response_types::Response,
types::{Connectors, HasConnectors},
};
use hyperswitch_masking::{ExposeInterface, Mask, Maskable, PeekInterface};
use interfaces::{
api::ConnectorCommon, connector_integration_v2::ConnectorIntegrationV2, connector_types,
};
use serde::Serialize;
pub mod transformers;
use base64::Engine;
use error_stack::{Report, ResultExt};
use ring::{digest, hmac};
use time::OffsetDateTime;
pub const BASE64_ENGINE: base64::engine::GeneralPurpose = base64::engine::general_purpose::STANDARD;
use transformers::{
self as cybersource, CybersourceAuthEnrollmentRequest, CybersourceAuthSetupRequest,
CybersourceAuthSetupResponse, CybersourceAuthValidateRequest, CybersourceAuthenticateResponse,
CybersourceAuthenticateResponse as CybersourcePostAuthenticateResponse,
CybersourcePaymentsCaptureRequest, CybersourcePaymentsRequest, CybersourcePaymentsResponse,
CybersourcePaymentsResponse as CybersourceCaptureResponse,
CybersourcePaymentsResponse as CybersourceVoidResponse,
CybersourcePaymentsResponse as CybersourceSetupMandateResponse,
CybersourcePaymentsResponse as CybersourceRepeatPaymentResponse, CybersourceRefundRequest,
CybersourceRefundResponse, CybersourceRepeatPaymentRequest, CybersourceRsyncResponse,
CybersourceTransactionResponse, CybersourceVoidRequest, CybersourceZeroMandateRequest,
};
use super::macros;
use crate::{types::ResponseRouterData, with_error_response_body};
pub(crate) mod headers {
pub(crate) const CONTENT_TYPE: &str = "Content-Type";
pub(crate) const ACCEPT: &str = "Accept";
pub(crate) const CONNECTOR_UNAUTHORIZED_ERROR: &str = "Authentication Error from the connector";
}
// Trait implementations with generic type parameters
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::ConnectorServiceTrait<T> for Cybersource<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": 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_8636526284244175173_50_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
CybersourceAuthSetupResponse, CybersourceAuthValidateRequest, CybersourceAuthenticateResponse,
CybersourceAuthenticateResponse as CybersourcePostAuthenticateResponse,
CybersourcePaymentsCaptureRequest, CybersourcePaymentsRequest, CybersourcePaymentsResponse,
CybersourcePaymentsResponse as CybersourceCaptureResponse,
CybersourcePaymentsResponse as CybersourceVoidResponse,
CybersourcePaymentsResponse as CybersourceSetupMandateResponse,
CybersourcePaymentsResponse as CybersourceRepeatPaymentResponse, CybersourceRefundRequest,
CybersourceRefundResponse, CybersourceRepeatPaymentRequest, CybersourceRsyncResponse,
CybersourceTransactionResponse, CybersourceVoidRequest, CybersourceZeroMandateRequest,
};
use super::macros;
use crate::{types::ResponseRouterData, with_error_response_body};
pub(crate) mod headers {
| {
"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_8636526284244175173_50_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
CybersourceAuthSetupResponse, CybersourceAuthValidateRequest, CybersourceAuthenticateResponse,
CybersourceAuthenticateResponse as CybersourcePostAuthenticateResponse,
CybersourcePaymentsCaptureRequest, CybersourcePaymentsRequest, CybersourcePaymentsResponse,
CybersourcePaymentsResponse as CybersourceCaptureResponse,
CybersourcePaymentsResponse as CybersourceVoidResponse,
CybersourcePaymentsResponse as CybersourceSetupMandateResponse,
CybersourcePaymentsResponse as CybersourceRepeatPaymentResponse, CybersourceRefundRequest,
CybersourceRefundResponse, CybersourceRepeatPaymentRequest, CybersourceRsyncResponse,
CybersourceTransactionResponse, CybersourceVoidRequest, CybersourceZeroMandateRequest,
};
use super::macros;
use crate::{types::ResponseRouterData, with_error_response_body};
pub(crate) mod headers {
pub(crate) const CONTENT_TYPE: &str = "Content-Type";
pub(crate) const ACCEPT: &str = "Accept";
pub(crate) const CONNECTOR_UNAUTHORIZED_ERROR: &str = "Authentication Error from the connector";
}
// Trait implementations with generic type parameters
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::ConnectorServiceTrait<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentAuthorizeV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + 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": 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_8636526284244175173_50_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
CybersourceAuthSetupResponse, CybersourceAuthValidateRequest, CybersourceAuthenticateResponse,
CybersourceAuthenticateResponse as CybersourcePostAuthenticateResponse,
CybersourcePaymentsCaptureRequest, CybersourcePaymentsRequest, CybersourcePaymentsResponse,
CybersourcePaymentsResponse as CybersourceCaptureResponse,
CybersourcePaymentsResponse as CybersourceVoidResponse,
CybersourcePaymentsResponse as CybersourceSetupMandateResponse,
CybersourcePaymentsResponse as CybersourceRepeatPaymentResponse, CybersourceRefundRequest,
CybersourceRefundResponse, CybersourceRepeatPaymentRequest, CybersourceRsyncResponse,
CybersourceTransactionResponse, CybersourceVoidRequest, CybersourceZeroMandateRequest,
};
use super::macros;
use crate::{types::ResponseRouterData, with_error_response_body};
pub(crate) mod headers {
pub(crate) const CONTENT_TYPE: &str = "Content-Type";
pub(crate) const ACCEPT: &str = "Accept";
pub(crate) const CONNECTOR_UNAUTHORIZED_ERROR: &str = "Authentication Error from the connector";
}
// Trait implementations with generic type parameters
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::ConnectorServiceTrait<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentAuthorizeV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentSyncV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentVoidV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentVoidPostCaptureV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
ConnectorIntegrationV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
> for Cybersource<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": 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_8636526284244175173_75_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentAuthorizeV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentSyncV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentVoidV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentVoidPostCaptureV2 for Cybersource<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": 75,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_75_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentAuthorizeV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentSyncV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentVoidV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentVoidPostCaptureV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
ConnectorIntegrationV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::RefundSyncV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + 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": 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_8636526284244175173_75_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentAuthorizeV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentSyncV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentVoidV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentVoidPostCaptureV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
ConnectorIntegrationV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::RefundSyncV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::RefundV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentCapture for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::ValidationTrait for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentOrderCreate for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::SetupMandateV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + 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": 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_8636526284244175173_100_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::RefundSyncV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::RefundV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentCapture for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::ValidationTrait for Cybersource<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": 100,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_100_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::RefundSyncV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::RefundV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentCapture for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::ValidationTrait for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentOrderCreate for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::SetupMandateV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::RepeatPaymentV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::AcceptDispute for Cybersource<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": 100,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_100_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::RefundSyncV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::RefundV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentCapture for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::ValidationTrait for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentOrderCreate for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::SetupMandateV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::RepeatPaymentV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::AcceptDispute for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::SubmitEvidenceV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::DisputeDefend for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::IncomingWebhook for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentSessionToken for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentAccessToken for Cybersource<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": 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_8636526284244175173_125_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
connector_types::RepeatPaymentV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::AcceptDispute for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::SubmitEvidenceV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::DisputeDefend for Cybersource<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": 125,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_125_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
connector_types::RepeatPaymentV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::AcceptDispute for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::SubmitEvidenceV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::DisputeDefend for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::IncomingWebhook for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentSessionToken for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentAccessToken for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentTokenV2<T> for Cybersource<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": 125,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_125_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
connector_types::RepeatPaymentV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::AcceptDispute for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::SubmitEvidenceV2 for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::DisputeDefend for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::IncomingWebhook for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentSessionToken for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentAccessToken for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentTokenV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentPreAuthenticateV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentAuthenticateV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentPostAuthenticateV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::CreateConnectorCustomer for Cybersource<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": 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_8636526284244175173_150_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentTokenV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentPreAuthenticateV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentAuthenticateV2<T> for Cybersource<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": 150,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_150_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentTokenV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentPreAuthenticateV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentAuthenticateV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentPostAuthenticateV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::CreateConnectorCustomer for Cybersource<T>
{
}
macros::create_all_prerequisites!(
connector_name: Cybersource,
generic_type: T,
api: [
| {
"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_8636526284244175173_150_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentTokenV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentPreAuthenticateV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentAuthenticateV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::PaymentPostAuthenticateV2<T> for Cybersource<T>
{
}
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize>
connector_types::CreateConnectorCustomer for Cybersource<T>
{
}
macros::create_all_prerequisites!(
connector_name: Cybersource,
generic_type: T,
api: [
(
flow: Authorize,
request_body: CybersourcePaymentsRequest<T>,
response_body: CybersourcePaymentsResponse,
router_data: RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
),
(
flow: PreAuthenticate,
request_body: CybersourceAuthSetupRequest<T>,
response_body: CybersourceAuthSetupResponse,
router_data: RouterDataV2<PreAuthenticate, PaymentFlowData, PaymentsPreAuthenticateData<T>, PaymentsResponseData>,
),
(
flow: Authenticate,
request_body: CybersourceAuthEnrollmentRequest<T>,
response_body: CybersourceAuthenticateResponse,
router_data: RouterDataV2<Authenticate, PaymentFlowData, PaymentsAuthenticateData<T>, PaymentsResponseData>,
),
(
flow: PostAuthenticate,
| {
"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_8636526284244175173_175_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
macros::create_all_prerequisites!(
connector_name: Cybersource,
generic_type: T,
api: [
(
flow: Authorize,
request_body: CybersourcePaymentsRequest<T>,
response_body: CybersourcePaymentsResponse,
router_data: RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
),
(
flow: PreAuthenticate,
request_body: CybersourceAuthSetupRequest<T>,
response_body: CybersourceAuthSetupResponse,
| {
"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_8636526284244175173_175_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
macros::create_all_prerequisites!(
connector_name: Cybersource,
generic_type: T,
api: [
(
flow: Authorize,
request_body: CybersourcePaymentsRequest<T>,
response_body: CybersourcePaymentsResponse,
router_data: RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
),
(
flow: PreAuthenticate,
request_body: CybersourceAuthSetupRequest<T>,
response_body: CybersourceAuthSetupResponse,
router_data: RouterDataV2<PreAuthenticate, PaymentFlowData, PaymentsPreAuthenticateData<T>, PaymentsResponseData>,
),
(
flow: Authenticate,
request_body: CybersourceAuthEnrollmentRequest<T>,
response_body: CybersourceAuthenticateResponse,
router_data: RouterDataV2<Authenticate, PaymentFlowData, PaymentsAuthenticateData<T>, PaymentsResponseData>,
),
(
flow: PostAuthenticate,
request_body: CybersourceAuthValidateRequest<T>,
response_body: CybersourcePostAuthenticateResponse,
router_data: RouterDataV2<PostAuthenticate, PaymentFlowData, PaymentsPostAuthenticateData<T>, PaymentsResponseData>,
),
(
| {
"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_8636526284244175173_175_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
macros::create_all_prerequisites!(
connector_name: Cybersource,
generic_type: T,
api: [
(
flow: Authorize,
request_body: CybersourcePaymentsRequest<T>,
response_body: CybersourcePaymentsResponse,
router_data: RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
),
(
flow: PreAuthenticate,
request_body: CybersourceAuthSetupRequest<T>,
response_body: CybersourceAuthSetupResponse,
router_data: RouterDataV2<PreAuthenticate, PaymentFlowData, PaymentsPreAuthenticateData<T>, PaymentsResponseData>,
),
(
flow: Authenticate,
request_body: CybersourceAuthEnrollmentRequest<T>,
response_body: CybersourceAuthenticateResponse,
router_data: RouterDataV2<Authenticate, PaymentFlowData, PaymentsAuthenticateData<T>, PaymentsResponseData>,
),
(
flow: PostAuthenticate,
request_body: CybersourceAuthValidateRequest<T>,
response_body: CybersourcePostAuthenticateResponse,
router_data: RouterDataV2<PostAuthenticate, PaymentFlowData, PaymentsPostAuthenticateData<T>, PaymentsResponseData>,
),
(
flow: PSync,
response_body: CybersourceTransactionResponse,
router_data: RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
),
(
flow: Capture,
request_body: CybersourcePaymentsCaptureRequest,
response_body: CybersourceCaptureResponse,
router_data: RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
),
(
flow: Void,
request_body: CybersourceVoidRequest,
response_body: CybersourceVoidResponse,
router_data: RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
),
(
flow: Refund,
request_body: CybersourceRefundRequest,
response_body: CybersourceRefundResponse,
| {
"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_8636526284244175173_200_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
request_body: CybersourceAuthValidateRequest<T>,
response_body: CybersourcePostAuthenticateResponse,
router_data: RouterDataV2<PostAuthenticate, PaymentFlowData, PaymentsPostAuthenticateData<T>, PaymentsResponseData>,
),
(
flow: PSync,
response_body: CybersourceTransactionResponse,
router_data: RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
),
(
flow: Capture,
request_body: CybersourcePaymentsCaptureRequest,
response_body: CybersourceCaptureResponse,
router_data: RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
),
| {
"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_8636526284244175173_200_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
request_body: CybersourceAuthValidateRequest<T>,
response_body: CybersourcePostAuthenticateResponse,
router_data: RouterDataV2<PostAuthenticate, PaymentFlowData, PaymentsPostAuthenticateData<T>, PaymentsResponseData>,
),
(
flow: PSync,
response_body: CybersourceTransactionResponse,
router_data: RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
),
(
flow: Capture,
request_body: CybersourcePaymentsCaptureRequest,
response_body: CybersourceCaptureResponse,
router_data: RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
),
(
flow: Void,
request_body: CybersourceVoidRequest,
response_body: CybersourceVoidResponse,
router_data: RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
),
(
flow: Refund,
request_body: CybersourceRefundRequest,
response_body: CybersourceRefundResponse,
router_data: RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
),
(
flow: SetupMandate,
request_body: CybersourceZeroMandateRequest<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": 200,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_200_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
request_body: CybersourceAuthValidateRequest<T>,
response_body: CybersourcePostAuthenticateResponse,
router_data: RouterDataV2<PostAuthenticate, PaymentFlowData, PaymentsPostAuthenticateData<T>, PaymentsResponseData>,
),
(
flow: PSync,
response_body: CybersourceTransactionResponse,
router_data: RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
),
(
flow: Capture,
request_body: CybersourcePaymentsCaptureRequest,
response_body: CybersourceCaptureResponse,
router_data: RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
),
(
flow: Void,
request_body: CybersourceVoidRequest,
response_body: CybersourceVoidResponse,
router_data: RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
),
(
flow: Refund,
request_body: CybersourceRefundRequest,
response_body: CybersourceRefundResponse,
router_data: RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
),
(
flow: SetupMandate,
request_body: CybersourceZeroMandateRequest<T>,
response_body: CybersourceSetupMandateResponse,
router_data: RouterDataV2<SetupMandate, PaymentFlowData, SetupMandateRequestData<T>, PaymentsResponseData>,
),
(
flow: RSync,
response_body: CybersourceRsyncResponse,
router_data: RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
),
(
flow: RepeatPayment,
request_body: CybersourceRepeatPaymentRequest,
response_body: CybersourceRepeatPaymentResponse,
router_data: RouterDataV2<RepeatPayment, PaymentFlowData, RepeatPaymentData, PaymentsResponseData>,
)
],
amount_converters: [
amount_converter: StringMajorUnit
],
member_functions: {
pub fn build_headers<F, FCD, Req, Res>(
| {
"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_8636526284244175173_225_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
router_data: RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
),
(
flow: SetupMandate,
request_body: CybersourceZeroMandateRequest<T>,
response_body: CybersourceSetupMandateResponse,
router_data: RouterDataV2<SetupMandate, PaymentFlowData, SetupMandateRequestData<T>, PaymentsResponseData>,
),
(
flow: RSync,
response_body: CybersourceRsyncResponse,
router_data: RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
),
(
flow: RepeatPayment,
| {
"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_8636526284244175173_225_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
router_data: RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
),
(
flow: SetupMandate,
request_body: CybersourceZeroMandateRequest<T>,
response_body: CybersourceSetupMandateResponse,
router_data: RouterDataV2<SetupMandate, PaymentFlowData, SetupMandateRequestData<T>, PaymentsResponseData>,
),
(
flow: RSync,
response_body: CybersourceRsyncResponse,
router_data: RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
),
(
flow: RepeatPayment,
request_body: CybersourceRepeatPaymentRequest,
response_body: CybersourceRepeatPaymentResponse,
router_data: RouterDataV2<RepeatPayment, PaymentFlowData, RepeatPaymentData, PaymentsResponseData>,
)
],
amount_converters: [
amount_converter: StringMajorUnit
],
member_functions: {
pub fn build_headers<F, FCD, Req, Res>(
&self,
req: &RouterDataV2<F, FCD, Req, Res>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError>
where
Self: ConnectorIntegrationV2<F, FCD, Req, Res>,
| {
"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_8636526284244175173_225_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
router_data: RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
),
(
flow: SetupMandate,
request_body: CybersourceZeroMandateRequest<T>,
response_body: CybersourceSetupMandateResponse,
router_data: RouterDataV2<SetupMandate, PaymentFlowData, SetupMandateRequestData<T>, PaymentsResponseData>,
),
(
flow: RSync,
response_body: CybersourceRsyncResponse,
router_data: RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
),
(
flow: RepeatPayment,
request_body: CybersourceRepeatPaymentRequest,
response_body: CybersourceRepeatPaymentResponse,
router_data: RouterDataV2<RepeatPayment, PaymentFlowData, RepeatPaymentData, PaymentsResponseData>,
)
],
amount_converters: [
amount_converter: StringMajorUnit
],
member_functions: {
pub fn build_headers<F, FCD, Req, Res>(
&self,
req: &RouterDataV2<F, FCD, Req, Res>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError>
where
Self: ConnectorIntegrationV2<F, FCD, Req, Res>,
FCD: HasConnectors,
{
let date = OffsetDateTime::now_utc();
let cybersource_req = self.get_request_body(req)?;
let auth = cybersource::CybersourceAuthType::try_from(&req.connector_auth_type)?;
let merchant_account = auth.merchant_account.clone();
let base_url = self.base_url(req.resource_common_data.connectors());
let cybersource_host =
url::Url::parse(base_url).change_context(errors::ConnectorError::RequestEncodingFailed)?;
let host = cybersource_host
.host_str()
.ok_or(errors::ConnectorError::RequestEncodingFailed)?;
let path: String = self
.get_url(req)?
.chars()
.skip(base_url.len() - 1)
.collect();
let sha256 = self.generate_digest(
cybersource_req
.map(|req| req.get_inner_value().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": 225,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_250_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
&self,
req: &RouterDataV2<F, FCD, Req, Res>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError>
where
Self: ConnectorIntegrationV2<F, FCD, Req, Res>,
FCD: HasConnectors,
{
let date = OffsetDateTime::now_utc();
let cybersource_req = self.get_request_body(req)?;
let auth = cybersource::CybersourceAuthType::try_from(&req.connector_auth_type)?;
let merchant_account = auth.merchant_account.clone();
let base_url = self.base_url(req.resource_common_data.connectors());
let cybersource_host =
url::Url::parse(base_url).change_context(errors::ConnectorError::RequestEncodingFailed)?;
let host = cybersource_host
| {
"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_8636526284244175173_250_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
&self,
req: &RouterDataV2<F, FCD, Req, Res>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError>
where
Self: ConnectorIntegrationV2<F, FCD, Req, Res>,
FCD: HasConnectors,
{
let date = OffsetDateTime::now_utc();
let cybersource_req = self.get_request_body(req)?;
let auth = cybersource::CybersourceAuthType::try_from(&req.connector_auth_type)?;
let merchant_account = auth.merchant_account.clone();
let base_url = self.base_url(req.resource_common_data.connectors());
let cybersource_host =
url::Url::parse(base_url).change_context(errors::ConnectorError::RequestEncodingFailed)?;
let host = cybersource_host
.host_str()
.ok_or(errors::ConnectorError::RequestEncodingFailed)?;
let path: String = self
.get_url(req)?
.chars()
.skip(base_url.len() - 1)
.collect();
let sha256 = self.generate_digest(
cybersource_req
.map(|req| req.get_inner_value().expose())
.unwrap_or_default()
.as_bytes()
);
let http_method = self.get_http_method();
let signature = self.generate_signature(
| {
"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_8636526284244175173_250_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
&self,
req: &RouterDataV2<F, FCD, Req, Res>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError>
where
Self: ConnectorIntegrationV2<F, FCD, Req, Res>,
FCD: HasConnectors,
{
let date = OffsetDateTime::now_utc();
let cybersource_req = self.get_request_body(req)?;
let auth = cybersource::CybersourceAuthType::try_from(&req.connector_auth_type)?;
let merchant_account = auth.merchant_account.clone();
let base_url = self.base_url(req.resource_common_data.connectors());
let cybersource_host =
url::Url::parse(base_url).change_context(errors::ConnectorError::RequestEncodingFailed)?;
let host = cybersource_host
.host_str()
.ok_or(errors::ConnectorError::RequestEncodingFailed)?;
let path: String = self
.get_url(req)?
.chars()
.skip(base_url.len() - 1)
.collect();
let sha256 = self.generate_digest(
cybersource_req
.map(|req| req.get_inner_value().expose())
.unwrap_or_default()
.as_bytes()
);
let http_method = self.get_http_method();
let signature = self.generate_signature(
auth,
host.to_string(),
path.as_str(),
&sha256,
date,
http_method,
)?;
let mut headers = vec![
(
headers::CONTENT_TYPE.to_string(),
self.get_content_type().to_string().into(),
),
(
headers::ACCEPT.to_string(),
"application/hal+json;charset=utf-8".to_string().into(),
),
(
"v-c-merchant-id".to_string(),
merchant_account.into_masked(),
| {
"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_8636526284244175173_275_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
.unwrap_or_default()
.as_bytes()
);
let http_method = self.get_http_method();
let signature = self.generate_signature(
auth,
host.to_string(),
path.as_str(),
&sha256,
date,
http_method,
)?;
let mut headers = vec![
(
| {
"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_8636526284244175173_275_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
.unwrap_or_default()
.as_bytes()
);
let http_method = self.get_http_method();
let signature = self.generate_signature(
auth,
host.to_string(),
path.as_str(),
&sha256,
date,
http_method,
)?;
let mut headers = vec![
(
headers::CONTENT_TYPE.to_string(),
self.get_content_type().to_string().into(),
),
(
headers::ACCEPT.to_string(),
"application/hal+json;charset=utf-8".to_string().into(),
),
(
"v-c-merchant-id".to_string(),
merchant_account.into_masked(),
),
("Date".to_string(), date.to_string().into()),
("Host".to_string(), host.to_string().into()),
("Signature".to_string(), signature.into_masked()),
];
| {
"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_8636526284244175173_275_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
.unwrap_or_default()
.as_bytes()
);
let http_method = self.get_http_method();
let signature = self.generate_signature(
auth,
host.to_string(),
path.as_str(),
&sha256,
date,
http_method,
)?;
let mut headers = vec![
(
headers::CONTENT_TYPE.to_string(),
self.get_content_type().to_string().into(),
),
(
headers::ACCEPT.to_string(),
"application/hal+json;charset=utf-8".to_string().into(),
),
(
"v-c-merchant-id".to_string(),
merchant_account.into_masked(),
),
("Date".to_string(), date.to_string().into()),
("Host".to_string(), host.to_string().into()),
("Signature".to_string(), signature.into_masked()),
];
if matches!(http_method, Method::Post | Method::Put | Method::Patch) {
headers.push((
"Digest".to_string(),
format!("SHA-256={sha256}").into_masked(),
));
}
Ok(headers)
}
pub fn connector_base_url_payments<'a, F, Req, Res>(
&self,
req: &'a RouterDataV2<F, PaymentFlowData, Req, Res>,
) -> &'a str {
&req.resource_common_data.connectors.cybersource.base_url
}
pub fn connector_base_url_refunds<'a, F, Req, Res>(
&self,
req: &'a RouterDataV2<F, RefundFlowData, Req, Res>,
) -> &'a str {
| {
"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_8636526284244175173_300_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
),
("Date".to_string(), date.to_string().into()),
("Host".to_string(), host.to_string().into()),
("Signature".to_string(), signature.into_masked()),
];
if matches!(http_method, Method::Post | Method::Put | Method::Patch) {
headers.push((
"Digest".to_string(),
format!("SHA-256={sha256}").into_masked(),
));
}
Ok(headers)
}
pub fn connector_base_url_payments<'a, F, Req, Res>(
| {
"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_8636526284244175173_300_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
),
("Date".to_string(), date.to_string().into()),
("Host".to_string(), host.to_string().into()),
("Signature".to_string(), signature.into_masked()),
];
if matches!(http_method, Method::Post | Method::Put | Method::Patch) {
headers.push((
"Digest".to_string(),
format!("SHA-256={sha256}").into_masked(),
));
}
Ok(headers)
}
pub fn connector_base_url_payments<'a, F, Req, Res>(
&self,
req: &'a RouterDataV2<F, PaymentFlowData, Req, Res>,
) -> &'a str {
&req.resource_common_data.connectors.cybersource.base_url
}
pub fn connector_base_url_refunds<'a, F, Req, Res>(
&self,
req: &'a RouterDataV2<F, RefundFlowData, Req, Res>,
) -> &'a str {
&req.resource_common_data.connectors.cybersource.base_url
}
pub fn generate_digest(&self, payload: &[u8]) -> String {
let payload_digest = digest::digest(&digest::SHA256, payload);
| {
"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_8636526284244175173_300_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
),
("Date".to_string(), date.to_string().into()),
("Host".to_string(), host.to_string().into()),
("Signature".to_string(), signature.into_masked()),
];
if matches!(http_method, Method::Post | Method::Put | Method::Patch) {
headers.push((
"Digest".to_string(),
format!("SHA-256={sha256}").into_masked(),
));
}
Ok(headers)
}
pub fn connector_base_url_payments<'a, F, Req, Res>(
&self,
req: &'a RouterDataV2<F, PaymentFlowData, Req, Res>,
) -> &'a str {
&req.resource_common_data.connectors.cybersource.base_url
}
pub fn connector_base_url_refunds<'a, F, Req, Res>(
&self,
req: &'a RouterDataV2<F, RefundFlowData, Req, Res>,
) -> &'a str {
&req.resource_common_data.connectors.cybersource.base_url
}
pub fn generate_digest(&self, payload: &[u8]) -> String {
let payload_digest = digest::digest(&digest::SHA256, payload);
BASE64_ENGINE.encode(payload_digest)
}
pub fn generate_signature(
&self,
auth: cybersource::CybersourceAuthType,
host: String,
resource: &str,
payload: &String,
date: OffsetDateTime,
http_method: Method,
) -> CustomResult<String, errors::ConnectorError> {
let cybersource::CybersourceAuthType {
api_key,
merchant_account,
api_secret,
} = auth;
let is_post_method = matches!(http_method, Method::Post);
let is_patch_method = matches!(http_method, Method::Patch);
let is_delete_method = matches!(http_method, Method::Delete);
| {
"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_8636526284244175173_325_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
&req.resource_common_data.connectors.cybersource.base_url
}
pub fn generate_digest(&self, payload: &[u8]) -> String {
let payload_digest = digest::digest(&digest::SHA256, payload);
BASE64_ENGINE.encode(payload_digest)
}
pub fn generate_signature(
&self,
auth: cybersource::CybersourceAuthType,
host: String,
resource: &str,
payload: &String,
date: OffsetDateTime,
| {
"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_8636526284244175173_325_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
&req.resource_common_data.connectors.cybersource.base_url
}
pub fn generate_digest(&self, payload: &[u8]) -> String {
let payload_digest = digest::digest(&digest::SHA256, payload);
BASE64_ENGINE.encode(payload_digest)
}
pub fn generate_signature(
&self,
auth: cybersource::CybersourceAuthType,
host: String,
resource: &str,
payload: &String,
date: OffsetDateTime,
http_method: Method,
) -> CustomResult<String, errors::ConnectorError> {
let cybersource::CybersourceAuthType {
api_key,
merchant_account,
api_secret,
} = auth;
let is_post_method = matches!(http_method, Method::Post);
let is_patch_method = matches!(http_method, Method::Patch);
let is_delete_method = matches!(http_method, Method::Delete);
let digest_str = if is_post_method || is_patch_method {
"digest "
} else {
""
};
| {
"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_8636526284244175173_325_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
&req.resource_common_data.connectors.cybersource.base_url
}
pub fn generate_digest(&self, payload: &[u8]) -> String {
let payload_digest = digest::digest(&digest::SHA256, payload);
BASE64_ENGINE.encode(payload_digest)
}
pub fn generate_signature(
&self,
auth: cybersource::CybersourceAuthType,
host: String,
resource: &str,
payload: &String,
date: OffsetDateTime,
http_method: Method,
) -> CustomResult<String, errors::ConnectorError> {
let cybersource::CybersourceAuthType {
api_key,
merchant_account,
api_secret,
} = auth;
let is_post_method = matches!(http_method, Method::Post);
let is_patch_method = matches!(http_method, Method::Patch);
let is_delete_method = matches!(http_method, Method::Delete);
let digest_str = if is_post_method || is_patch_method {
"digest "
} else {
""
};
let headers = format!("host date (request-target) {digest_str}v-c-merchant-id");
let request_target = if is_post_method {
format!("(request-target): post {resource}\ndigest: SHA-256={payload}\n")
} else if is_patch_method {
format!("(request-target): patch {resource}\ndigest: SHA-256={payload}\n")
} else if is_delete_method {
format!("(request-target): delete {resource}\n")
} else {
format!("(request-target): get {resource}\n")
};
let signature_string = format!(
"host: {host}\ndate: {date}\n{request_target}v-c-merchant-id: {}",
merchant_account.peek()
);
let key_value = BASE64_ENGINE
.decode(api_secret.expose())
.change_context(errors::ConnectorError::InvalidConnectorConfig {
config: "connector_account_details.api_secret",
})?;
let key = hmac::Key::new(hmac::HMAC_SHA256, &key_value);
| {
"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_8636526284244175173_350_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
let digest_str = if is_post_method || is_patch_method {
"digest "
} else {
""
};
let headers = format!("host date (request-target) {digest_str}v-c-merchant-id");
let request_target = if is_post_method {
format!("(request-target): post {resource}\ndigest: SHA-256={payload}\n")
} else if is_patch_method {
format!("(request-target): patch {resource}\ndigest: SHA-256={payload}\n")
} else if is_delete_method {
format!("(request-target): delete {resource}\n")
} else {
format!("(request-target): get {resource}\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": 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_8636526284244175173_350_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
let digest_str = if is_post_method || is_patch_method {
"digest "
} else {
""
};
let headers = format!("host date (request-target) {digest_str}v-c-merchant-id");
let request_target = if is_post_method {
format!("(request-target): post {resource}\ndigest: SHA-256={payload}\n")
} else if is_patch_method {
format!("(request-target): patch {resource}\ndigest: SHA-256={payload}\n")
} else if is_delete_method {
format!("(request-target): delete {resource}\n")
} else {
format!("(request-target): get {resource}\n")
};
let signature_string = format!(
"host: {host}\ndate: {date}\n{request_target}v-c-merchant-id: {}",
merchant_account.peek()
);
let key_value = BASE64_ENGINE
.decode(api_secret.expose())
.change_context(errors::ConnectorError::InvalidConnectorConfig {
config: "connector_account_details.api_secret",
})?;
let key = hmac::Key::new(hmac::HMAC_SHA256, &key_value);
let signature_value =
BASE64_ENGINE.encode(hmac::sign(&key, signature_string.as_bytes()).as_ref());
let signature_header = format!(
r#"keyid="{}", algorithm="HmacSHA256", headers="{headers}", signature="{signature_value}""#,
api_key.peek()
| {
"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_8636526284244175173_350_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
let digest_str = if is_post_method || is_patch_method {
"digest "
} else {
""
};
let headers = format!("host date (request-target) {digest_str}v-c-merchant-id");
let request_target = if is_post_method {
format!("(request-target): post {resource}\ndigest: SHA-256={payload}\n")
} else if is_patch_method {
format!("(request-target): patch {resource}\ndigest: SHA-256={payload}\n")
} else if is_delete_method {
format!("(request-target): delete {resource}\n")
} else {
format!("(request-target): get {resource}\n")
};
let signature_string = format!(
"host: {host}\ndate: {date}\n{request_target}v-c-merchant-id: {}",
merchant_account.peek()
);
let key_value = BASE64_ENGINE
.decode(api_secret.expose())
.change_context(errors::ConnectorError::InvalidConnectorConfig {
config: "connector_account_details.api_secret",
})?;
let key = hmac::Key::new(hmac::HMAC_SHA256, &key_value);
let signature_value =
BASE64_ENGINE.encode(hmac::sign(&key, signature_string.as_bytes()).as_ref());
let signature_header = format!(
r#"keyid="{}", algorithm="HmacSHA256", headers="{headers}", signature="{signature_value}""#,
api_key.peek()
);
Ok(signature_header)
}
}
);
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize> ConnectorCommon
for Cybersource<T>
{
fn id(&self) -> &'static str {
"cybersource"
}
fn common_get_content_type(&self) -> &'static str {
"application/json;charset=utf-8"
}
fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
connectors.cybersource.base_url.as_ref()
| {
"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": 350,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_375_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
let signature_value =
BASE64_ENGINE.encode(hmac::sign(&key, signature_string.as_bytes()).as_ref());
let signature_header = format!(
r#"keyid="{}", algorithm="HmacSHA256", headers="{headers}", signature="{signature_value}""#,
api_key.peek()
);
Ok(signature_header)
}
}
);
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize> ConnectorCommon
for Cybersource<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_8636526284244175173_375_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
let signature_value =
BASE64_ENGINE.encode(hmac::sign(&key, signature_string.as_bytes()).as_ref());
let signature_header = format!(
r#"keyid="{}", algorithm="HmacSHA256", headers="{headers}", signature="{signature_value}""#,
api_key.peek()
);
Ok(signature_header)
}
}
);
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize> ConnectorCommon
for Cybersource<T>
{
fn id(&self) -> &'static str {
"cybersource"
}
fn common_get_content_type(&self) -> &'static str {
"application/json;charset=utf-8"
}
fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
connectors.cybersource.base_url.as_ref()
}
fn build_error_response(
&self,
res: Response,
| {
"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": 375,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_375_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
let signature_value =
BASE64_ENGINE.encode(hmac::sign(&key, signature_string.as_bytes()).as_ref());
let signature_header = format!(
r#"keyid="{}", algorithm="HmacSHA256", headers="{headers}", signature="{signature_value}""#,
api_key.peek()
);
Ok(signature_header)
}
}
);
impl<T: PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize> ConnectorCommon
for Cybersource<T>
{
fn id(&self) -> &'static str {
"cybersource"
}
fn common_get_content_type(&self) -> &'static str {
"application/json;charset=utf-8"
}
fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
connectors.cybersource.base_url.as_ref()
}
fn build_error_response(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
let response: Result<
cybersource::CybersourceErrorResponse,
Report<common_utils::errors::ParsingError>,
> = res.response.parse_struct("Cybersource ErrorResponse");
let error_message = if res.status_code == 401 {
headers::CONNECTOR_UNAUTHORIZED_ERROR.to_string()
} else {
NO_ERROR_MESSAGE.to_string()
};
match response {
Ok(transformers::CybersourceErrorResponse::StandardError(response)) => {
with_error_response_body!(event_builder, response);
let (code, message, reason) = match response.error_information {
Some(ref error_info) => {
let detailed_error_info = error_info.details.as_ref().map(|details| {
details
| {
"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": 375,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_400_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
}
fn build_error_response(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
let response: Result<
cybersource::CybersourceErrorResponse,
Report<common_utils::errors::ParsingError>,
> = res.response.parse_struct("Cybersource ErrorResponse");
let error_message = if res.status_code == 401 {
headers::CONNECTOR_UNAUTHORIZED_ERROR.to_string()
} else {
| {
"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": 400,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_400_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
}
fn build_error_response(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
let response: Result<
cybersource::CybersourceErrorResponse,
Report<common_utils::errors::ParsingError>,
> = res.response.parse_struct("Cybersource ErrorResponse");
let error_message = if res.status_code == 401 {
headers::CONNECTOR_UNAUTHORIZED_ERROR.to_string()
} else {
NO_ERROR_MESSAGE.to_string()
};
match response {
Ok(transformers::CybersourceErrorResponse::StandardError(response)) => {
with_error_response_body!(event_builder, response);
let (code, message, reason) = match response.error_information {
Some(ref error_info) => {
let detailed_error_info = error_info.details.as_ref().map(|details| {
details
.iter()
.map(|det| format!("{} : {}", det.field, det.reason))
.collect::<Vec<_>>()
.join(", ")
});
| {
"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": 400,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_400_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
}
fn build_error_response(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
let response: Result<
cybersource::CybersourceErrorResponse,
Report<common_utils::errors::ParsingError>,
> = res.response.parse_struct("Cybersource ErrorResponse");
let error_message = if res.status_code == 401 {
headers::CONNECTOR_UNAUTHORIZED_ERROR.to_string()
} else {
NO_ERROR_MESSAGE.to_string()
};
match response {
Ok(transformers::CybersourceErrorResponse::StandardError(response)) => {
with_error_response_body!(event_builder, response);
let (code, message, reason) = match response.error_information {
Some(ref error_info) => {
let detailed_error_info = error_info.details.as_ref().map(|details| {
details
.iter()
.map(|det| format!("{} : {}", det.field, det.reason))
.collect::<Vec<_>>()
.join(", ")
});
(
error_info.reason.clone(),
error_info.reason.clone(),
transformers::get_error_reason(
Some(error_info.message.clone()),
detailed_error_info,
None,
),
)
}
None => {
let detailed_error_info = response.details.map(|details| {
details
.iter()
.map(|det| format!("{} : {}", det.field, det.reason))
.collect::<Vec<_>>()
.join(", ")
});
(
response
| {
"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": 400,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_425_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
.iter()
.map(|det| format!("{} : {}", det.field, det.reason))
.collect::<Vec<_>>()
.join(", ")
});
(
error_info.reason.clone(),
error_info.reason.clone(),
transformers::get_error_reason(
Some(error_info.message.clone()),
detailed_error_info,
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": 425,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_425_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
.iter()
.map(|det| format!("{} : {}", det.field, det.reason))
.collect::<Vec<_>>()
.join(", ")
});
(
error_info.reason.clone(),
error_info.reason.clone(),
transformers::get_error_reason(
Some(error_info.message.clone()),
detailed_error_info,
None,
),
)
}
None => {
let detailed_error_info = response.details.map(|details| {
details
.iter()
.map(|det| format!("{} : {}", det.field, det.reason))
.collect::<Vec<_>>()
.join(", ")
});
(
response
.reason
.clone()
.map_or(NO_ERROR_CODE.to_string(), |reason| reason.to_string()),
response
.reason
| {
"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": 425,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_425_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
.iter()
.map(|det| format!("{} : {}", det.field, det.reason))
.collect::<Vec<_>>()
.join(", ")
});
(
error_info.reason.clone(),
error_info.reason.clone(),
transformers::get_error_reason(
Some(error_info.message.clone()),
detailed_error_info,
None,
),
)
}
None => {
let detailed_error_info = response.details.map(|details| {
details
.iter()
.map(|det| format!("{} : {}", det.field, det.reason))
.collect::<Vec<_>>()
.join(", ")
});
(
response
.reason
.clone()
.map_or(NO_ERROR_CODE.to_string(), |reason| reason.to_string()),
response
.reason
.map_or(error_message.to_string(), |reason| reason.to_string()),
transformers::get_error_reason(
response.message,
detailed_error_info,
None,
),
)
}
};
Ok(ErrorResponse {
status_code: res.status_code,
code,
message,
reason,
attempt_status: None,
connector_transaction_id: None,
network_advice_code: None,
network_decline_code: None,
network_error_message: 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": 425,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_450_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
.reason
.clone()
.map_or(NO_ERROR_CODE.to_string(), |reason| reason.to_string()),
response
.reason
.map_or(error_message.to_string(), |reason| reason.to_string()),
transformers::get_error_reason(
response.message,
detailed_error_info,
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": 450,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_450_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
.reason
.clone()
.map_or(NO_ERROR_CODE.to_string(), |reason| reason.to_string()),
response
.reason
.map_or(error_message.to_string(), |reason| reason.to_string()),
transformers::get_error_reason(
response.message,
detailed_error_info,
None,
),
)
}
};
Ok(ErrorResponse {
status_code: res.status_code,
code,
message,
reason,
attempt_status: None,
connector_transaction_id: None,
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
})
}
Ok(transformers::CybersourceErrorResponse::AuthenticationError(response)) => {
with_error_response_body!(event_builder, response);
Ok(ErrorResponse {
| {
"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": 450,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_450_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
.reason
.clone()
.map_or(NO_ERROR_CODE.to_string(), |reason| reason.to_string()),
response
.reason
.map_or(error_message.to_string(), |reason| reason.to_string()),
transformers::get_error_reason(
response.message,
detailed_error_info,
None,
),
)
}
};
Ok(ErrorResponse {
status_code: res.status_code,
code,
message,
reason,
attempt_status: None,
connector_transaction_id: None,
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
})
}
Ok(transformers::CybersourceErrorResponse::AuthenticationError(response)) => {
with_error_response_body!(event_builder, response);
Ok(ErrorResponse {
status_code: res.status_code,
code: NO_ERROR_CODE.to_string(),
message: response.response.rmsg.clone(),
reason: Some(response.response.rmsg),
attempt_status: None,
connector_transaction_id: None,
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
})
}
Ok(transformers::CybersourceErrorResponse::NotAvailableError(response)) => {
with_error_response_body!(event_builder, response);
let error_response = response
.errors
.iter()
.map(|error_info| {
format!(
"{}: {}",
error_info.error_type.clone().unwrap_or("".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": 450,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_475_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
})
}
Ok(transformers::CybersourceErrorResponse::AuthenticationError(response)) => {
with_error_response_body!(event_builder, response);
Ok(ErrorResponse {
status_code: res.status_code,
code: NO_ERROR_CODE.to_string(),
message: response.response.rmsg.clone(),
reason: Some(response.response.rmsg),
attempt_status: None,
connector_transaction_id: None,
network_advice_code: None,
network_decline_code: None,
network_error_message: 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": 475,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_475_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
})
}
Ok(transformers::CybersourceErrorResponse::AuthenticationError(response)) => {
with_error_response_body!(event_builder, response);
Ok(ErrorResponse {
status_code: res.status_code,
code: NO_ERROR_CODE.to_string(),
message: response.response.rmsg.clone(),
reason: Some(response.response.rmsg),
attempt_status: None,
connector_transaction_id: None,
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
})
}
Ok(transformers::CybersourceErrorResponse::NotAvailableError(response)) => {
with_error_response_body!(event_builder, response);
let error_response = response
.errors
.iter()
.map(|error_info| {
format!(
"{}: {}",
error_info.error_type.clone().unwrap_or("".to_string()),
error_info.message.clone().unwrap_or("".to_string())
)
})
.collect::<Vec<String>>()
.join(" & ");
| {
"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": 475,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_475_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
})
}
Ok(transformers::CybersourceErrorResponse::AuthenticationError(response)) => {
with_error_response_body!(event_builder, response);
Ok(ErrorResponse {
status_code: res.status_code,
code: NO_ERROR_CODE.to_string(),
message: response.response.rmsg.clone(),
reason: Some(response.response.rmsg),
attempt_status: None,
connector_transaction_id: None,
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
})
}
Ok(transformers::CybersourceErrorResponse::NotAvailableError(response)) => {
with_error_response_body!(event_builder, response);
let error_response = response
.errors
.iter()
.map(|error_info| {
format!(
"{}: {}",
error_info.error_type.clone().unwrap_or("".to_string()),
error_info.message.clone().unwrap_or("".to_string())
)
})
.collect::<Vec<String>>()
.join(" & ");
Ok(ErrorResponse {
status_code: res.status_code,
code: NO_ERROR_CODE.to_string(),
message: error_response.clone(),
reason: Some(error_response),
attempt_status: None,
connector_transaction_id: None,
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
})
}
Err(error_msg) => {
if let Some(event) = event_builder {
event.set_connector_response(&serde_json::json!({"error": "Error response parsing failed", "status_code": res.status_code}))
};
tracing::error!(deserialization_error =? error_msg);
domain_types::utils::handle_json_response_deserialization_failure(
res,
"cybersource",
| {
"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": 475,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_500_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
error_info.message.clone().unwrap_or("".to_string())
)
})
.collect::<Vec<String>>()
.join(" & ");
Ok(ErrorResponse {
status_code: res.status_code,
code: NO_ERROR_CODE.to_string(),
message: error_response.clone(),
reason: Some(error_response),
attempt_status: None,
connector_transaction_id: None,
network_advice_code: None,
network_decline_code: None,
network_error_message: 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": 500,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_500_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
error_info.message.clone().unwrap_or("".to_string())
)
})
.collect::<Vec<String>>()
.join(" & ");
Ok(ErrorResponse {
status_code: res.status_code,
code: NO_ERROR_CODE.to_string(),
message: error_response.clone(),
reason: Some(error_response),
attempt_status: None,
connector_transaction_id: None,
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
})
}
Err(error_msg) => {
if let Some(event) = event_builder {
event.set_connector_response(&serde_json::json!({"error": "Error response parsing failed", "status_code": res.status_code}))
};
tracing::error!(deserialization_error =? error_msg);
domain_types::utils::handle_json_response_deserialization_failure(
res,
"cybersource",
)
}
}
}
}
| {
"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": 500,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_500_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
error_info.message.clone().unwrap_or("".to_string())
)
})
.collect::<Vec<String>>()
.join(" & ");
Ok(ErrorResponse {
status_code: res.status_code,
code: NO_ERROR_CODE.to_string(),
message: error_response.clone(),
reason: Some(error_response),
attempt_status: None,
connector_transaction_id: None,
network_advice_code: None,
network_decline_code: None,
network_error_message: None,
})
}
Err(error_msg) => {
if let Some(event) = event_builder {
event.set_connector_response(&serde_json::json!({"error": "Error response parsing failed", "status_code": res.status_code}))
};
tracing::error!(deserialization_error =? error_msg);
domain_types::utils::handle_json_response_deserialization_failure(
res,
"cybersource",
)
}
}
}
}
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourcePaymentsRequest),
curl_response: CybersourcePaymentsResponse,
flow_name: Authorize,
resource_common_data: PaymentFlowData,
flow_request: PaymentsAuthorizeData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
| {
"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": 500,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_525_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
)
}
}
}
}
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourcePaymentsRequest),
curl_response: CybersourcePaymentsResponse,
flow_name: Authorize,
resource_common_data: PaymentFlowData,
flow_request: PaymentsAuthorizeData<T>,
flow_response: PaymentsResponseData,
| {
"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": 525,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_525_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
)
}
}
}
}
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourcePaymentsRequest),
curl_response: CybersourcePaymentsResponse,
flow_name: Authorize,
resource_common_data: PaymentFlowData,
flow_request: PaymentsAuthorizeData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!("{}pts/v2/payments/", self.connector_base_url_payments(req)))
| {
"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": 525,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_525_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
)
}
}
}
}
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourcePaymentsRequest),
curl_response: CybersourcePaymentsResponse,
flow_name: Authorize,
resource_common_data: PaymentFlowData,
flow_request: PaymentsAuthorizeData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!("{}pts/v2/payments/", self.connector_base_url_payments(req)))
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourceAuthSetupRequest<T>),
curl_response: CybersourceAuthSetupResponse,
flow_name: PreAuthenticate,
resource_common_data: PaymentFlowData,
flow_request: PaymentsPreAuthenticateData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<PreAuthenticate, PaymentFlowData, PaymentsPreAuthenticateData<T>, PaymentsResponseData>,
| {
"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": 525,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_550_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
fn get_url(
&self,
req: &RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!("{}pts/v2/payments/", self.connector_base_url_payments(req)))
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourceAuthSetupRequest<T>),
curl_response: CybersourceAuthSetupResponse,
flow_name: PreAuthenticate,
| {
"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": 550,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_550_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
fn get_url(
&self,
req: &RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!("{}pts/v2/payments/", self.connector_base_url_payments(req)))
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourceAuthSetupRequest<T>),
curl_response: CybersourceAuthSetupResponse,
flow_name: PreAuthenticate,
resource_common_data: PaymentFlowData,
flow_request: PaymentsPreAuthenticateData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<PreAuthenticate, PaymentFlowData, PaymentsPreAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
| {
"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": 550,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_550_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
fn get_url(
&self,
req: &RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!("{}pts/v2/payments/", self.connector_base_url_payments(req)))
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourceAuthSetupRequest<T>),
curl_response: CybersourceAuthSetupResponse,
flow_name: PreAuthenticate,
resource_common_data: PaymentFlowData,
flow_request: PaymentsPreAuthenticateData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<PreAuthenticate, PaymentFlowData, PaymentsPreAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<PreAuthenticate, PaymentFlowData, PaymentsPreAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!(
"{}risk/v1/authentication-setups",
self.connector_base_url_payments(req)
))
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourceAuthEnrollmentRequest<T>),
curl_response: CybersourceAuthenticateResponse,
flow_name: Authenticate,
resource_common_data: PaymentFlowData,
flow_request: PaymentsAuthenticateData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
| {
"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": 550,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_575_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<PreAuthenticate, PaymentFlowData, PaymentsPreAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!(
"{}risk/v1/authentication-setups",
self.connector_base_url_payments(req)
))
}
}
);
| {
"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": 575,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_575_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<PreAuthenticate, PaymentFlowData, PaymentsPreAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!(
"{}risk/v1/authentication-setups",
self.connector_base_url_payments(req)
))
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourceAuthEnrollmentRequest<T>),
curl_response: CybersourceAuthenticateResponse,
flow_name: Authenticate,
resource_common_data: PaymentFlowData,
flow_request: PaymentsAuthenticateData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
| {
"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": 575,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_575_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<PreAuthenticate, PaymentFlowData, PaymentsPreAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!(
"{}risk/v1/authentication-setups",
self.connector_base_url_payments(req)
))
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourceAuthEnrollmentRequest<T>),
curl_response: CybersourceAuthenticateResponse,
flow_name: Authenticate,
resource_common_data: PaymentFlowData,
flow_request: PaymentsAuthenticateData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<Authenticate, PaymentFlowData, PaymentsAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<Authenticate, PaymentFlowData, PaymentsAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!(
"{}risk/v1/authentications",
self.connector_base_url_payments(req)
))
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourceAuthValidateRequest<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": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 575,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_600_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<Authenticate, PaymentFlowData, PaymentsAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<Authenticate, PaymentFlowData, PaymentsAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!(
"{}risk/v1/authentications",
| {
"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": 600,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_600_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<Authenticate, PaymentFlowData, PaymentsAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<Authenticate, PaymentFlowData, PaymentsAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!(
"{}risk/v1/authentications",
self.connector_base_url_payments(req)
))
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourceAuthValidateRequest<T>),
curl_response: CybersourcePostAuthenticateResponse,
flow_name: PostAuthenticate,
resource_common_data: PaymentFlowData,
flow_request: PaymentsPostAuthenticateData<T>,
flow_response: PaymentsResponseData,
| {
"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": 600,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_600_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<Authenticate, PaymentFlowData, PaymentsAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<Authenticate, PaymentFlowData, PaymentsAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!(
"{}risk/v1/authentications",
self.connector_base_url_payments(req)
))
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourceAuthValidateRequest<T>),
curl_response: CybersourcePostAuthenticateResponse,
flow_name: PostAuthenticate,
resource_common_data: PaymentFlowData,
flow_request: PaymentsPostAuthenticateData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<PostAuthenticate, PaymentFlowData, PaymentsPostAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<PostAuthenticate, PaymentFlowData, PaymentsPostAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!(
"{}risk/v1/authentication-results",
self.connector_base_url_payments(req)
))
}
}
| {
"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": 600,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_625_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
curl_response: CybersourcePostAuthenticateResponse,
flow_name: PostAuthenticate,
resource_common_data: PaymentFlowData,
flow_request: PaymentsPostAuthenticateData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<PostAuthenticate, PaymentFlowData, PaymentsPostAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
| {
"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": 625,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_625_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
curl_response: CybersourcePostAuthenticateResponse,
flow_name: PostAuthenticate,
resource_common_data: PaymentFlowData,
flow_request: PaymentsPostAuthenticateData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<PostAuthenticate, PaymentFlowData, PaymentsPostAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<PostAuthenticate, PaymentFlowData, PaymentsPostAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!(
"{}risk/v1/authentication-results",
self.connector_base_url_payments(req)
))
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
| {
"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": 625,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_625_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
curl_response: CybersourcePostAuthenticateResponse,
flow_name: PostAuthenticate,
resource_common_data: PaymentFlowData,
flow_request: PaymentsPostAuthenticateData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<PostAuthenticate, PaymentFlowData, PaymentsPostAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<PostAuthenticate, PaymentFlowData, PaymentsPostAuthenticateData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!(
"{}risk/v1/authentication-results",
self.connector_base_url_payments(req)
))
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourceZeroMandateRequest<T>),
curl_response: CybersourceSetupMandateResponse,
flow_name: SetupMandate,
resource_common_data: PaymentFlowData,
flow_request: SetupMandateRequestData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<SetupMandate, PaymentFlowData, SetupMandateRequestData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<SetupMandate, PaymentFlowData, SetupMandateRequestData<T>, PaymentsResponseData>,
| {
"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": 625,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_650_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourceZeroMandateRequest<T>),
curl_response: CybersourceSetupMandateResponse,
flow_name: SetupMandate,
resource_common_data: PaymentFlowData,
flow_request: SetupMandateRequestData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
| {
"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": 650,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_650_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourceZeroMandateRequest<T>),
curl_response: CybersourceSetupMandateResponse,
flow_name: SetupMandate,
resource_common_data: PaymentFlowData,
flow_request: SetupMandateRequestData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<SetupMandate, PaymentFlowData, SetupMandateRequestData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<SetupMandate, PaymentFlowData, SetupMandateRequestData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!("{}pts/v2/payments/", self.connector_base_url_payments(req)))
}
}
);
| {
"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": 650,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_650_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourceZeroMandateRequest<T>),
curl_response: CybersourceSetupMandateResponse,
flow_name: SetupMandate,
resource_common_data: PaymentFlowData,
flow_request: SetupMandateRequestData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<SetupMandate, PaymentFlowData, SetupMandateRequestData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<SetupMandate, PaymentFlowData, SetupMandateRequestData<T>, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!("{}pts/v2/payments/", self.connector_base_url_payments(req)))
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_response: CybersourceTransactionResponse,
flow_name: PSync,
resource_common_data: PaymentFlowData,
flow_request: PaymentsSyncData,
flow_response: PaymentsResponseData,
http_method: Get,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
| {
"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": 650,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_675_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!("{}pts/v2/payments/", self.connector_base_url_payments(req)))
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_response: CybersourceTransactionResponse,
flow_name: PSync,
resource_common_data: PaymentFlowData,
flow_request: PaymentsSyncData,
flow_response: PaymentsResponseData,
http_method: Get,
| {
"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": 675,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_675_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!("{}pts/v2/payments/", self.connector_base_url_payments(req)))
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_response: CybersourceTransactionResponse,
flow_name: PSync,
resource_common_data: PaymentFlowData,
flow_request: PaymentsSyncData,
flow_response: PaymentsResponseData,
http_method: Get,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
let connector_payment_id = req
.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": 675,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_8636526284244175173_675_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/cybersource.rs
) -> CustomResult<String, errors::ConnectorError> {
Ok(format!("{}pts/v2/payments/", self.connector_base_url_payments(req)))
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_response: CybersourceTransactionResponse,
flow_name: PSync,
resource_common_data: PaymentFlowData,
flow_request: PaymentsSyncData,
flow_response: PaymentsResponseData,
http_method: Get,
generic_type: T,
[PaymentMethodDataTypes + Debug + Sync + Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
) -> CustomResult<String, errors::ConnectorError> {
let connector_payment_id = req
.request
.connector_transaction_id
.get_connector_transaction_id()
.change_context(errors::ConnectorError::MissingConnectorTransactionID)?;
Ok(format!(
"{}tss/v2/transactions/{}",
self.connector_base_url_payments(req),
connector_payment_id
))
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Cybersource,
curl_request: Json(CybersourcePaymentsCaptureRequest),
curl_response: CybersourceCaptureResponse,
flow_name: Capture,
resource_common_data: PaymentFlowData,
flow_request: PaymentsCaptureData,
| {
"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": 675,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.