id stringlengths 20 153 | type stringclasses 1
value | granularity stringclasses 14
values | content stringlengths 16 84.3k | metadata dict |
|---|---|---|---|---|
connector-service_snippet_-5825213018000437869_300_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> SubmitEvidenceV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> DisputeDefend for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> RefundSyncV2 for Worldpayvantiv<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": 300,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_300_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> SubmitEvidenceV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> DisputeDefend for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> RefundSyncV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> AcceptDispute for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
| {
"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_-5825213018000437869_325_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> RefundSyncV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::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": 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_-5825213018000437869_325_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> RefundSyncV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> AcceptDispute for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> RepeatPaymentV2 for Worldpayvantiv<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": 325,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_325_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> RefundSyncV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> AcceptDispute for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> RepeatPaymentV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentOrderCreate for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentAuthorizeV2<T> for Worldpayvantiv<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": 325,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_350_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
+ Serialize,
> RepeatPaymentV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentOrderCreate for Worldpayvantiv<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": 350,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_350_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
+ Serialize,
> RepeatPaymentV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentOrderCreate for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentAuthorizeV2<T> for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
| {
"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_-5825213018000437869_350_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
+ Serialize,
> RepeatPaymentV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentOrderCreate for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentAuthorizeV2<T> for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentSyncV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentVoidV2 for Worldpayvantiv<T>
{
}
impl<
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 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_-5825213018000437869_375_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentSyncV2 for Worldpayvantiv<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": 375,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_375_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentSyncV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentVoidV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
| {
"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_-5825213018000437869_375_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentSyncV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentVoidV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentVoidPostCaptureV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> interfaces::connector_types::PaymentTokenV2<T> for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 375,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_400_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentVoidPostCaptureV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
| {
"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_-5825213018000437869_400_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentVoidPostCaptureV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> interfaces::connector_types::PaymentTokenV2<T> for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> interfaces::connector_types::PaymentAccessToken for Worldpayvantiv<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": 400,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_400_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentVoidPostCaptureV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> interfaces::connector_types::PaymentTokenV2<T> for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> interfaces::connector_types::PaymentAccessToken for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> RefundV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::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": 400,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_425_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
+ std::marker::Send
+ 'static
+ Serialize,
> interfaces::connector_types::PaymentAccessToken for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> RefundV2 for Worldpayvantiv<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": 425,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_425_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
+ std::marker::Send
+ 'static
+ Serialize,
> interfaces::connector_types::PaymentAccessToken for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> RefundV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentCapture for Worldpayvantiv<T>
{
}
// Basic connector implementation
| {
"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_-5825213018000437869_425_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
+ std::marker::Send
+ 'static
+ Serialize,
> interfaces::connector_types::PaymentAccessToken for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> RefundV2 for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> PaymentCapture for Worldpayvantiv<T>
{
}
// Basic connector implementation
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorCommon for Worldpayvantiv<T>
{
fn id(&self) -> &'static str {
"worldpayvantiv"
}
fn common_get_content_type(&self) -> &'static str {
"text/xml"
}
fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
connectors.worldpayvantiv.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": 425,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_450_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
> PaymentCapture for Worldpayvantiv<T>
{
}
// Basic connector implementation
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorCommon for Worldpayvantiv<T>
{
fn id(&self) -> &'static 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": 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_-5825213018000437869_450_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
> PaymentCapture for Worldpayvantiv<T>
{
}
// Basic connector implementation
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorCommon for Worldpayvantiv<T>
{
fn id(&self) -> &'static str {
"worldpayvantiv"
}
fn common_get_content_type(&self) -> &'static str {
"text/xml"
}
fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
connectors.worldpayvantiv.base_url.as_ref()
}
fn build_error_response(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
| {
"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_-5825213018000437869_450_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
> PaymentCapture for Worldpayvantiv<T>
{
}
// Basic connector implementation
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorCommon for Worldpayvantiv<T>
{
fn id(&self) -> &'static str {
"worldpayvantiv"
}
fn common_get_content_type(&self) -> &'static str {
"text/xml"
}
fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
connectors.worldpayvantiv.base_url.as_ref()
}
fn build_error_response(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
let response_str = std::str::from_utf8(&res.response)
.map_err(|_| ConnectorError::ResponseDeserializationFailed)?;
let response: transformers::CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.map_err(|_parse_error| ConnectorError::ResponseDeserializationFailed)?;
with_response_body!(event_builder, response);
Ok(ErrorResponse {
status_code: res.status_code,
code: response.response_code,
message: response.message.clone(),
reason: Some(response.message),
attempt_status: None,
connector_transaction_id: None,
network_decline_code: None,
network_advice_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": 450,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_475_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
fn build_error_response(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
let response_str = std::str::from_utf8(&res.response)
.map_err(|_| ConnectorError::ResponseDeserializationFailed)?;
let response: transformers::CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.map_err(|_parse_error| ConnectorError::ResponseDeserializationFailed)?;
with_response_body!(event_builder, response);
Ok(ErrorResponse {
status_code: res.status_code,
| {
"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_-5825213018000437869_475_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
fn build_error_response(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
let response_str = std::str::from_utf8(&res.response)
.map_err(|_| ConnectorError::ResponseDeserializationFailed)?;
let response: transformers::CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.map_err(|_parse_error| ConnectorError::ResponseDeserializationFailed)?;
with_response_body!(event_builder, response);
Ok(ErrorResponse {
status_code: res.status_code,
code: response.response_code,
message: response.message.clone(),
reason: Some(response.message),
attempt_status: None,
connector_transaction_id: None,
network_decline_code: None,
network_advice_code: None,
network_error_message: None,
})
}
fn get_currency_unit(&self) -> common_enums::CurrencyUnit {
common_enums::CurrencyUnit::Minor
}
}
| {
"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_-5825213018000437869_475_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
fn build_error_response(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
let response_str = std::str::from_utf8(&res.response)
.map_err(|_| ConnectorError::ResponseDeserializationFailed)?;
let response: transformers::CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.map_err(|_parse_error| ConnectorError::ResponseDeserializationFailed)?;
with_response_body!(event_builder, response);
Ok(ErrorResponse {
status_code: res.status_code,
code: response.response_code,
message: response.message.clone(),
reason: Some(response.message),
attempt_status: None,
connector_transaction_id: None,
network_decline_code: None,
network_advice_code: None,
network_error_message: None,
})
}
fn get_currency_unit(&self) -> common_enums::CurrencyUnit {
common_enums::CurrencyUnit::Minor
}
}
// Define connector prerequisites for payment flows (XML-based)
// Group flows by unique request/response combinations to avoid duplicate templating structs
macros::create_all_prerequisites!(
connector_name: Worldpayvantiv,
generic_type: T,
api: [
(
flow: Authorize,
request_body: WorldpayvantivPaymentsRequest<T>,
response_body: CnpOnlineResponse,
router_data: RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
),
(
flow: PSync,
response_body: VantivSyncResponse,
router_data: RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
)
],
amount_converters: [
| {
"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_-5825213018000437869_500_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
fn get_currency_unit(&self) -> common_enums::CurrencyUnit {
common_enums::CurrencyUnit::Minor
}
}
// Define connector prerequisites for payment flows (XML-based)
// Group flows by unique request/response combinations to avoid duplicate templating structs
macros::create_all_prerequisites!(
connector_name: Worldpayvantiv,
generic_type: T,
api: [
(
flow: Authorize,
request_body: WorldpayvantivPaymentsRequest<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": 500,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_500_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
fn get_currency_unit(&self) -> common_enums::CurrencyUnit {
common_enums::CurrencyUnit::Minor
}
}
// Define connector prerequisites for payment flows (XML-based)
// Group flows by unique request/response combinations to avoid duplicate templating structs
macros::create_all_prerequisites!(
connector_name: Worldpayvantiv,
generic_type: T,
api: [
(
flow: Authorize,
request_body: WorldpayvantivPaymentsRequest<T>,
response_body: CnpOnlineResponse,
router_data: RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
),
(
flow: PSync,
response_body: VantivSyncResponse,
router_data: RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
)
],
amount_converters: [
amount_converter: MinorUnit
],
member_functions: {
fn preprocess_response_bytes<F, FCD, Req, Res>(
&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": 500,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_500_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
fn get_currency_unit(&self) -> common_enums::CurrencyUnit {
common_enums::CurrencyUnit::Minor
}
}
// Define connector prerequisites for payment flows (XML-based)
// Group flows by unique request/response combinations to avoid duplicate templating structs
macros::create_all_prerequisites!(
connector_name: Worldpayvantiv,
generic_type: T,
api: [
(
flow: Authorize,
request_body: WorldpayvantivPaymentsRequest<T>,
response_body: CnpOnlineResponse,
router_data: RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
),
(
flow: PSync,
response_body: VantivSyncResponse,
router_data: RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
)
],
amount_converters: [
amount_converter: MinorUnit
],
member_functions: {
fn preprocess_response_bytes<F, FCD, Req, Res>(
&self,
_req: &RouterDataV2<F, FCD, Req, Res>,
bytes: bytes::Bytes,
) -> CustomResult<bytes::Bytes, errors::ConnectorError> {
// Convert XML responses to JSON format for the macro's JSON parser
let response_str = std::str::from_utf8(&bytes)
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
// Parse XML to struct, then serialize back to JSON
if response_str.trim().starts_with("<?xml") || response_str.trim().starts_with("<") {
// This is an XML response - convert to JSON
let xml_response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
let json_bytes = serde_json::to_vec(&xml_response)
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
Ok(bytes::Bytes::from(json_bytes))
} else {
// This is already JSON or another format
Ok(bytes)
| {
"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_-5825213018000437869_525_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
amount_converter: MinorUnit
],
member_functions: {
fn preprocess_response_bytes<F, FCD, Req, Res>(
&self,
_req: &RouterDataV2<F, FCD, Req, Res>,
bytes: bytes::Bytes,
) -> CustomResult<bytes::Bytes, errors::ConnectorError> {
// Convert XML responses to JSON format for the macro's JSON parser
let response_str = std::str::from_utf8(&bytes)
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
// Parse XML to struct, then serialize back to JSON
if response_str.trim().starts_with("<?xml") || response_str.trim().starts_with("<") {
// This is an XML response - convert to JSON
| {
"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_-5825213018000437869_525_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
amount_converter: MinorUnit
],
member_functions: {
fn preprocess_response_bytes<F, FCD, Req, Res>(
&self,
_req: &RouterDataV2<F, FCD, Req, Res>,
bytes: bytes::Bytes,
) -> CustomResult<bytes::Bytes, errors::ConnectorError> {
// Convert XML responses to JSON format for the macro's JSON parser
let response_str = std::str::from_utf8(&bytes)
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
// Parse XML to struct, then serialize back to JSON
if response_str.trim().starts_with("<?xml") || response_str.trim().starts_with("<") {
// This is an XML response - convert to JSON
let xml_response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
let json_bytes = serde_json::to_vec(&xml_response)
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
Ok(bytes::Bytes::from(json_bytes))
} else {
// This is already JSON or another format
Ok(bytes)
}
}
pub fn build_headers<F, FCD, Req, Res>(
&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": 525,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_525_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
amount_converter: MinorUnit
],
member_functions: {
fn preprocess_response_bytes<F, FCD, Req, Res>(
&self,
_req: &RouterDataV2<F, FCD, Req, Res>,
bytes: bytes::Bytes,
) -> CustomResult<bytes::Bytes, errors::ConnectorError> {
// Convert XML responses to JSON format for the macro's JSON parser
let response_str = std::str::from_utf8(&bytes)
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
// Parse XML to struct, then serialize back to JSON
if response_str.trim().starts_with("<?xml") || response_str.trim().starts_with("<") {
// This is an XML response - convert to JSON
let xml_response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
let json_bytes = serde_json::to_vec(&xml_response)
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
Ok(bytes::Bytes::from(json_bytes))
} else {
// This is already JSON or another format
Ok(bytes)
}
}
pub fn build_headers<F, FCD, Req, Res>(
&self,
req: &RouterDataV2<F, FCD, Req, Res>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
let mut header = vec![];
let mut api_key = self.get_auth_header(&req.connector_auth_type)?;
header.append(&mut api_key);
Ok(header)
}
pub fn connector_base_url_payments<F, Req, Res>(
&self,
req: &RouterDataV2<F, PaymentFlowData, Req, Res>,
) -> String {
let base_url = &req.resource_common_data.connectors.worldpayvantiv.base_url;
base_url.to_string()
}
pub fn connector_base_url_refunds<F, Req, Res>(
&self,
req: &RouterDataV2<F, RefundFlowData, Req, Res>,
) -> 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": 525,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_550_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
}
pub fn build_headers<F, FCD, Req, Res>(
&self,
req: &RouterDataV2<F, FCD, Req, Res>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
let mut header = vec![];
let mut api_key = self.get_auth_header(&req.connector_auth_type)?;
header.append(&mut api_key);
Ok(header)
}
pub fn connector_base_url_payments<F, Req, Res>(
&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": 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_-5825213018000437869_550_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
}
pub fn build_headers<F, FCD, Req, Res>(
&self,
req: &RouterDataV2<F, FCD, Req, Res>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
let mut header = vec![];
let mut api_key = self.get_auth_header(&req.connector_auth_type)?;
header.append(&mut api_key);
Ok(header)
}
pub fn connector_base_url_payments<F, Req, Res>(
&self,
req: &RouterDataV2<F, PaymentFlowData, Req, Res>,
) -> String {
let base_url = &req.resource_common_data.connectors.worldpayvantiv.base_url;
base_url.to_string()
}
pub fn connector_base_url_refunds<F, Req, Res>(
&self,
req: &RouterDataV2<F, RefundFlowData, Req, Res>,
) -> String {
req.resource_common_data.connectors.worldpayvantiv.base_url.to_string()
}
pub fn get_auth_header(
&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_-5825213018000437869_550_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
}
pub fn build_headers<F, FCD, Req, Res>(
&self,
req: &RouterDataV2<F, FCD, Req, Res>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
let mut header = vec![];
let mut api_key = self.get_auth_header(&req.connector_auth_type)?;
header.append(&mut api_key);
Ok(header)
}
pub fn connector_base_url_payments<F, Req, Res>(
&self,
req: &RouterDataV2<F, PaymentFlowData, Req, Res>,
) -> String {
let base_url = &req.resource_common_data.connectors.worldpayvantiv.base_url;
base_url.to_string()
}
pub fn connector_base_url_refunds<F, Req, Res>(
&self,
req: &RouterDataV2<F, RefundFlowData, Req, Res>,
) -> String {
req.resource_common_data.connectors.worldpayvantiv.base_url.to_string()
}
pub fn get_auth_header(
&self,
auth_type: &ConnectorAuthType,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
let auth = WorldpayvantivAuthType::try_from(auth_type)?;
let auth_key = format!("{}:{}", auth.user.peek(), auth.password.peek());
let auth_header = format!("Basic {}", BASE64_ENGINE.encode(auth_key));
Ok(vec![(
headers::AUTHORIZATION.to_string(),
auth_header.into(),
)])
}
}
);
// Implement the specific flows
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Worldpayvantiv,
curl_request: Xml(WorldpayvantivPaymentsRequest<T>),
curl_response: CnpOnlineResponse,
flow_name: Authorize,
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 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_-5825213018000437869_575_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
req.resource_common_data.connectors.worldpayvantiv.base_url.to_string()
}
pub fn get_auth_header(
&self,
auth_type: &ConnectorAuthType,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
let auth = WorldpayvantivAuthType::try_from(auth_type)?;
let auth_key = format!("{}:{}", auth.user.peek(), auth.password.peek());
let auth_header = format!("Basic {}", BASE64_ENGINE.encode(auth_key));
Ok(vec![(
headers::AUTHORIZATION.to_string(),
auth_header.into(),
)])
}
| {
"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_-5825213018000437869_575_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
req.resource_common_data.connectors.worldpayvantiv.base_url.to_string()
}
pub fn get_auth_header(
&self,
auth_type: &ConnectorAuthType,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
let auth = WorldpayvantivAuthType::try_from(auth_type)?;
let auth_key = format!("{}:{}", auth.user.peek(), auth.password.peek());
let auth_header = format!("Basic {}", BASE64_ENGINE.encode(auth_key));
Ok(vec![(
headers::AUTHORIZATION.to_string(),
auth_header.into(),
)])
}
}
);
// Implement the specific flows
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Worldpayvantiv,
curl_request: Xml(WorldpayvantivPaymentsRequest<T>),
curl_response: CnpOnlineResponse,
flow_name: Authorize,
resource_common_data: PaymentFlowData,
flow_request: PaymentsAuthorizeData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
preprocess_response: true,
| {
"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_-5825213018000437869_575_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
req.resource_common_data.connectors.worldpayvantiv.base_url.to_string()
}
pub fn get_auth_header(
&self,
auth_type: &ConnectorAuthType,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
let auth = WorldpayvantivAuthType::try_from(auth_type)?;
let auth_key = format!("{}:{}", auth.user.peek(), auth.password.peek());
let auth_header = format!("Basic {}", BASE64_ENGINE.encode(auth_key));
Ok(vec![(
headers::AUTHORIZATION.to_string(),
auth_header.into(),
)])
}
}
);
// Implement the specific flows
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Worldpayvantiv,
curl_request: Xml(WorldpayvantivPaymentsRequest<T>),
curl_response: CnpOnlineResponse,
flow_name: Authorize,
resource_common_data: PaymentFlowData,
flow_request: PaymentsAuthorizeData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
preprocess_response: true,
generic_type: T,
[PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
) -> CustomResult<String, ConnectorError> {
Ok(self.connector_base_url_payments(req).to_string())
}
}
);
macros::macro_connector_implementation!(
| {
"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_-5825213018000437869_600_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
resource_common_data: PaymentFlowData,
flow_request: PaymentsAuthorizeData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
preprocess_response: true,
generic_type: T,
[PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, 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": 600,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_600_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
resource_common_data: PaymentFlowData,
flow_request: PaymentsAuthorizeData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
preprocess_response: true,
generic_type: T,
[PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
) -> CustomResult<String, ConnectorError> {
Ok(self.connector_base_url_payments(req).to_string())
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Worldpayvantiv,
curl_response: VantivSyncResponse,
flow_name: PSync,
resource_common_data: PaymentFlowData,
| {
"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_-5825213018000437869_600_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
resource_common_data: PaymentFlowData,
flow_request: PaymentsAuthorizeData<T>,
flow_response: PaymentsResponseData,
http_method: Post,
preprocess_response: true,
generic_type: T,
[PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.build_headers(req)
}
fn get_url(
&self,
req: &RouterDataV2<Authorize, PaymentFlowData, PaymentsAuthorizeData<T>, PaymentsResponseData>,
) -> CustomResult<String, ConnectorError> {
Ok(self.connector_base_url_payments(req).to_string())
}
}
);
macros::macro_connector_implementation!(
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Worldpayvantiv,
curl_response: VantivSyncResponse,
flow_name: PSync,
resource_common_data: PaymentFlowData,
flow_request: PaymentsSyncData,
flow_response: PaymentsResponseData,
http_method: Get,
generic_type: T,
[PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.get_auth_header(&req.connector_auth_type)
}
fn get_url(
&self,
req: &RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
) -> CustomResult<String, ConnectorError> {
let txn_id = req.request.get_connector_transaction_id()
.change_context(ConnectorError::MissingConnectorTransactionID)?;
let secondary_base_url = req.resource_common_data.connectors.worldpayvantiv.secondary_base_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": 600,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_625_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Worldpayvantiv,
curl_response: VantivSyncResponse,
flow_name: PSync,
resource_common_data: PaymentFlowData,
flow_request: PaymentsSyncData,
flow_response: PaymentsResponseData,
http_method: Get,
generic_type: T,
[PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, 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": 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_-5825213018000437869_625_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Worldpayvantiv,
curl_response: VantivSyncResponse,
flow_name: PSync,
resource_common_data: PaymentFlowData,
flow_request: PaymentsSyncData,
flow_response: PaymentsResponseData,
http_method: Get,
generic_type: T,
[PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.get_auth_header(&req.connector_auth_type)
}
fn get_url(
&self,
req: &RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
) -> CustomResult<String, ConnectorError> {
let txn_id = req.request.get_connector_transaction_id()
.change_context(ConnectorError::MissingConnectorTransactionID)?;
let secondary_base_url = req.resource_common_data.connectors.worldpayvantiv.secondary_base_url
.as_ref()
.unwrap_or(&req.resource_common_data.connectors.worldpayvantiv.base_url);
Ok(format!(
"{secondary_base_url}/reports/dtrPaymentStatus/{txn_id}"
))
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 625,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_625_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
connector_default_implementations: [get_content_type, get_error_response_v2],
connector: Worldpayvantiv,
curl_response: VantivSyncResponse,
flow_name: PSync,
resource_common_data: PaymentFlowData,
flow_request: PaymentsSyncData,
flow_response: PaymentsResponseData,
http_method: Get,
generic_type: T,
[PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize],
other_functions: {
fn get_headers(
&self,
req: &RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.get_auth_header(&req.connector_auth_type)
}
fn get_url(
&self,
req: &RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>,
) -> CustomResult<String, ConnectorError> {
let txn_id = req.request.get_connector_transaction_id()
.change_context(ConnectorError::MissingConnectorTransactionID)?;
let secondary_base_url = req.resource_common_data.connectors.worldpayvantiv.secondary_base_url
.as_ref()
.unwrap_or(&req.resource_common_data.connectors.worldpayvantiv.base_url);
Ok(format!(
"{secondary_base_url}/reports/dtrPaymentStatus/{txn_id}"
))
}
}
);
// Manual implementations for flows that share request/response types
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>
for Worldpayvantiv<T>
{
fn get_headers(
&self,
req: &RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, 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": 625,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_650_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
.as_ref()
.unwrap_or(&req.resource_common_data.connectors.worldpayvantiv.base_url);
Ok(format!(
"{secondary_base_url}/reports/dtrPaymentStatus/{txn_id}"
))
}
}
);
// Manual implementations for flows that share request/response types
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
| {
"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_-5825213018000437869_650_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
.as_ref()
.unwrap_or(&req.resource_common_data.connectors.worldpayvantiv.base_url);
Ok(format!(
"{secondary_base_url}/reports/dtrPaymentStatus/{txn_id}"
))
}
}
);
// Manual implementations for flows that share request/response types
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>
for Worldpayvantiv<T>
{
fn get_headers(
&self,
req: &RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.build_headers(req)
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 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_-5825213018000437869_650_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
.as_ref()
.unwrap_or(&req.resource_common_data.connectors.worldpayvantiv.base_url);
Ok(format!(
"{secondary_base_url}/reports/dtrPaymentStatus/{txn_id}"
))
}
}
);
// Manual implementations for flows that share request/response types
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>
for Worldpayvantiv<T>
{
fn get_headers(
&self,
req: &RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.build_headers(req)
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
fn get_url(
&self,
req: &RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
) -> CustomResult<String, ConnectorError> {
Ok(self.connector_base_url_payments(req).to_string())
}
fn get_request_body(
&self,
req: &RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
let request = WorldpayvantivPaymentsRequest::try_from(WorldpayvantivRouterData {
router_data: req.clone(),
connector: self.clone(),
})?;
Ok(Some(RequestContent::Xml(Box::new(request))))
}
fn handle_response_v2(
| {
"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_-5825213018000437869_675_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
fn get_url(
&self,
req: &RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
) -> CustomResult<String, ConnectorError> {
Ok(self.connector_base_url_payments(req).to_string())
}
fn get_request_body(
&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": 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_-5825213018000437869_675_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
fn get_url(
&self,
req: &RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
) -> CustomResult<String, ConnectorError> {
Ok(self.connector_base_url_payments(req).to_string())
}
fn get_request_body(
&self,
req: &RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
let request = WorldpayvantivPaymentsRequest::try_from(WorldpayvantivRouterData {
router_data: req.clone(),
connector: self.clone(),
})?;
Ok(Some(RequestContent::Xml(Box::new(request))))
}
fn handle_response_v2(
&self,
data: &RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
| {
"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_-5825213018000437869_675_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
fn get_url(
&self,
req: &RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
) -> CustomResult<String, ConnectorError> {
Ok(self.connector_base_url_payments(req).to_string())
}
fn get_request_body(
&self,
req: &RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
let request = WorldpayvantivPaymentsRequest::try_from(WorldpayvantivRouterData {
router_data: req.clone(),
connector: self.clone(),
})?;
Ok(Some(RequestContent::Xml(Box::new(request))))
}
fn handle_response_v2(
&self,
data: &RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
ConnectorError,
> {
let response_str = std::str::from_utf8(&res.response)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
let response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&response)
}
RouterDataV2::try_from(ResponseRouterData {
response,
router_data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response_v2(
&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": 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
} |
connector-service_snippet_-5825213018000437869_700_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
&self,
data: &RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
ConnectorError,
> {
let response_str = std::str::from_utf8(&res.response)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
let response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&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": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 700,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_700_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
&self,
data: &RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
ConnectorError,
> {
let response_str = std::str::from_utf8(&res.response)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
let response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&response)
}
RouterDataV2::try_from(ResponseRouterData {
response,
router_data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response_v2(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
| {
"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": 700,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_700_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
&self,
data: &RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>,
ConnectorError,
> {
let response_str = std::str::from_utf8(&res.response)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
let response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&response)
}
RouterDataV2::try_from(ResponseRouterData {
response,
router_data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response_v2(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Post
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>
for Worldpayvantiv<T>
{
fn get_headers(
&self,
req: &RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, 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": 700,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_725_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Post
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
| {
"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": 725,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_725_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Post
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>
for Worldpayvantiv<T>
{
fn get_headers(
&self,
req: &RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.build_headers(req)
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 725,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_725_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Post
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>
for Worldpayvantiv<T>
{
fn get_headers(
&self,
req: &RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.build_headers(req)
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
fn get_url(
&self,
req: &RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
) -> CustomResult<String, ConnectorError> {
Ok(self.connector_base_url_payments(req).to_string())
}
fn get_request_body(
&self,
req: &RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
let request = WorldpayvantivPaymentsRequest::try_from(WorldpayvantivRouterData {
router_data: req.clone(),
connector: self.clone(),
})?;
Ok(Some(RequestContent::Xml(Box::new(request))))
}
fn handle_response_v2(
| {
"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": 725,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_750_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
fn get_url(
&self,
req: &RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
) -> CustomResult<String, ConnectorError> {
Ok(self.connector_base_url_payments(req).to_string())
}
fn get_request_body(
&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": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 750,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_750_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
fn get_url(
&self,
req: &RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
) -> CustomResult<String, ConnectorError> {
Ok(self.connector_base_url_payments(req).to_string())
}
fn get_request_body(
&self,
req: &RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
let request = WorldpayvantivPaymentsRequest::try_from(WorldpayvantivRouterData {
router_data: req.clone(),
connector: self.clone(),
})?;
Ok(Some(RequestContent::Xml(Box::new(request))))
}
fn handle_response_v2(
&self,
data: &RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
| {
"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": 750,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_750_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
fn get_url(
&self,
req: &RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
) -> CustomResult<String, ConnectorError> {
Ok(self.connector_base_url_payments(req).to_string())
}
fn get_request_body(
&self,
req: &RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
let request = WorldpayvantivPaymentsRequest::try_from(WorldpayvantivRouterData {
router_data: req.clone(),
connector: self.clone(),
})?;
Ok(Some(RequestContent::Xml(Box::new(request))))
}
fn handle_response_v2(
&self,
data: &RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
ConnectorError,
> {
let response_str = std::str::from_utf8(&res.response)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
let response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&response)
}
RouterDataV2::try_from(ResponseRouterData {
response,
router_data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response_v2(
&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": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 750,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_775_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
&self,
data: &RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
ConnectorError,
> {
let response_str = std::str::from_utf8(&res.response)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
let response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&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": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 775,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_775_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
&self,
data: &RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
ConnectorError,
> {
let response_str = std::str::from_utf8(&res.response)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
let response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&response)
}
RouterDataV2::try_from(ResponseRouterData {
response,
router_data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response_v2(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
| {
"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": 775,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_775_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
&self,
data: &RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<Void, PaymentFlowData, PaymentVoidData, PaymentsResponseData>,
ConnectorError,
> {
let response_str = std::str::from_utf8(&res.response)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
let response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&response)
}
RouterDataV2::try_from(ResponseRouterData {
response,
router_data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response_v2(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Post
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
ConnectorIntegrationV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
> for Worldpayvantiv<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": 775,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_800_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Post
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
| {
"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": 800,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_800_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Post
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
ConnectorIntegrationV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
> for Worldpayvantiv<T>
{
fn get_headers(
&self,
req: &RouterDataV2<
VoidPC,
PaymentFlowData,
| {
"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": 800,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_800_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Post
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
ConnectorIntegrationV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
> for Worldpayvantiv<T>
{
fn get_headers(
&self,
req: &RouterDataV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.build_headers(req)
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
fn get_url(
&self,
req: &RouterDataV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
>,
) -> CustomResult<String, ConnectorError> {
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 800,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_825_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
fn get_headers(
&self,
req: &RouterDataV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.build_headers(req)
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 825,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_825_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
fn get_headers(
&self,
req: &RouterDataV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.build_headers(req)
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
fn get_url(
&self,
req: &RouterDataV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
>,
) -> CustomResult<String, ConnectorError> {
Ok(self.connector_base_url_payments(req).to_string())
}
fn get_request_body(
&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": 825,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_825_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
fn get_headers(
&self,
req: &RouterDataV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.build_headers(req)
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
fn get_url(
&self,
req: &RouterDataV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
>,
) -> CustomResult<String, ConnectorError> {
Ok(self.connector_base_url_payments(req).to_string())
}
fn get_request_body(
&self,
req: &RouterDataV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
let request = WorldpayvantivPaymentsRequest::try_from(WorldpayvantivRouterData {
router_data: req.clone(),
connector: self.clone(),
})?;
Ok(Some(RequestContent::Xml(Box::new(request))))
}
fn handle_response_v2(
&self,
data: &RouterDataV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
| {
"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": 825,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_850_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
Ok(self.connector_base_url_payments(req).to_string())
}
fn get_request_body(
&self,
req: &RouterDataV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
let request = WorldpayvantivPaymentsRequest::try_from(WorldpayvantivRouterData {
router_data: req.clone(),
connector: self.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": 850,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_850_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
Ok(self.connector_base_url_payments(req).to_string())
}
fn get_request_body(
&self,
req: &RouterDataV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
let request = WorldpayvantivPaymentsRequest::try_from(WorldpayvantivRouterData {
router_data: req.clone(),
connector: self.clone(),
})?;
Ok(Some(RequestContent::Xml(Box::new(request))))
}
fn handle_response_v2(
&self,
data: &RouterDataV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
| {
"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": 850,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_850_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
Ok(self.connector_base_url_payments(req).to_string())
}
fn get_request_body(
&self,
req: &RouterDataV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
let request = WorldpayvantivPaymentsRequest::try_from(WorldpayvantivRouterData {
router_data: req.clone(),
connector: self.clone(),
})?;
Ok(Some(RequestContent::Xml(Box::new(request))))
}
fn handle_response_v2(
&self,
data: &RouterDataV2<
VoidPC,
PaymentFlowData,
PaymentsCancelPostCaptureData,
PaymentsResponseData,
>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<VoidPC, PaymentFlowData, PaymentsCancelPostCaptureData, PaymentsResponseData>,
ConnectorError,
> {
let response_str = std::str::from_utf8(&res.response)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
let response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&response)
}
RouterDataV2::try_from(ResponseRouterData {
response,
router_data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response_v2(
&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": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 850,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_875_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
PaymentsResponseData,
>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<VoidPC, PaymentFlowData, PaymentsCancelPostCaptureData, PaymentsResponseData>,
ConnectorError,
> {
let response_str = std::str::from_utf8(&res.response)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
let response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&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": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 875,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_875_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
PaymentsResponseData,
>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<VoidPC, PaymentFlowData, PaymentsCancelPostCaptureData, PaymentsResponseData>,
ConnectorError,
> {
let response_str = std::str::from_utf8(&res.response)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
let response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&response)
}
RouterDataV2::try_from(ResponseRouterData {
response,
router_data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response_v2(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
| {
"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": 875,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_875_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
PaymentsResponseData,
>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<VoidPC, PaymentFlowData, PaymentsCancelPostCaptureData, PaymentsResponseData>,
ConnectorError,
> {
let response_str = std::str::from_utf8(&res.response)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
let response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&response)
}
RouterDataV2::try_from(ResponseRouterData {
response,
router_data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response_v2(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Post
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>
for Worldpayvantiv<T>
{
fn get_headers(
&self,
req: &RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, 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": 875,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_900_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Post
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
| {
"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": 900,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_900_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Post
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>
for Worldpayvantiv<T>
{
fn get_headers(
&self,
req: &RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.build_headers(req)
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 900,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_900_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Post
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>
for Worldpayvantiv<T>
{
fn get_headers(
&self,
req: &RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.build_headers(req)
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
fn get_url(
&self,
req: &RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
) -> CustomResult<String, ConnectorError> {
Ok(self.connector_base_url_refunds(req).to_string())
}
fn get_request_body(
&self,
req: &RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
let request = WorldpayvantivPaymentsRequest::try_from(WorldpayvantivRouterData {
router_data: req.clone(),
connector: self.clone(),
})?;
Ok(Some(RequestContent::Xml(Box::new(request))))
}
fn handle_response_v2(
| {
"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": 900,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_925_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
fn get_url(
&self,
req: &RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
) -> CustomResult<String, ConnectorError> {
Ok(self.connector_base_url_refunds(req).to_string())
}
fn get_request_body(
&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": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 925,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_925_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
fn get_url(
&self,
req: &RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
) -> CustomResult<String, ConnectorError> {
Ok(self.connector_base_url_refunds(req).to_string())
}
fn get_request_body(
&self,
req: &RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
let request = WorldpayvantivPaymentsRequest::try_from(WorldpayvantivRouterData {
router_data: req.clone(),
connector: self.clone(),
})?;
Ok(Some(RequestContent::Xml(Box::new(request))))
}
fn handle_response_v2(
&self,
data: &RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
| {
"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": 925,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_925_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
fn get_content_type(&self) -> &'static str {
self.common_get_content_type()
}
fn get_url(
&self,
req: &RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
) -> CustomResult<String, ConnectorError> {
Ok(self.connector_base_url_refunds(req).to_string())
}
fn get_request_body(
&self,
req: &RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
let request = WorldpayvantivPaymentsRequest::try_from(WorldpayvantivRouterData {
router_data: req.clone(),
connector: self.clone(),
})?;
Ok(Some(RequestContent::Xml(Box::new(request))))
}
fn handle_response_v2(
&self,
data: &RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
ConnectorError,
> {
let response_str = std::str::from_utf8(&res.response)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
let response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&response)
}
RouterDataV2::try_from(ResponseRouterData {
response,
router_data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response_v2(
&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": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 925,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_950_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
&self,
data: &RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
ConnectorError,
> {
let response_str = std::str::from_utf8(&res.response)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
let response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&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": 15,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 950,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_950_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
&self,
data: &RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
ConnectorError,
> {
let response_str = std::str::from_utf8(&res.response)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
let response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&response)
}
RouterDataV2::try_from(ResponseRouterData {
response,
router_data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response_v2(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
| {
"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": 950,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_950_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
&self,
data: &RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<Refund, RefundFlowData, RefundsData, RefundsResponseData>,
ConnectorError,
> {
let response_str = std::str::from_utf8(&res.response)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
let response: CnpOnlineResponse = deserialize_xml_to_struct(response_str)
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&response)
}
RouterDataV2::try_from(ResponseRouterData {
response,
router_data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response_v2(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Post
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>
for Worldpayvantiv<T>
{
fn get_headers(
&self,
req: &RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.get_auth_header(&req.connector_auth_type)
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 50,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 950,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_975_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Post
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
| {
"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": 975,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_975_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Post
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>
for Worldpayvantiv<T>
{
fn get_headers(
&self,
req: &RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.get_auth_header(&req.connector_auth_type)
}
fn get_content_type(&self) -> &'static str {
"application/json"
}
| {
"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": 975,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_975_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Post
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>
for Worldpayvantiv<T>
{
fn get_headers(
&self,
req: &RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
) -> CustomResult<Vec<(String, Maskable<String>)>, ConnectorError> {
self.get_auth_header(&req.connector_auth_type)
}
fn get_content_type(&self) -> &'static str {
"application/json"
}
fn get_url(
&self,
req: &RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
) -> CustomResult<String, ConnectorError> {
let refund_id = req.request.connector_refund_id.clone();
let secondary_base_url = req
.resource_common_data
.connectors
.worldpayvantiv
.secondary_base_url
.as_ref()
.unwrap_or(&req.resource_common_data.connectors.worldpayvantiv.base_url);
Ok(format!(
"{}/reports/dtrPaymentStatus/{}",
secondary_base_url, refund_id
))
}
fn get_request_body(
| {
"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": 975,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_1000_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
fn get_content_type(&self) -> &'static str {
"application/json"
}
fn get_url(
&self,
req: &RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
) -> CustomResult<String, ConnectorError> {
let refund_id = req.request.connector_refund_id.clone();
let secondary_base_url = req
.resource_common_data
.connectors
.worldpayvantiv
| {
"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": 1000,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_1000_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
fn get_content_type(&self) -> &'static str {
"application/json"
}
fn get_url(
&self,
req: &RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
) -> CustomResult<String, ConnectorError> {
let refund_id = req.request.connector_refund_id.clone();
let secondary_base_url = req
.resource_common_data
.connectors
.worldpayvantiv
.secondary_base_url
.as_ref()
.unwrap_or(&req.resource_common_data.connectors.worldpayvantiv.base_url);
Ok(format!(
"{}/reports/dtrPaymentStatus/{}",
secondary_base_url, refund_id
))
}
fn get_request_body(
&self,
_req: &RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
// GET request doesn't need a body
Ok(None)
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1000,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_1000_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
}
fn get_content_type(&self) -> &'static str {
"application/json"
}
fn get_url(
&self,
req: &RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
) -> CustomResult<String, ConnectorError> {
let refund_id = req.request.connector_refund_id.clone();
let secondary_base_url = req
.resource_common_data
.connectors
.worldpayvantiv
.secondary_base_url
.as_ref()
.unwrap_or(&req.resource_common_data.connectors.worldpayvantiv.base_url);
Ok(format!(
"{}/reports/dtrPaymentStatus/{}",
secondary_base_url, refund_id
))
}
fn get_request_body(
&self,
_req: &RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
// GET request doesn't need a body
Ok(None)
}
fn handle_response_v2(
&self,
data: &RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
ConnectorError,
> {
let response: VantivSyncResponse = res
.response
.parse_struct("VantivSyncResponse")
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&response)
}
RouterDataV2::try_from(ResponseRouterData {
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": 1000,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_1025_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
&self,
_req: &RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
// GET request doesn't need a body
Ok(None)
}
fn handle_response_v2(
&self,
data: &RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
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": 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_-5825213018000437869_1025_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
&self,
_req: &RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
// GET request doesn't need a body
Ok(None)
}
fn handle_response_v2(
&self,
data: &RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
ConnectorError,
> {
let response: VantivSyncResponse = res
.response
.parse_struct("VantivSyncResponse")
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&response)
}
RouterDataV2::try_from(ResponseRouterData {
response,
router_data: data.clone(),
http_code: res.status_code,
})
}
| {
"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_-5825213018000437869_1025_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
&self,
_req: &RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
) -> CustomResult<Option<RequestContent>, ConnectorError> {
// GET request doesn't need a body
Ok(None)
}
fn handle_response_v2(
&self,
data: &RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
event_builder: Option<&mut events::Event>,
res: Response,
) -> CustomResult<
RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>,
ConnectorError,
> {
let response: VantivSyncResponse = res
.response
.parse_struct("VantivSyncResponse")
.change_context(ConnectorError::ResponseDeserializationFailed)?;
if let Some(i) = event_builder {
i.set_connector_response(&response)
}
RouterDataV2::try_from(ResponseRouterData {
response,
router_data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response_v2(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Get
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::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": 1025,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_1050_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
router_data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response_v2(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::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": 1050,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_1050_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
router_data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response_v2(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Get
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
ConnectorIntegrationV2<
SetupMandate,
PaymentFlowData,
SetupMandateRequestData<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": 1050,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
connector-service_snippet_-5825213018000437869_1050_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
router_data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response_v2(
&self,
res: Response,
event_builder: Option<&mut events::Event>,
) -> CustomResult<ErrorResponse, ConnectorError> {
self.build_error_response(res, event_builder)
}
fn get_http_method(&self) -> common_utils::request::Method {
common_utils::request::Method::Get
}
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
ConnectorIntegrationV2<
SetupMandate,
PaymentFlowData,
SetupMandateRequestData<T>,
PaymentsResponseData,
> for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
ConnectorIntegrationV2<RepeatPayment, PaymentFlowData, RepeatPaymentData, PaymentsResponseData>
for Worldpayvantiv<T>
{
}
// Empty implementations for dispute flows
impl<
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 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_-5825213018000437869_1075_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
>
ConnectorIntegrationV2<
SetupMandate,
PaymentFlowData,
SetupMandateRequestData<T>,
PaymentsResponseData,
> for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
| {
"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_-5825213018000437869_1075_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
>
ConnectorIntegrationV2<
SetupMandate,
PaymentFlowData,
SetupMandateRequestData<T>,
PaymentsResponseData,
> for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
ConnectorIntegrationV2<RepeatPayment, PaymentFlowData, RepeatPaymentData, PaymentsResponseData>
for Worldpayvantiv<T>
{
}
// Empty implementations for dispute flows
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
| {
"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_-5825213018000437869_1075_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
>
ConnectorIntegrationV2<
SetupMandate,
PaymentFlowData,
SetupMandateRequestData<T>,
PaymentsResponseData,
> for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
ConnectorIntegrationV2<RepeatPayment, PaymentFlowData, RepeatPaymentData, PaymentsResponseData>
for Worldpayvantiv<T>
{
}
// Empty implementations for dispute flows
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<Accept, DisputeFlowData, AcceptDisputeData, DisputeResponseData>
for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
ConnectorIntegrationV2<SubmitEvidence, DisputeFlowData, SubmitEvidenceData, DisputeResponseData>
for Worldpayvantiv<T>
{
}
impl<
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 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_-5825213018000437869_1100_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<Accept, DisputeFlowData, AcceptDisputeData, DisputeResponseData>
for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 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_-5825213018000437869_1100_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<Accept, DisputeFlowData, AcceptDisputeData, DisputeResponseData>
for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
ConnectorIntegrationV2<SubmitEvidence, DisputeFlowData, SubmitEvidenceData, DisputeResponseData>
for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
| {
"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_-5825213018000437869_1100_50 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<Accept, DisputeFlowData, AcceptDisputeData, DisputeResponseData>
for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
ConnectorIntegrationV2<SubmitEvidence, DisputeFlowData, SubmitEvidenceData, DisputeResponseData>
for Worldpayvantiv<T>
{
}
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<DefendDispute, DisputeFlowData, DisputeDefendData, DisputeResponseData>
for Worldpayvantiv<T>
{
}
// Empty implementations for order flows
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
ConnectorIntegrationV2<
CreateOrder,
PaymentFlowData,
PaymentCreateOrderData,
PaymentCreateOrderResponse,
| {
"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_-5825213018000437869_1125_15 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<DefendDispute, DisputeFlowData, DisputeDefendData, DisputeResponseData>
for Worldpayvantiv<T>
{
}
// Empty implementations for order flows
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
| {
"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_-5825213018000437869_1125_30 | clm | snippet | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv.rs
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
> ConnectorIntegrationV2<DefendDispute, DisputeFlowData, DisputeDefendData, DisputeResponseData>
for Worldpayvantiv<T>
{
}
// Empty implementations for order flows
impl<
T: PaymentMethodDataTypes
+ std::fmt::Debug
+ std::marker::Sync
+ std::marker::Send
+ 'static
+ Serialize,
>
ConnectorIntegrationV2<
CreateOrder,
PaymentFlowData,
PaymentCreateOrderData,
PaymentCreateOrderResponse,
> for Worldpayvantiv<T>
{
}
impl<
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": 30,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"start_line": 1125,
"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.