id
stringlengths
20
153
type
stringclasses
1 value
granularity
stringclasses
14 values
content
stringlengths
16
84.3k
metadata
dict
connector-service_snippet_1534611827297484703_275_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs #[derive(Debug, Clone, Deserialize, Serialize)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] pub enum PlacetopayTransactionStatus { Ok, Failed, Approved, Rejected, Pending, PendingValidation, PendingProcess, Error, } impl From<PlacetopayTransactionStatus> for common_enums::AttemptStatus { fn from(item: PlacetopayTransactionStatus) -> Self { match item { PlacetopayTransactionStatus::Approved | PlacetopayTransactionStatus::Ok => { Self::Charged } PlacetopayTransactionStatus::Failed | PlacetopayTransactionStatus::Rejected | PlacetopayTransactionStatus::Error => Self::Failure, PlacetopayTransactionStatus::Pending | PlacetopayTransactionStatus::PendingValidation | PlacetopayTransactionStatus::PendingProcess => Self::Pending, } } }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 275, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_1534611827297484703_275_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs #[derive(Debug, Clone, Deserialize, Serialize)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] pub enum PlacetopayTransactionStatus { Ok, Failed, Approved, Rejected, Pending, PendingValidation, PendingProcess, Error, } impl From<PlacetopayTransactionStatus> for common_enums::AttemptStatus { fn from(item: PlacetopayTransactionStatus) -> Self { match item { PlacetopayTransactionStatus::Approved | PlacetopayTransactionStatus::Ok => { Self::Charged } PlacetopayTransactionStatus::Failed | PlacetopayTransactionStatus::Rejected | PlacetopayTransactionStatus::Error => Self::Failure, PlacetopayTransactionStatus::Pending | PlacetopayTransactionStatus::PendingValidation | PlacetopayTransactionStatus::PendingProcess => Self::Pending, } } } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayStatusResponse { status: PlacetopayTransactionStatus, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayPaymentsResponse { status: PlacetopayStatusResponse, internal_reference: u64, authorization: Option<Secret<String>>, } // Authorize flow uses the unified payment response handling with capture method consideration impl<F, T> TryFrom<ResponseRouterData<PlacetopayPaymentsResponse, Self>> for RouterDataV2<F, PaymentFlowData, T, PaymentsResponseData> { type Error = error_stack::Report<ConnectorError>; fn try_from(
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 275, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_1534611827297484703_300_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs | PlacetopayTransactionStatus::PendingProcess => Self::Pending, } } } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayStatusResponse { status: PlacetopayTransactionStatus, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayPaymentsResponse { status: PlacetopayStatusResponse,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 300, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_1534611827297484703_300_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs | PlacetopayTransactionStatus::PendingProcess => Self::Pending, } } } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayStatusResponse { status: PlacetopayTransactionStatus, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayPaymentsResponse { status: PlacetopayStatusResponse, internal_reference: u64, authorization: Option<Secret<String>>, } // Authorize flow uses the unified payment response handling with capture method consideration impl<F, T> TryFrom<ResponseRouterData<PlacetopayPaymentsResponse, Self>> for RouterDataV2<F, PaymentFlowData, T, PaymentsResponseData> { type Error = error_stack::Report<ConnectorError>; fn try_from( item: ResponseRouterData<PlacetopayPaymentsResponse, Self>, ) -> Result<Self, Self::Error> { Ok(Self { resource_common_data: PaymentFlowData { status: common_enums::AttemptStatus::from(item.response.status.status),
{ "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_1534611827297484703_300_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs | PlacetopayTransactionStatus::PendingProcess => Self::Pending, } } } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayStatusResponse { status: PlacetopayTransactionStatus, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayPaymentsResponse { status: PlacetopayStatusResponse, internal_reference: u64, authorization: Option<Secret<String>>, } // Authorize flow uses the unified payment response handling with capture method consideration impl<F, T> TryFrom<ResponseRouterData<PlacetopayPaymentsResponse, Self>> for RouterDataV2<F, PaymentFlowData, T, PaymentsResponseData> { type Error = error_stack::Report<ConnectorError>; fn try_from( item: ResponseRouterData<PlacetopayPaymentsResponse, Self>, ) -> Result<Self, Self::Error> { Ok(Self { resource_common_data: PaymentFlowData { status: common_enums::AttemptStatus::from(item.response.status.status), ..item.router_data.resource_common_data }, response: Ok(PaymentsResponseData::TransactionResponse { resource_id: ResponseId::ConnectorTransactionId( item.response.internal_reference.to_string(), ), redirection_data: None, mandate_reference: None, connector_metadata: item .response .authorization .clone() .map(|authorization| serde_json::json!(authorization)), network_txn_id: None, connector_response_reference_id: None, incremental_authorization_allowed: None, status_code: item.http_code, }), ..item.router_data })
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 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_1534611827297484703_325_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs item: ResponseRouterData<PlacetopayPaymentsResponse, Self>, ) -> Result<Self, Self::Error> { Ok(Self { resource_common_data: PaymentFlowData { status: common_enums::AttemptStatus::from(item.response.status.status), ..item.router_data.resource_common_data }, response: Ok(PaymentsResponseData::TransactionResponse { resource_id: ResponseId::ConnectorTransactionId( item.response.internal_reference.to_string(), ), redirection_data: None, mandate_reference: None, connector_metadata: item .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": 325, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_1534611827297484703_325_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs item: ResponseRouterData<PlacetopayPaymentsResponse, Self>, ) -> Result<Self, Self::Error> { Ok(Self { resource_common_data: PaymentFlowData { status: common_enums::AttemptStatus::from(item.response.status.status), ..item.router_data.resource_common_data }, response: Ok(PaymentsResponseData::TransactionResponse { resource_id: ResponseId::ConnectorTransactionId( item.response.internal_reference.to_string(), ), redirection_data: None, mandate_reference: None, connector_metadata: item .response .authorization .clone() .map(|authorization| serde_json::json!(authorization)), network_txn_id: None, connector_response_reference_id: None, incremental_authorization_allowed: None, status_code: item.http_code, }), ..item.router_data }) } } #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")]
{ "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_1534611827297484703_325_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs item: ResponseRouterData<PlacetopayPaymentsResponse, Self>, ) -> Result<Self, Self::Error> { Ok(Self { resource_common_data: PaymentFlowData { status: common_enums::AttemptStatus::from(item.response.status.status), ..item.router_data.resource_common_data }, response: Ok(PaymentsResponseData::TransactionResponse { resource_id: ResponseId::ConnectorTransactionId( item.response.internal_reference.to_string(), ), redirection_data: None, mandate_reference: None, connector_metadata: item .response .authorization .clone() .map(|authorization| serde_json::json!(authorization)), network_txn_id: None, connector_response_reference_id: None, incremental_authorization_allowed: None, status_code: item.http_code, }), ..item.router_data }) } } #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayPsyncRequest { auth: PlacetopayAuth, internal_reference: u64, } impl< T: PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize, > TryFrom< PlacetopayRouterData< RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>, T, >, > for PlacetopayPsyncRequest {
{ "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_1534611827297484703_350_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs } } #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayPsyncRequest { auth: PlacetopayAuth, internal_reference: u64, } 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": 350, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_1534611827297484703_350_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs } } #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayPsyncRequest { auth: PlacetopayAuth, internal_reference: u64, } impl< T: PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize, > TryFrom< PlacetopayRouterData< RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>, T, >, > for PlacetopayPsyncRequest { type Error = error_stack::Report<ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>, 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": 350, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_1534611827297484703_350_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs } } #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayPsyncRequest { auth: PlacetopayAuth, internal_reference: u64, } impl< T: PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize, > TryFrom< PlacetopayRouterData< RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>, T, >, > for PlacetopayPsyncRequest { type Error = error_stack::Report<ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>, T, >, ) -> Result<Self, Self::Error> { let auth = PlacetopayAuth::try_from(&item.router_data.connector_auth_type)?; let internal_reference = item .router_data .request .get_connector_transaction_id()? .parse::<u64>() .change_context(errors::ConnectorError::RequestEncodingFailed)?; Ok(Self { auth, internal_reference, }) } } #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")]
{ "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_1534611827297484703_375_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs type Error = error_stack::Report<ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>, T, >, ) -> Result<Self, Self::Error> { let auth = PlacetopayAuth::try_from(&item.router_data.connector_auth_type)?; let internal_reference = item .router_data .request .get_connector_transaction_id()? .parse::<u64>() .change_context(errors::ConnectorError::RequestEncodingFailed)?;
{ "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_1534611827297484703_375_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs type Error = error_stack::Report<ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>, T, >, ) -> Result<Self, Self::Error> { let auth = PlacetopayAuth::try_from(&item.router_data.connector_auth_type)?; let internal_reference = item .router_data .request .get_connector_transaction_id()? .parse::<u64>() .change_context(errors::ConnectorError::RequestEncodingFailed)?; Ok(Self { auth, internal_reference, }) } } #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayNextActionRequest { auth: PlacetopayAuth, internal_reference: u64, action: PlacetopayNextAction, }
{ "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_1534611827297484703_375_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs type Error = error_stack::Report<ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<PSync, PaymentFlowData, PaymentsSyncData, PaymentsResponseData>, T, >, ) -> Result<Self, Self::Error> { let auth = PlacetopayAuth::try_from(&item.router_data.connector_auth_type)?; let internal_reference = item .router_data .request .get_connector_transaction_id()? .parse::<u64>() .change_context(errors::ConnectorError::RequestEncodingFailed)?; Ok(Self { auth, internal_reference, }) } } #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayNextActionRequest { auth: PlacetopayAuth, internal_reference: u64, action: PlacetopayNextAction, } #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub enum PlacetopayNextAction { Refund, Reverse, Void, Process, Checkout, } impl< T: PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize, > TryFrom<
{ "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_1534611827297484703_400_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs pub struct PlacetopayNextActionRequest { auth: PlacetopayAuth, internal_reference: u64, action: PlacetopayNextAction, } #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub enum PlacetopayNextAction { Refund, Reverse, Void, Process, Checkout, }
{ "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_1534611827297484703_400_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs pub struct PlacetopayNextActionRequest { auth: PlacetopayAuth, internal_reference: u64, action: PlacetopayNextAction, } #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub enum PlacetopayNextAction { Refund, Reverse, Void, Process, Checkout, } impl< T: PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize, > TryFrom< PlacetopayRouterData< RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>, T, >, > for PlacetopayNextActionRequest
{ "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_1534611827297484703_400_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs pub struct PlacetopayNextActionRequest { auth: PlacetopayAuth, internal_reference: u64, action: PlacetopayNextAction, } #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub enum PlacetopayNextAction { Refund, Reverse, Void, Process, Checkout, } impl< T: PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize, > TryFrom< PlacetopayRouterData< RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>, T, >, > for PlacetopayNextActionRequest { type Error = error_stack::Report<ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>, T, >, ) -> Result<Self, Self::Error> { let auth = PlacetopayAuth::try_from(&item.router_data.connector_auth_type)?; let internal_reference = item .router_data .request .get_connector_transaction_id() .change_context(errors::ConnectorError::RequestEncodingFailed)? .parse::<u64>() .change_context(errors::ConnectorError::RequestEncodingFailed)?; let action = PlacetopayNextAction::Checkout; Ok(Self { auth, internal_reference,
{ "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_1534611827297484703_425_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs PlacetopayRouterData< RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>, T, >, > for PlacetopayNextActionRequest { type Error = error_stack::Report<ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>, T, >, ) -> Result<Self, Self::Error> { let auth = PlacetopayAuth::try_from(&item.router_data.connector_auth_type)?; let internal_reference = item
{ "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_1534611827297484703_425_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs PlacetopayRouterData< RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>, T, >, > for PlacetopayNextActionRequest { type Error = error_stack::Report<ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>, T, >, ) -> Result<Self, Self::Error> { let auth = PlacetopayAuth::try_from(&item.router_data.connector_auth_type)?; let internal_reference = item .router_data .request .get_connector_transaction_id() .change_context(errors::ConnectorError::RequestEncodingFailed)? .parse::<u64>() .change_context(errors::ConnectorError::RequestEncodingFailed)?; let action = PlacetopayNextAction::Checkout; Ok(Self { auth, internal_reference, action, }) } }
{ "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_1534611827297484703_425_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs PlacetopayRouterData< RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>, T, >, > for PlacetopayNextActionRequest { type Error = error_stack::Report<ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<Capture, PaymentFlowData, PaymentsCaptureData, PaymentsResponseData>, T, >, ) -> Result<Self, Self::Error> { let auth = PlacetopayAuth::try_from(&item.router_data.connector_auth_type)?; let internal_reference = item .router_data .request .get_connector_transaction_id() .change_context(errors::ConnectorError::RequestEncodingFailed)? .parse::<u64>() .change_context(errors::ConnectorError::RequestEncodingFailed)?; let action = PlacetopayNextAction::Checkout; Ok(Self { auth, internal_reference, action, }) } } // REFUND TYPES #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayRefundRequest { auth: PlacetopayAuth, internal_reference: u64, action: PlacetopayNextAction, authorization: Option<Secret<String>>, } impl< F, T: PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize, > TryFrom<
{ "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_1534611827297484703_450_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs action, }) } } // REFUND TYPES #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayRefundRequest { auth: PlacetopayAuth, internal_reference: u64, action: PlacetopayNextAction, authorization: Option<Secret<String>>, }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 450, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_1534611827297484703_450_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs action, }) } } // REFUND TYPES #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayRefundRequest { auth: PlacetopayAuth, internal_reference: u64, action: PlacetopayNextAction, authorization: Option<Secret<String>>, } impl< F, T: PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize, > TryFrom< PlacetopayRouterData<RouterDataV2<F, RefundFlowData, RefundsData, RefundsResponseData>, T>, > for PlacetopayRefundRequest { type Error = error_stack::Report<errors::ConnectorError>; fn try_from(
{ "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_1534611827297484703_450_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs action, }) } } // REFUND TYPES #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayRefundRequest { auth: PlacetopayAuth, internal_reference: u64, action: PlacetopayNextAction, authorization: Option<Secret<String>>, } impl< F, T: PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize, > TryFrom< PlacetopayRouterData<RouterDataV2<F, RefundFlowData, RefundsData, RefundsResponseData>, T>, > for PlacetopayRefundRequest { type Error = error_stack::Report<errors::ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<F, RefundFlowData, RefundsData, RefundsResponseData>, T, >, ) -> Result<Self, Self::Error> { if item.router_data.request.minor_refund_amount == item.router_data.request.minor_payment_amount { let auth = PlacetopayAuth::try_from(&item.router_data.connector_auth_type)?; let internal_reference = item .router_data .request .connector_transaction_id .parse::<u64>() .change_context(errors::ConnectorError::RequestEncodingFailed)?; let action = PlacetopayNextAction::Reverse; let authorization = match item.router_data.request.connector_metadata.clone() { Some(metadata) => metadata.as_str().map(|auth| auth.to_string()), None => None,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 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_1534611827297484703_475_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs PlacetopayRouterData<RouterDataV2<F, RefundFlowData, RefundsData, RefundsResponseData>, T>, > for PlacetopayRefundRequest { type Error = error_stack::Report<errors::ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<F, RefundFlowData, RefundsData, RefundsResponseData>, T, >, ) -> Result<Self, Self::Error> { if item.router_data.request.minor_refund_amount == item.router_data.request.minor_payment_amount { let auth = PlacetopayAuth::try_from(&item.router_data.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": 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_1534611827297484703_475_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs PlacetopayRouterData<RouterDataV2<F, RefundFlowData, RefundsData, RefundsResponseData>, T>, > for PlacetopayRefundRequest { type Error = error_stack::Report<errors::ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<F, RefundFlowData, RefundsData, RefundsResponseData>, T, >, ) -> Result<Self, Self::Error> { if item.router_data.request.minor_refund_amount == item.router_data.request.minor_payment_amount { let auth = PlacetopayAuth::try_from(&item.router_data.connector_auth_type)?; let internal_reference = item .router_data .request .connector_transaction_id .parse::<u64>() .change_context(errors::ConnectorError::RequestEncodingFailed)?; let action = PlacetopayNextAction::Reverse; let authorization = match item.router_data.request.connector_metadata.clone() { Some(metadata) => metadata.as_str().map(|auth| auth.to_string()), None => None, }; Ok(Self { auth, internal_reference, action,
{ "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_1534611827297484703_475_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs PlacetopayRouterData<RouterDataV2<F, RefundFlowData, RefundsData, RefundsResponseData>, T>, > for PlacetopayRefundRequest { type Error = error_stack::Report<errors::ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<F, RefundFlowData, RefundsData, RefundsResponseData>, T, >, ) -> Result<Self, Self::Error> { if item.router_data.request.minor_refund_amount == item.router_data.request.minor_payment_amount { let auth = PlacetopayAuth::try_from(&item.router_data.connector_auth_type)?; let internal_reference = item .router_data .request .connector_transaction_id .parse::<u64>() .change_context(errors::ConnectorError::RequestEncodingFailed)?; let action = PlacetopayNextAction::Reverse; let authorization = match item.router_data.request.connector_metadata.clone() { Some(metadata) => metadata.as_str().map(|auth| auth.to_string()), None => None, }; Ok(Self { auth, internal_reference, action, authorization: authorization.map(Secret::new), }) } else { Err(errors::ConnectorError::NotSupported { message: "Partial Refund".to_string(), connector: "placetopay", } .into()) } } } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] pub enum PlacetopayRefundStatus { Ok, Failed, Approved, Rejected, Pending,
{ "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_1534611827297484703_500_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs }; Ok(Self { auth, internal_reference, action, authorization: authorization.map(Secret::new), }) } else { Err(errors::ConnectorError::NotSupported { message: "Partial Refund".to_string(), connector: "placetopay", } .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": 500, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_1534611827297484703_500_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs }; Ok(Self { auth, internal_reference, action, authorization: authorization.map(Secret::new), }) } else { Err(errors::ConnectorError::NotSupported { message: "Partial Refund".to_string(), connector: "placetopay", } .into()) } } } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] pub enum PlacetopayRefundStatus { Ok, Failed, Approved, Rejected, Pending, PendingValidation, PendingProcess, Refunded, Error, }
{ "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_1534611827297484703_500_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs }; Ok(Self { auth, internal_reference, action, authorization: authorization.map(Secret::new), }) } else { Err(errors::ConnectorError::NotSupported { message: "Partial Refund".to_string(), connector: "placetopay", } .into()) } } } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] pub enum PlacetopayRefundStatus { Ok, Failed, Approved, Rejected, Pending, PendingValidation, PendingProcess, Refunded, Error, } impl From<PlacetopayRefundStatus> for common_enums::RefundStatus { fn from(item: PlacetopayRefundStatus) -> Self { match item { PlacetopayRefundStatus::Ok | PlacetopayRefundStatus::Approved | PlacetopayRefundStatus::Refunded => Self::Success, PlacetopayRefundStatus::Failed | PlacetopayRefundStatus::Rejected | PlacetopayRefundStatus::Error => Self::Failure, PlacetopayRefundStatus::Pending | PlacetopayRefundStatus::PendingProcess | PlacetopayRefundStatus::PendingValidation => Self::Pending, } } } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayRefundStatusResponse {
{ "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_1534611827297484703_525_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs PendingValidation, PendingProcess, Refunded, Error, } impl From<PlacetopayRefundStatus> for common_enums::RefundStatus { fn from(item: PlacetopayRefundStatus) -> Self { match item { PlacetopayRefundStatus::Ok | PlacetopayRefundStatus::Approved | PlacetopayRefundStatus::Refunded => Self::Success, PlacetopayRefundStatus::Failed | PlacetopayRefundStatus::Rejected | PlacetopayRefundStatus::Error => Self::Failure,
{ "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_1534611827297484703_525_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs PendingValidation, PendingProcess, Refunded, Error, } impl From<PlacetopayRefundStatus> for common_enums::RefundStatus { fn from(item: PlacetopayRefundStatus) -> Self { match item { PlacetopayRefundStatus::Ok | PlacetopayRefundStatus::Approved | PlacetopayRefundStatus::Refunded => Self::Success, PlacetopayRefundStatus::Failed | PlacetopayRefundStatus::Rejected | PlacetopayRefundStatus::Error => Self::Failure, PlacetopayRefundStatus::Pending | PlacetopayRefundStatus::PendingProcess | PlacetopayRefundStatus::PendingValidation => Self::Pending, } } } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayRefundStatusResponse { status: PlacetopayRefundStatus, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")]
{ "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_1534611827297484703_525_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs PendingValidation, PendingProcess, Refunded, Error, } impl From<PlacetopayRefundStatus> for common_enums::RefundStatus { fn from(item: PlacetopayRefundStatus) -> Self { match item { PlacetopayRefundStatus::Ok | PlacetopayRefundStatus::Approved | PlacetopayRefundStatus::Refunded => Self::Success, PlacetopayRefundStatus::Failed | PlacetopayRefundStatus::Rejected | PlacetopayRefundStatus::Error => Self::Failure, PlacetopayRefundStatus::Pending | PlacetopayRefundStatus::PendingProcess | PlacetopayRefundStatus::PendingValidation => Self::Pending, } } } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayRefundStatusResponse { status: PlacetopayRefundStatus, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayRefundResponse { status: PlacetopayRefundStatusResponse, internal_reference: u64, } impl<F> TryFrom<ResponseRouterData<PlacetopayRefundResponse, Self>> for RouterDataV2<F, RefundFlowData, RefundsData, RefundsResponseData> { type Error = error_stack::Report<ConnectorError>; fn try_from( item: ResponseRouterData<PlacetopayRefundResponse, Self>, ) -> Result<Self, Self::Error> { Ok(Self { response: Ok(RefundsResponseData { connector_refund_id: item.response.internal_reference.to_string(), refund_status: common_enums::RefundStatus::from(item.response.status.status), status_code: item.http_code, }), ..item.router_data })
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 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_1534611827297484703_550_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs status: PlacetopayRefundStatus, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayRefundResponse { status: PlacetopayRefundStatusResponse, internal_reference: u64, } impl<F> TryFrom<ResponseRouterData<PlacetopayRefundResponse, Self>> for RouterDataV2<F, RefundFlowData, RefundsData, RefundsResponseData> { type Error = error_stack::Report<ConnectorError>; fn try_from(
{ "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_1534611827297484703_550_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs status: PlacetopayRefundStatus, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayRefundResponse { status: PlacetopayRefundStatusResponse, internal_reference: u64, } impl<F> TryFrom<ResponseRouterData<PlacetopayRefundResponse, Self>> for RouterDataV2<F, RefundFlowData, RefundsData, RefundsResponseData> { type Error = error_stack::Report<ConnectorError>; fn try_from( item: ResponseRouterData<PlacetopayRefundResponse, Self>, ) -> Result<Self, Self::Error> { Ok(Self { response: Ok(RefundsResponseData { connector_refund_id: item.response.internal_reference.to_string(), refund_status: common_enums::RefundStatus::from(item.response.status.status), status_code: item.http_code, }), ..item.router_data }) } } #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")]
{ "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_1534611827297484703_550_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs status: PlacetopayRefundStatus, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayRefundResponse { status: PlacetopayRefundStatusResponse, internal_reference: u64, } impl<F> TryFrom<ResponseRouterData<PlacetopayRefundResponse, Self>> for RouterDataV2<F, RefundFlowData, RefundsData, RefundsResponseData> { type Error = error_stack::Report<ConnectorError>; fn try_from( item: ResponseRouterData<PlacetopayRefundResponse, Self>, ) -> Result<Self, Self::Error> { Ok(Self { response: Ok(RefundsResponseData { connector_refund_id: item.response.internal_reference.to_string(), refund_status: common_enums::RefundStatus::from(item.response.status.status), status_code: item.http_code, }), ..item.router_data }) } } #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayRsyncRequest { auth: PlacetopayAuth, internal_reference: u64, } impl< T: PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize, > TryFrom< PlacetopayRouterData< RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>, T, >, > for PlacetopayRsyncRequest {
{ "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_1534611827297484703_575_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs } } #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayRsyncRequest { auth: PlacetopayAuth, internal_reference: u64, } 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": 575, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_1534611827297484703_575_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs } } #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayRsyncRequest { auth: PlacetopayAuth, internal_reference: u64, } impl< T: PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize, > TryFrom< PlacetopayRouterData< RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>, T, >, > for PlacetopayRsyncRequest { type Error = error_stack::Report<ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>, 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": 575, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_1534611827297484703_575_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs } } #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayRsyncRequest { auth: PlacetopayAuth, internal_reference: u64, } impl< T: PaymentMethodDataTypes + std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static + Serialize, > TryFrom< PlacetopayRouterData< RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>, T, >, > for PlacetopayRsyncRequest { type Error = error_stack::Report<ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>, T, >, ) -> Result<Self, Self::Error> { let auth = PlacetopayAuth::try_from(&item.router_data.connector_auth_type)?; let internal_reference = item .router_data .request .connector_transaction_id .parse::<u64>() .change_context(errors::ConnectorError::RequestEncodingFailed)?; Ok(Self { auth, internal_reference, }) } } impl<F> TryFrom<ResponseRouterData<PlacetopayRefundResponse, Self>> for RouterDataV2<F, RefundFlowData, RefundSyncData, RefundsResponseData> { type Error = error_stack::Report<ConnectorError>;
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 575, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_1534611827297484703_600_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs type Error = error_stack::Report<ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>, T, >, ) -> Result<Self, Self::Error> { let auth = PlacetopayAuth::try_from(&item.router_data.connector_auth_type)?; let internal_reference = item .router_data .request .connector_transaction_id .parse::<u64>() .change_context(errors::ConnectorError::RequestEncodingFailed)?; Ok(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": 600, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_1534611827297484703_600_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs type Error = error_stack::Report<ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>, T, >, ) -> Result<Self, Self::Error> { let auth = PlacetopayAuth::try_from(&item.router_data.connector_auth_type)?; let internal_reference = item .router_data .request .connector_transaction_id .parse::<u64>() .change_context(errors::ConnectorError::RequestEncodingFailed)?; Ok(Self { auth, internal_reference, }) } } impl<F> TryFrom<ResponseRouterData<PlacetopayRefundResponse, Self>> for RouterDataV2<F, RefundFlowData, RefundSyncData, RefundsResponseData> { type Error = error_stack::Report<ConnectorError>; fn try_from( item: ResponseRouterData<PlacetopayRefundResponse, Self>, ) -> Result<Self, Self::Error> { Ok(Self { response: Ok(RefundsResponseData {
{ "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_1534611827297484703_600_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs type Error = error_stack::Report<ConnectorError>; fn try_from( item: PlacetopayRouterData< RouterDataV2<RSync, RefundFlowData, RefundSyncData, RefundsResponseData>, T, >, ) -> Result<Self, Self::Error> { let auth = PlacetopayAuth::try_from(&item.router_data.connector_auth_type)?; let internal_reference = item .router_data .request .connector_transaction_id .parse::<u64>() .change_context(errors::ConnectorError::RequestEncodingFailed)?; Ok(Self { auth, internal_reference, }) } } impl<F> TryFrom<ResponseRouterData<PlacetopayRefundResponse, Self>> for RouterDataV2<F, RefundFlowData, RefundSyncData, RefundsResponseData> { type Error = error_stack::Report<ConnectorError>; fn try_from( item: ResponseRouterData<PlacetopayRefundResponse, Self>, ) -> Result<Self, Self::Error> { Ok(Self { response: Ok(RefundsResponseData { connector_refund_id: item.response.internal_reference.to_string(), refund_status: common_enums::RefundStatus::from(item.response.status.status), status_code: item.http_code, }), ..item.router_data }) } } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayErrorResponse { pub status: PlacetopayError, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayError { pub status: PlacetopayErrorStatus, pub message: Option<String>,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 600, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_1534611827297484703_625_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs fn try_from( item: ResponseRouterData<PlacetopayRefundResponse, Self>, ) -> Result<Self, Self::Error> { Ok(Self { response: Ok(RefundsResponseData { connector_refund_id: item.response.internal_reference.to_string(), refund_status: common_enums::RefundStatus::from(item.response.status.status), status_code: item.http_code, }), ..item.router_data }) } } #[derive(Debug, Deserialize, Serialize)]
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 625, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_1534611827297484703_625_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs fn try_from( item: ResponseRouterData<PlacetopayRefundResponse, Self>, ) -> Result<Self, Self::Error> { Ok(Self { response: Ok(RefundsResponseData { connector_refund_id: item.response.internal_reference.to_string(), refund_status: common_enums::RefundStatus::from(item.response.status.status), status_code: item.http_code, }), ..item.router_data }) } } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayErrorResponse { pub status: PlacetopayError, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayError { pub status: PlacetopayErrorStatus, pub message: Option<String>, pub reason: Option<String>, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")]
{ "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_1534611827297484703_625_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/placetopay/transformers.rs fn try_from( item: ResponseRouterData<PlacetopayRefundResponse, Self>, ) -> Result<Self, Self::Error> { Ok(Self { response: Ok(RefundsResponseData { connector_refund_id: item.response.internal_reference.to_string(), refund_status: common_enums::RefundStatus::from(item.response.status.status), status_code: item.http_code, }), ..item.router_data }) } } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayErrorResponse { pub status: PlacetopayError, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct PlacetopayError { pub status: PlacetopayErrorStatus, pub message: Option<String>, pub reason: Option<String>, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] pub enum PlacetopayErrorStatus { Failed, }
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 33, "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_-7309825778239710861_0_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs #[cfg(test)] mod tests { use cards::CardNumber; use common_enums::{AttemptStatus, AuthenticationType, PaymentMethod}; use domain_types::{ connector_types::{PaymentFlowData, PaymentsAuthorizeData}, payment_address::{Address, PhoneDetails}, payment_method_data::{Card, DefaultPCIHolder, PaymentMethodData, RawCardNumber}, router_request_types::BrowserInformation, router_response_types::Response, }; use interfaces::{ connector_integration_v2::ConnectorIntegrationV2, connector_types::{BoxedConnector, ConnectorServiceTrait},
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 0, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_0_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs #[cfg(test)] mod tests { use cards::CardNumber; use common_enums::{AttemptStatus, AuthenticationType, PaymentMethod}; use domain_types::{ connector_types::{PaymentFlowData, PaymentsAuthorizeData}, payment_address::{Address, PhoneDetails}, payment_method_data::{Card, DefaultPCIHolder, PaymentMethodData, RawCardNumber}, router_request_types::BrowserInformation, router_response_types::Response, }; use interfaces::{ connector_integration_v2::ConnectorIntegrationV2, connector_types::{BoxedConnector, ConnectorServiceTrait}, }; use serde_json::{json, to_value}; use crate::connectors::Razorpay; mod authorize { use std::str::FromStr; use cards::CardNumber; use common_enums::{ AttemptStatus, AuthenticationType, Currency, PaymentMethod, PaymentMethodType, }; use common_utils::{ id_type::MerchantId, pii::Email, request::RequestContent, types::MinorUnit, };
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 0, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_0_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs #[cfg(test)] mod tests { use cards::CardNumber; use common_enums::{AttemptStatus, AuthenticationType, PaymentMethod}; use domain_types::{ connector_types::{PaymentFlowData, PaymentsAuthorizeData}, payment_address::{Address, PhoneDetails}, payment_method_data::{Card, DefaultPCIHolder, PaymentMethodData, RawCardNumber}, router_request_types::BrowserInformation, router_response_types::Response, }; use interfaces::{ connector_integration_v2::ConnectorIntegrationV2, connector_types::{BoxedConnector, ConnectorServiceTrait}, }; use serde_json::{json, to_value}; use crate::connectors::Razorpay; mod authorize { use std::str::FromStr; use cards::CardNumber; use common_enums::{ AttemptStatus, AuthenticationType, Currency, PaymentMethod, PaymentMethodType, }; use common_utils::{ id_type::MerchantId, pii::Email, request::RequestContent, types::MinorUnit, }; use domain_types::{ connector_types::{PaymentFlowData, PaymentsAuthorizeData}, payment_address::{Address, PaymentAddress, PhoneDetails}, payment_method_data::{Card, DefaultPCIHolder, PaymentMethodData, RawCardNumber}, router_data::{ConnectorAuthType, ErrorResponse}, router_data_v2::RouterDataV2, router_request_types::BrowserInformation, router_response_types::Response, types::{ConnectorParams, Connectors}, }; use interfaces::{ connector_integration_v2::ConnectorIntegrationV2, connector_types::{BoxedConnector, ConnectorServiceTrait}, }; use serde_json::{json, to_value, Value}; use crate::connectors::Razorpay; #[test] fn test_build_request_valid() {
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 0, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_25_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs AttemptStatus, AuthenticationType, Currency, PaymentMethod, PaymentMethodType, }; use common_utils::{ id_type::MerchantId, pii::Email, request::RequestContent, types::MinorUnit, }; use domain_types::{ connector_types::{PaymentFlowData, PaymentsAuthorizeData}, payment_address::{Address, PaymentAddress, PhoneDetails}, payment_method_data::{Card, DefaultPCIHolder, PaymentMethodData, RawCardNumber}, router_data::{ConnectorAuthType, ErrorResponse}, router_data_v2::RouterDataV2, router_request_types::BrowserInformation, router_response_types::Response, types::{ConnectorParams, Connectors}, };
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 25, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_25_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs AttemptStatus, AuthenticationType, Currency, PaymentMethod, PaymentMethodType, }; use common_utils::{ id_type::MerchantId, pii::Email, request::RequestContent, types::MinorUnit, }; use domain_types::{ connector_types::{PaymentFlowData, PaymentsAuthorizeData}, payment_address::{Address, PaymentAddress, PhoneDetails}, payment_method_data::{Card, DefaultPCIHolder, PaymentMethodData, RawCardNumber}, router_data::{ConnectorAuthType, ErrorResponse}, router_data_v2::RouterDataV2, router_request_types::BrowserInformation, router_response_types::Response, types::{ConnectorParams, Connectors}, }; use interfaces::{ connector_integration_v2::ConnectorIntegrationV2, connector_types::{BoxedConnector, ConnectorServiceTrait}, }; use serde_json::{json, to_value, Value}; use crate::connectors::Razorpay; #[test] fn test_build_request_valid() { let email = Email::try_from("testuser@gmail.com".to_string()).unwrap(); let test_router_data = RouterDataV2 { flow: std::marker::PhantomData, 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": 25, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_25_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs AttemptStatus, AuthenticationType, Currency, PaymentMethod, PaymentMethodType, }; use common_utils::{ id_type::MerchantId, pii::Email, request::RequestContent, types::MinorUnit, }; use domain_types::{ connector_types::{PaymentFlowData, PaymentsAuthorizeData}, payment_address::{Address, PaymentAddress, PhoneDetails}, payment_method_data::{Card, DefaultPCIHolder, PaymentMethodData, RawCardNumber}, router_data::{ConnectorAuthType, ErrorResponse}, router_data_v2::RouterDataV2, router_request_types::BrowserInformation, router_response_types::Response, types::{ConnectorParams, Connectors}, }; use interfaces::{ connector_integration_v2::ConnectorIntegrationV2, connector_types::{BoxedConnector, ConnectorServiceTrait}, }; use serde_json::{json, to_value, Value}; use crate::connectors::Razorpay; #[test] fn test_build_request_valid() { let email = Email::try_from("testuser@gmail.com".to_string()).unwrap(); let test_router_data = RouterDataV2 { flow: std::marker::PhantomData, resource_common_data: PaymentFlowData { merchant_id: MerchantId::default(), customer_id: None, connector_customer: None, payment_id: "IRRELEVANT_PAYMENT_ID".to_string(), attempt_id: "IRRELEVANT_ATTEMPT_ID".to_string(), status: AttemptStatus::Pending, payment_method: PaymentMethod::Card, description: None, return_url: None, address: PaymentAddress::new( None, Some(Address { address: None, phone: Some(PhoneDetails { number: Some("1234567890".to_string().into()), country_code: Some("+1".to_string()), }), email: Some(email.clone()), }), 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": 25, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_50_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs let email = Email::try_from("testuser@gmail.com".to_string()).unwrap(); let test_router_data = RouterDataV2 { flow: std::marker::PhantomData, resource_common_data: PaymentFlowData { merchant_id: MerchantId::default(), customer_id: None, connector_customer: None, payment_id: "IRRELEVANT_PAYMENT_ID".to_string(), attempt_id: "IRRELEVANT_ATTEMPT_ID".to_string(), status: AttemptStatus::Pending, payment_method: PaymentMethod::Card, description: None, return_url: None, address: PaymentAddress::new(
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 50, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_50_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs let email = Email::try_from("testuser@gmail.com".to_string()).unwrap(); let test_router_data = RouterDataV2 { flow: std::marker::PhantomData, resource_common_data: PaymentFlowData { merchant_id: MerchantId::default(), customer_id: None, connector_customer: None, payment_id: "IRRELEVANT_PAYMENT_ID".to_string(), attempt_id: "IRRELEVANT_ATTEMPT_ID".to_string(), status: AttemptStatus::Pending, payment_method: PaymentMethod::Card, description: None, return_url: None, address: PaymentAddress::new( None, Some(Address { address: None, phone: Some(PhoneDetails { number: Some("1234567890".to_string().into()), country_code: Some("+1".to_string()), }), email: Some(email.clone()), }), None, None, ), auth_type: AuthenticationType::NoThreeDs, connector_meta_data: None, amount_captured: 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": 50, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_50_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs let email = Email::try_from("testuser@gmail.com".to_string()).unwrap(); let test_router_data = RouterDataV2 { flow: std::marker::PhantomData, resource_common_data: PaymentFlowData { merchant_id: MerchantId::default(), customer_id: None, connector_customer: None, payment_id: "IRRELEVANT_PAYMENT_ID".to_string(), attempt_id: "IRRELEVANT_ATTEMPT_ID".to_string(), status: AttemptStatus::Pending, payment_method: PaymentMethod::Card, description: None, return_url: None, address: PaymentAddress::new( None, Some(Address { address: None, phone: Some(PhoneDetails { number: Some("1234567890".to_string().into()), country_code: Some("+1".to_string()), }), email: Some(email.clone()), }), None, None, ), auth_type: AuthenticationType::NoThreeDs, connector_meta_data: None, amount_captured: None, minor_amount_captured: None, access_token: None, session_token: None, reference_id: Some("order_QMSVrXxHS9sBmu".to_string()), payment_method_token: None, preprocessing_id: None, connector_api_version: None, connector_request_reference_id: "ref_12345".to_string(), test_mode: None, connector_http_status_code: None, external_latency: None, raw_connector_response: None, connectors: Connectors { razorpay: ConnectorParams { base_url: "https://api.razorpay.com/".to_string(), dispute_base_url: None, ..Default::default() }, ..Default::default() },
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 50, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_75_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs None, ), auth_type: AuthenticationType::NoThreeDs, connector_meta_data: None, amount_captured: None, minor_amount_captured: None, access_token: None, session_token: None, reference_id: Some("order_QMSVrXxHS9sBmu".to_string()), payment_method_token: None, preprocessing_id: None, connector_api_version: None, connector_request_reference_id: "ref_12345".to_string(), test_mode: None, connector_http_status_code: None,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 75, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_75_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs None, ), auth_type: AuthenticationType::NoThreeDs, connector_meta_data: None, amount_captured: None, minor_amount_captured: None, access_token: None, session_token: None, reference_id: Some("order_QMSVrXxHS9sBmu".to_string()), payment_method_token: None, preprocessing_id: None, connector_api_version: None, connector_request_reference_id: "ref_12345".to_string(), test_mode: None, connector_http_status_code: None, external_latency: None, raw_connector_response: None, connectors: Connectors { razorpay: ConnectorParams { base_url: "https://api.razorpay.com/".to_string(), dispute_base_url: None, ..Default::default() }, ..Default::default() }, vault_headers: None, connector_response_headers: None, raw_connector_request: None, minor_amount_capturable: None, connector_response: 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": 75, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_75_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs None, ), auth_type: AuthenticationType::NoThreeDs, connector_meta_data: None, amount_captured: None, minor_amount_captured: None, access_token: None, session_token: None, reference_id: Some("order_QMSVrXxHS9sBmu".to_string()), payment_method_token: None, preprocessing_id: None, connector_api_version: None, connector_request_reference_id: "ref_12345".to_string(), test_mode: None, connector_http_status_code: None, external_latency: None, raw_connector_response: None, connectors: Connectors { razorpay: ConnectorParams { base_url: "https://api.razorpay.com/".to_string(), dispute_base_url: None, ..Default::default() }, ..Default::default() }, vault_headers: None, connector_response_headers: None, raw_connector_request: None, minor_amount_capturable: None, connector_response: None, recurring_mandate_payment_data: None, }, connector_auth_type: ConnectorAuthType::BodyKey { api_key: "dummy_api_key".to_string().into(), key1: "dummy_key1".to_string().into(), }, request: PaymentsAuthorizeData { authentication_data: None, payment_method_data: PaymentMethodData::Card(Card { card_number: RawCardNumber( CardNumber::from_str("5123456789012346").unwrap(), ), card_exp_month: "12".to_string().into(), card_exp_year: "2026".to_string().into(), card_cvc: "123".to_string().into(), card_issuer: None, card_network: None, card_type: None, card_issuing_country: None, bank_code: None,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 75, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_100_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs vault_headers: None, connector_response_headers: None, raw_connector_request: None, minor_amount_capturable: None, connector_response: None, recurring_mandate_payment_data: None, }, connector_auth_type: ConnectorAuthType::BodyKey { api_key: "dummy_api_key".to_string().into(), key1: "dummy_key1".to_string().into(), }, request: PaymentsAuthorizeData { authentication_data: None, payment_method_data: PaymentMethodData::Card(Card { card_number: RawCardNumber(
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 100, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_100_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs vault_headers: None, connector_response_headers: None, raw_connector_request: None, minor_amount_capturable: None, connector_response: None, recurring_mandate_payment_data: None, }, connector_auth_type: ConnectorAuthType::BodyKey { api_key: "dummy_api_key".to_string().into(), key1: "dummy_key1".to_string().into(), }, request: PaymentsAuthorizeData { authentication_data: None, payment_method_data: PaymentMethodData::Card(Card { card_number: RawCardNumber( CardNumber::from_str("5123456789012346").unwrap(), ), card_exp_month: "12".to_string().into(), card_exp_year: "2026".to_string().into(), card_cvc: "123".to_string().into(), card_issuer: None, card_network: None, card_type: None, card_issuing_country: None, bank_code: None, nick_name: None, card_holder_name: Some("Test User".to_string().into()), co_badged_card_data: None, }), amount: 1000,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 100, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_100_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs vault_headers: None, connector_response_headers: None, raw_connector_request: None, minor_amount_capturable: None, connector_response: None, recurring_mandate_payment_data: None, }, connector_auth_type: ConnectorAuthType::BodyKey { api_key: "dummy_api_key".to_string().into(), key1: "dummy_key1".to_string().into(), }, request: PaymentsAuthorizeData { authentication_data: None, payment_method_data: PaymentMethodData::Card(Card { card_number: RawCardNumber( CardNumber::from_str("5123456789012346").unwrap(), ), card_exp_month: "12".to_string().into(), card_exp_year: "2026".to_string().into(), card_cvc: "123".to_string().into(), card_issuer: None, card_network: None, card_type: None, card_issuing_country: None, bank_code: None, nick_name: None, card_holder_name: Some("Test User".to_string().into()), co_badged_card_data: None, }), amount: 1000, order_tax_amount: None, email: Some(email.clone()), customer_name: None, currency: Currency::USD, confirm: true, statement_descriptor_suffix: None, statement_descriptor: None, capture_method: None, router_return_url: None, webhook_url: None, integrity_object: None, complete_authorize_url: None, mandate_id: None, setup_future_usage: None, off_session: None, browser_info: Some(BrowserInformation { color_depth: None, java_enabled: Some(false), java_script_enabled: None, language: Some("en-US".to_string()),
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 100, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_125_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs nick_name: None, card_holder_name: Some("Test User".to_string().into()), co_badged_card_data: None, }), amount: 1000, order_tax_amount: None, email: Some(email.clone()), customer_name: None, currency: Currency::USD, confirm: true, statement_descriptor_suffix: None, statement_descriptor: None, capture_method: None, router_return_url: None, webhook_url: None,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 125, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_125_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs nick_name: None, card_holder_name: Some("Test User".to_string().into()), co_badged_card_data: None, }), amount: 1000, order_tax_amount: None, email: Some(email.clone()), customer_name: None, currency: Currency::USD, confirm: true, statement_descriptor_suffix: None, statement_descriptor: None, capture_method: None, router_return_url: None, webhook_url: None, integrity_object: None, complete_authorize_url: None, mandate_id: None, setup_future_usage: None, off_session: None, browser_info: Some(BrowserInformation { color_depth: None, java_enabled: Some(false), java_script_enabled: None, language: Some("en-US".to_string()), screen_height: Some(1080), screen_width: Some(1920), time_zone: None, ip_address: None, accept_header: Some(
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 125, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_125_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs nick_name: None, card_holder_name: Some("Test User".to_string().into()), co_badged_card_data: None, }), amount: 1000, order_tax_amount: None, email: Some(email.clone()), customer_name: None, currency: Currency::USD, confirm: true, statement_descriptor_suffix: None, statement_descriptor: None, capture_method: None, router_return_url: None, webhook_url: None, integrity_object: None, complete_authorize_url: None, mandate_id: None, setup_future_usage: None, off_session: None, browser_info: Some(BrowserInformation { color_depth: None, java_enabled: Some(false), java_script_enabled: None, language: Some("en-US".to_string()), screen_height: Some(1080), screen_width: Some(1920), time_zone: None, ip_address: None, accept_header: Some( "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" .to_string(), ), user_agent: Some( "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)".to_string(), ), referer: None, os_type: None, os_version: None, device_model: None, accept_language: None, }), order_category: None, session_token: None, enrolled_for_3ds: false, related_transaction_id: None, payment_experience: None, payment_method_type: Some(PaymentMethodType::Credit), customer_id: None, request_incremental_authorization: false,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 125, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_150_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs screen_height: Some(1080), screen_width: Some(1920), time_zone: None, ip_address: None, accept_header: Some( "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" .to_string(), ), user_agent: Some( "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)".to_string(), ), referer: None, os_type: None, os_version: None, device_model: None,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 150, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_150_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs screen_height: Some(1080), screen_width: Some(1920), time_zone: None, ip_address: None, accept_header: Some( "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" .to_string(), ), user_agent: Some( "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)".to_string(), ), referer: None, os_type: None, os_version: None, device_model: None, accept_language: None, }), order_category: None, session_token: None, enrolled_for_3ds: false, related_transaction_id: None, payment_experience: None, payment_method_type: Some(PaymentMethodType::Credit), customer_id: None, request_incremental_authorization: false, metadata: None, minor_amount: MinorUnit::new(1000), merchant_order_reference_id: None, shipping_cost: None, merchant_account_id: 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": 150, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_150_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs screen_height: Some(1080), screen_width: Some(1920), time_zone: None, ip_address: None, accept_header: Some( "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" .to_string(), ), user_agent: Some( "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)".to_string(), ), referer: None, os_type: None, os_version: None, device_model: None, accept_language: None, }), order_category: None, session_token: None, enrolled_for_3ds: false, related_transaction_id: None, payment_experience: None, payment_method_type: Some(PaymentMethodType::Credit), customer_id: None, request_incremental_authorization: false, metadata: None, minor_amount: MinorUnit::new(1000), merchant_order_reference_id: None, shipping_cost: None, merchant_account_id: None, merchant_config_currency: None, all_keys_required: None, access_token: None, customer_acceptance: None, split_payments: None, request_extended_authorization: None, setup_mandate_details: None, enable_overcapture: None, merchant_account_metadata: None, }, response: Err(ErrorResponse { code: "HE_00".to_string(), message: "Something went wrong".to_string(), reason: None, status_code: 500, 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": 150, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_175_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs metadata: None, minor_amount: MinorUnit::new(1000), merchant_order_reference_id: None, shipping_cost: None, merchant_account_id: None, merchant_config_currency: None, all_keys_required: None, access_token: None, customer_acceptance: None, split_payments: None, request_extended_authorization: None, setup_mandate_details: None, enable_overcapture: None, merchant_account_metadata: None, },
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 175, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_175_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs metadata: None, minor_amount: MinorUnit::new(1000), merchant_order_reference_id: None, shipping_cost: None, merchant_account_id: None, merchant_config_currency: None, all_keys_required: None, access_token: None, customer_acceptance: None, split_payments: None, request_extended_authorization: None, setup_mandate_details: None, enable_overcapture: None, merchant_account_metadata: None, }, response: Err(ErrorResponse { code: "HE_00".to_string(), message: "Something went wrong".to_string(), reason: None, status_code: 500, attempt_status: None, connector_transaction_id: None, network_decline_code: None, network_advice_code: None, network_error_message: None, }), }; let connector: BoxedConnector<DefaultPCIHolder> = Box::new(Razorpay::new()); let result = connector.get_request_body(&test_router_data);
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 175, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_175_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs metadata: None, minor_amount: MinorUnit::new(1000), merchant_order_reference_id: None, shipping_cost: None, merchant_account_id: None, merchant_config_currency: None, all_keys_required: None, access_token: None, customer_acceptance: None, split_payments: None, request_extended_authorization: None, setup_mandate_details: None, enable_overcapture: None, merchant_account_metadata: None, }, response: Err(ErrorResponse { code: "HE_00".to_string(), message: "Something went wrong".to_string(), reason: None, status_code: 500, attempt_status: None, connector_transaction_id: None, network_decline_code: None, network_advice_code: None, network_error_message: None, }), }; let connector: BoxedConnector<DefaultPCIHolder> = Box::new(Razorpay::new()); let result = connector.get_request_body(&test_router_data); let request_content = result.unwrap(); let actual_json: Value = match request_content { Some(RequestContent::Json(payload)) => { to_value(&payload).expect("Failed to serialize payload to JSON") } _ => panic!("Expected JSON payload"), }; let expected_json: Value = json!({ "amount": 1000, "currency": "USD", "contact": "1234567890", "email": "testuser@gmail.com", "order_id": "order_QMSVrXxHS9sBmu", "method": "card", "card": { "number": "5123456789012346", "expiry_month": "12", "expiry_year": "2026", "cvv": "123"
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 175, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_200_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs }), }; let connector: BoxedConnector<DefaultPCIHolder> = Box::new(Razorpay::new()); let result = connector.get_request_body(&test_router_data); let request_content = result.unwrap(); let actual_json: Value = match request_content { Some(RequestContent::Json(payload)) => { to_value(&payload).expect("Failed to serialize payload to JSON") } _ => panic!("Expected JSON payload"), }; let expected_json: Value = json!({ "amount": 1000,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 200, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_200_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs }), }; let connector: BoxedConnector<DefaultPCIHolder> = Box::new(Razorpay::new()); let result = connector.get_request_body(&test_router_data); let request_content = result.unwrap(); let actual_json: Value = match request_content { Some(RequestContent::Json(payload)) => { to_value(&payload).expect("Failed to serialize payload to JSON") } _ => panic!("Expected JSON payload"), }; let expected_json: Value = json!({ "amount": 1000, "currency": "USD", "contact": "1234567890", "email": "testuser@gmail.com", "order_id": "order_QMSVrXxHS9sBmu", "method": "card", "card": { "number": "5123456789012346", "expiry_month": "12", "expiry_year": "2026", "cvv": "123" }, "authentication": { "authentication_channel": "browser" }, "browser": {
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 200, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_200_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs }), }; let connector: BoxedConnector<DefaultPCIHolder> = Box::new(Razorpay::new()); let result = connector.get_request_body(&test_router_data); let request_content = result.unwrap(); let actual_json: Value = match request_content { Some(RequestContent::Json(payload)) => { to_value(&payload).expect("Failed to serialize payload to JSON") } _ => panic!("Expected JSON payload"), }; let expected_json: Value = json!({ "amount": 1000, "currency": "USD", "contact": "1234567890", "email": "testuser@gmail.com", "order_id": "order_QMSVrXxHS9sBmu", "method": "card", "card": { "number": "5123456789012346", "expiry_month": "12", "expiry_year": "2026", "cvv": "123" }, "authentication": { "authentication_channel": "browser" }, "browser": { "java_enabled": false, "language": "en-US", "screen_height": 1080, "screen_width": 1920 }, "ip": "127.0.0.1", "referer": "https://example.com", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)" }); assert_eq!(actual_json, expected_json); } #[test] fn test_build_request_missing() { let test_router_data = RouterDataV2 { flow: std::marker::PhantomData, resource_common_data: PaymentFlowData { merchant_id: MerchantId::default(), customer_id: None, connector_customer: 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": 200, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_225_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs }, "authentication": { "authentication_channel": "browser" }, "browser": { "java_enabled": false, "language": "en-US", "screen_height": 1080, "screen_width": 1920 }, "ip": "127.0.0.1", "referer": "https://example.com", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)" }); assert_eq!(actual_json, expected_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": 225, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_225_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs }, "authentication": { "authentication_channel": "browser" }, "browser": { "java_enabled": false, "language": "en-US", "screen_height": 1080, "screen_width": 1920 }, "ip": "127.0.0.1", "referer": "https://example.com", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)" }); assert_eq!(actual_json, expected_json); } #[test] fn test_build_request_missing() { let test_router_data = RouterDataV2 { flow: std::marker::PhantomData, resource_common_data: PaymentFlowData { merchant_id: MerchantId::default(), customer_id: None, connector_customer: None, payment_id: "MISSING_EMAIL_ID".to_string(), attempt_id: "MISSING_CARD_ID".to_string(), status: AttemptStatus::Pending, payment_method: PaymentMethod::Card, description: 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": 225, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_225_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs }, "authentication": { "authentication_channel": "browser" }, "browser": { "java_enabled": false, "language": "en-US", "screen_height": 1080, "screen_width": 1920 }, "ip": "127.0.0.1", "referer": "https://example.com", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)" }); assert_eq!(actual_json, expected_json); } #[test] fn test_build_request_missing() { let test_router_data = RouterDataV2 { flow: std::marker::PhantomData, resource_common_data: PaymentFlowData { merchant_id: MerchantId::default(), customer_id: None, connector_customer: None, payment_id: "MISSING_EMAIL_ID".to_string(), attempt_id: "MISSING_CARD_ID".to_string(), status: AttemptStatus::Pending, payment_method: PaymentMethod::Card, description: None, return_url: None, address: PaymentAddress::new(None, None, None, None), auth_type: AuthenticationType::NoThreeDs, connector_meta_data: None, amount_captured: None, minor_amount_captured: None, access_token: None, session_token: None, reference_id: Some("order_missing".to_string()), payment_method_token: None, preprocessing_id: None, connector_api_version: None, connector_request_reference_id: "ref_missing".to_string(), test_mode: None, connector_http_status_code: None, external_latency: None, raw_connector_response: None, connectors: Connectors { razorpay: ConnectorParams { base_url: "https://api.razorpay.com/".to_string(),
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 225, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_250_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs payment_id: "MISSING_EMAIL_ID".to_string(), attempt_id: "MISSING_CARD_ID".to_string(), status: AttemptStatus::Pending, payment_method: PaymentMethod::Card, description: None, return_url: None, address: PaymentAddress::new(None, None, None, None), auth_type: AuthenticationType::NoThreeDs, connector_meta_data: None, amount_captured: None, minor_amount_captured: None, access_token: None, session_token: None, reference_id: Some("order_missing".to_string()), payment_method_token: None,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 250, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_250_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs payment_id: "MISSING_EMAIL_ID".to_string(), attempt_id: "MISSING_CARD_ID".to_string(), status: AttemptStatus::Pending, payment_method: PaymentMethod::Card, description: None, return_url: None, address: PaymentAddress::new(None, None, None, None), auth_type: AuthenticationType::NoThreeDs, connector_meta_data: None, amount_captured: None, minor_amount_captured: None, access_token: None, session_token: None, reference_id: Some("order_missing".to_string()), payment_method_token: None, preprocessing_id: None, connector_api_version: None, connector_request_reference_id: "ref_missing".to_string(), test_mode: None, connector_http_status_code: None, external_latency: None, raw_connector_response: None, connectors: Connectors { razorpay: ConnectorParams { base_url: "https://api.razorpay.com/".to_string(), dispute_base_url: None, ..Default::default() }, ..Default::default() },
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 250, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_250_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs payment_id: "MISSING_EMAIL_ID".to_string(), attempt_id: "MISSING_CARD_ID".to_string(), status: AttemptStatus::Pending, payment_method: PaymentMethod::Card, description: None, return_url: None, address: PaymentAddress::new(None, None, None, None), auth_type: AuthenticationType::NoThreeDs, connector_meta_data: None, amount_captured: None, minor_amount_captured: None, access_token: None, session_token: None, reference_id: Some("order_missing".to_string()), payment_method_token: None, preprocessing_id: None, connector_api_version: None, connector_request_reference_id: "ref_missing".to_string(), test_mode: None, connector_http_status_code: None, external_latency: None, raw_connector_response: None, connectors: Connectors { razorpay: ConnectorParams { base_url: "https://api.razorpay.com/".to_string(), dispute_base_url: None, ..Default::default() }, ..Default::default() }, vault_headers: None, connector_response_headers: None, raw_connector_request: None, minor_amount_capturable: None, connector_response: None, recurring_mandate_payment_data: None, }, connector_auth_type: ConnectorAuthType::BodyKey { api_key: "dummy_api_key".to_string().into(), key1: "dummy_key1".to_string().into(), }, request: PaymentsAuthorizeData { authentication_data: None, payment_method_data: PaymentMethodData::Card(Card { card_number: RawCardNumber(CardNumber::from_str("").unwrap_or_default()), card_exp_month: "".to_string().into(), card_exp_year: "".to_string().into(), card_cvc: "".to_string().into(), card_issuer: None, card_network: 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": 250, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_275_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs dispute_base_url: None, ..Default::default() }, ..Default::default() }, vault_headers: None, connector_response_headers: None, raw_connector_request: None, minor_amount_capturable: None, connector_response: None, recurring_mandate_payment_data: None, }, connector_auth_type: ConnectorAuthType::BodyKey { api_key: "dummy_api_key".to_string().into(), key1: "dummy_key1".to_string().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": 275, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_275_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs dispute_base_url: None, ..Default::default() }, ..Default::default() }, vault_headers: None, connector_response_headers: None, raw_connector_request: None, minor_amount_capturable: None, connector_response: None, recurring_mandate_payment_data: None, }, connector_auth_type: ConnectorAuthType::BodyKey { api_key: "dummy_api_key".to_string().into(), key1: "dummy_key1".to_string().into(), }, request: PaymentsAuthorizeData { authentication_data: None, payment_method_data: PaymentMethodData::Card(Card { card_number: RawCardNumber(CardNumber::from_str("").unwrap_or_default()), card_exp_month: "".to_string().into(), card_exp_year: "".to_string().into(), card_cvc: "".to_string().into(), card_issuer: None, card_network: None, card_type: None, card_issuing_country: None, bank_code: None, nick_name: None, card_holder_name: Some("Test User".to_string().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": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 275, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_275_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs dispute_base_url: None, ..Default::default() }, ..Default::default() }, vault_headers: None, connector_response_headers: None, raw_connector_request: None, minor_amount_capturable: None, connector_response: None, recurring_mandate_payment_data: None, }, connector_auth_type: ConnectorAuthType::BodyKey { api_key: "dummy_api_key".to_string().into(), key1: "dummy_key1".to_string().into(), }, request: PaymentsAuthorizeData { authentication_data: None, payment_method_data: PaymentMethodData::Card(Card { card_number: RawCardNumber(CardNumber::from_str("").unwrap_or_default()), card_exp_month: "".to_string().into(), card_exp_year: "".to_string().into(), card_cvc: "".to_string().into(), card_issuer: None, card_network: None, card_type: None, card_issuing_country: None, bank_code: None, nick_name: None, card_holder_name: Some("Test User".to_string().into()), co_badged_card_data: None, }), amount: 1000, order_tax_amount: None, email: None, customer_name: None, currency: Currency::USD, confirm: true, statement_descriptor_suffix: None, statement_descriptor: None, capture_method: None, router_return_url: None, webhook_url: None, complete_authorize_url: None, mandate_id: None, setup_future_usage: None, off_session: None, integrity_object: None, browser_info: None, order_category: 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": 275, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_300_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs card_type: None, card_issuing_country: None, bank_code: None, nick_name: None, card_holder_name: Some("Test User".to_string().into()), co_badged_card_data: None, }), amount: 1000, order_tax_amount: None, email: None, customer_name: None, currency: Currency::USD, confirm: true, statement_descriptor_suffix: None, statement_descriptor: None,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 300, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_300_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs card_type: None, card_issuing_country: None, bank_code: None, nick_name: None, card_holder_name: Some("Test User".to_string().into()), co_badged_card_data: None, }), amount: 1000, order_tax_amount: None, email: None, customer_name: None, currency: Currency::USD, confirm: true, statement_descriptor_suffix: None, statement_descriptor: None, capture_method: None, router_return_url: None, webhook_url: None, complete_authorize_url: None, mandate_id: None, setup_future_usage: None, off_session: None, integrity_object: None, browser_info: None, order_category: None, session_token: None, enrolled_for_3ds: false, related_transaction_id: None, payment_experience: None, payment_method_type: Some(PaymentMethodType::Credit),
{ "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_-7309825778239710861_300_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs card_type: None, card_issuing_country: None, bank_code: None, nick_name: None, card_holder_name: Some("Test User".to_string().into()), co_badged_card_data: None, }), amount: 1000, order_tax_amount: None, email: None, customer_name: None, currency: Currency::USD, confirm: true, statement_descriptor_suffix: None, statement_descriptor: None, capture_method: None, router_return_url: None, webhook_url: None, complete_authorize_url: None, mandate_id: None, setup_future_usage: None, off_session: None, integrity_object: None, browser_info: None, order_category: None, session_token: None, enrolled_for_3ds: false, related_transaction_id: None, payment_experience: None, payment_method_type: Some(PaymentMethodType::Credit), customer_id: None, request_incremental_authorization: false, metadata: None, minor_amount: MinorUnit::new(1000), merchant_order_reference_id: None, shipping_cost: None, merchant_account_id: None, merchant_config_currency: None, all_keys_required: None, access_token: None, customer_acceptance: None, split_payments: None, request_extended_authorization: None, setup_mandate_details: None, enable_overcapture: None, merchant_account_metadata: None, }, response: Err(ErrorResponse { code: "HE_01".to_string(), message: "Missing required fields".to_string(),
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 300, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_325_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs session_token: None, enrolled_for_3ds: false, related_transaction_id: None, payment_experience: None, payment_method_type: Some(PaymentMethodType::Credit), customer_id: None, request_incremental_authorization: false, metadata: None, minor_amount: MinorUnit::new(1000), merchant_order_reference_id: None, shipping_cost: None, merchant_account_id: None, merchant_config_currency: None, all_keys_required: None, access_token: None,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 325, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_325_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs session_token: None, enrolled_for_3ds: false, related_transaction_id: None, payment_experience: None, payment_method_type: Some(PaymentMethodType::Credit), customer_id: None, request_incremental_authorization: false, metadata: None, minor_amount: MinorUnit::new(1000), merchant_order_reference_id: None, shipping_cost: None, merchant_account_id: None, merchant_config_currency: None, all_keys_required: None, access_token: None, customer_acceptance: None, split_payments: None, request_extended_authorization: None, setup_mandate_details: None, enable_overcapture: None, merchant_account_metadata: None, }, response: Err(ErrorResponse { code: "HE_01".to_string(), message: "Missing required fields".to_string(), reason: None, status_code: 400, attempt_status: None, connector_transaction_id: None, network_decline_code: 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": 325, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_325_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs session_token: None, enrolled_for_3ds: false, related_transaction_id: None, payment_experience: None, payment_method_type: Some(PaymentMethodType::Credit), customer_id: None, request_incremental_authorization: false, metadata: None, minor_amount: MinorUnit::new(1000), merchant_order_reference_id: None, shipping_cost: None, merchant_account_id: None, merchant_config_currency: None, all_keys_required: None, access_token: None, customer_acceptance: None, split_payments: None, request_extended_authorization: None, setup_mandate_details: None, enable_overcapture: None, merchant_account_metadata: None, }, response: Err(ErrorResponse { code: "HE_01".to_string(), message: "Missing required fields".to_string(), reason: None, status_code: 400, attempt_status: None, connector_transaction_id: None, network_decline_code: None, network_advice_code: None, network_error_message: None, }), }; let connector: BoxedConnector<DefaultPCIHolder> = Box::new(Razorpay::new()); let result = connector.get_request_body(&test_router_data); assert!( result.is_err(), "Expected error for missing required fields, but got: {result:?}" ); } #[test] fn test_build_request_invalid() { use common_utils::pii::Email; let email = Email::try_from("invalid-email@nowhere.com".to_string()).unwrap();
{ "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_-7309825778239710861_350_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs reason: None, status_code: 400, attempt_status: None, connector_transaction_id: None, network_decline_code: None, network_advice_code: None, network_error_message: None, }), }; let connector: BoxedConnector<DefaultPCIHolder> = Box::new(Razorpay::new()); let result = connector.get_request_body(&test_router_data); assert!( result.is_err(),
{ "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_-7309825778239710861_350_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs reason: None, status_code: 400, attempt_status: None, connector_transaction_id: None, network_decline_code: None, network_advice_code: None, network_error_message: None, }), }; let connector: BoxedConnector<DefaultPCIHolder> = Box::new(Razorpay::new()); let result = connector.get_request_body(&test_router_data); assert!( result.is_err(), "Expected error for missing required fields, but got: {result:?}" ); } #[test] fn test_build_request_invalid() { use common_utils::pii::Email; let email = Email::try_from("invalid-email@nowhere.com".to_string()).unwrap(); let test_router_data = RouterDataV2 { flow: std::marker::PhantomData, resource_common_data: PaymentFlowData { merchant_id: MerchantId::default(), customer_id: 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": 350, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_350_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs reason: None, status_code: 400, attempt_status: None, connector_transaction_id: None, network_decline_code: None, network_advice_code: None, network_error_message: None, }), }; let connector: BoxedConnector<DefaultPCIHolder> = Box::new(Razorpay::new()); let result = connector.get_request_body(&test_router_data); assert!( result.is_err(), "Expected error for missing required fields, but got: {result:?}" ); } #[test] fn test_build_request_invalid() { use common_utils::pii::Email; let email = Email::try_from("invalid-email@nowhere.com".to_string()).unwrap(); let test_router_data = RouterDataV2 { flow: std::marker::PhantomData, resource_common_data: PaymentFlowData { merchant_id: MerchantId::default(), customer_id: None, connector_customer: None, payment_id: "INVALID_PAYMENT".to_string(), attempt_id: "INVALID_ATTEMPT".to_string(), status: AttemptStatus::Pending, payment_method: PaymentMethod::Card, description: None, return_url: None, address: PaymentAddress::new(None, None, None, None), auth_type: AuthenticationType::NoThreeDs, connector_meta_data: None, amount_captured: None, minor_amount_captured: None, access_token: None, session_token: None, reference_id: Some("invalid_id".to_string()), payment_method_token: None, preprocessing_id: None, connector_api_version: None, connector_request_reference_id: "ref_invalid".to_string(), test_mode: 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": 350, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_375_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs let test_router_data = RouterDataV2 { flow: std::marker::PhantomData, resource_common_data: PaymentFlowData { merchant_id: MerchantId::default(), customer_id: None, connector_customer: None, payment_id: "INVALID_PAYMENT".to_string(), attempt_id: "INVALID_ATTEMPT".to_string(), status: AttemptStatus::Pending, payment_method: PaymentMethod::Card, description: None, return_url: None, address: PaymentAddress::new(None, None, None, None), auth_type: AuthenticationType::NoThreeDs, connector_meta_data: None,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 375, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_375_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs let test_router_data = RouterDataV2 { flow: std::marker::PhantomData, resource_common_data: PaymentFlowData { merchant_id: MerchantId::default(), customer_id: None, connector_customer: None, payment_id: "INVALID_PAYMENT".to_string(), attempt_id: "INVALID_ATTEMPT".to_string(), status: AttemptStatus::Pending, payment_method: PaymentMethod::Card, description: None, return_url: None, address: PaymentAddress::new(None, None, None, None), auth_type: AuthenticationType::NoThreeDs, connector_meta_data: None, amount_captured: None, minor_amount_captured: None, access_token: None, session_token: None, reference_id: Some("invalid_id".to_string()), payment_method_token: None, preprocessing_id: None, connector_api_version: None, connector_request_reference_id: "ref_invalid".to_string(), test_mode: None, connector_http_status_code: None, external_latency: None, raw_connector_response: None, connectors: Connectors { razorpay: ConnectorParams {
{ "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_-7309825778239710861_375_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs let test_router_data = RouterDataV2 { flow: std::marker::PhantomData, resource_common_data: PaymentFlowData { merchant_id: MerchantId::default(), customer_id: None, connector_customer: None, payment_id: "INVALID_PAYMENT".to_string(), attempt_id: "INVALID_ATTEMPT".to_string(), status: AttemptStatus::Pending, payment_method: PaymentMethod::Card, description: None, return_url: None, address: PaymentAddress::new(None, None, None, None), auth_type: AuthenticationType::NoThreeDs, connector_meta_data: None, amount_captured: None, minor_amount_captured: None, access_token: None, session_token: None, reference_id: Some("invalid_id".to_string()), payment_method_token: None, preprocessing_id: None, connector_api_version: None, connector_request_reference_id: "ref_invalid".to_string(), test_mode: None, connector_http_status_code: None, external_latency: None, raw_connector_response: None, connectors: Connectors { razorpay: ConnectorParams { base_url: "https://api.razorpay.com/".to_string(), dispute_base_url: None, ..Default::default() }, ..Default::default() }, vault_headers: None, connector_response_headers: None, raw_connector_request: None, minor_amount_capturable: None, connector_response: None, recurring_mandate_payment_data: None, }, connector_auth_type: ConnectorAuthType::BodyKey { api_key: "dummy_api_key".to_string().into(), key1: "dummy_key1".to_string().into(), }, request: PaymentsAuthorizeData { authentication_data: None, payment_method_data: PaymentMethodData::Card(Card {
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 375, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_400_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs connector_http_status_code: None, external_latency: None, raw_connector_response: None, connectors: Connectors { razorpay: ConnectorParams { base_url: "https://api.razorpay.com/".to_string(), dispute_base_url: None, ..Default::default() }, ..Default::default() }, vault_headers: None, connector_response_headers: None, raw_connector_request: None, minor_amount_capturable: None,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 400, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_400_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs connector_http_status_code: None, external_latency: None, raw_connector_response: None, connectors: Connectors { razorpay: ConnectorParams { base_url: "https://api.razorpay.com/".to_string(), dispute_base_url: None, ..Default::default() }, ..Default::default() }, vault_headers: None, connector_response_headers: None, raw_connector_request: None, minor_amount_capturable: None, connector_response: None, recurring_mandate_payment_data: None, }, connector_auth_type: ConnectorAuthType::BodyKey { api_key: "dummy_api_key".to_string().into(), key1: "dummy_key1".to_string().into(), }, request: PaymentsAuthorizeData { authentication_data: None, payment_method_data: PaymentMethodData::Card(Card { card_number: RawCardNumber(CardNumber::from_str("123").unwrap_or_default()), card_exp_month: "99".to_string().into(), card_exp_year: "1999".to_string().into(), card_cvc: "1".to_string().into(), card_issuer: 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": 400, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_400_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs connector_http_status_code: None, external_latency: None, raw_connector_response: None, connectors: Connectors { razorpay: ConnectorParams { base_url: "https://api.razorpay.com/".to_string(), dispute_base_url: None, ..Default::default() }, ..Default::default() }, vault_headers: None, connector_response_headers: None, raw_connector_request: None, minor_amount_capturable: None, connector_response: None, recurring_mandate_payment_data: None, }, connector_auth_type: ConnectorAuthType::BodyKey { api_key: "dummy_api_key".to_string().into(), key1: "dummy_key1".to_string().into(), }, request: PaymentsAuthorizeData { authentication_data: None, payment_method_data: PaymentMethodData::Card(Card { card_number: RawCardNumber(CardNumber::from_str("123").unwrap_or_default()), card_exp_month: "99".to_string().into(), card_exp_year: "1999".to_string().into(), card_cvc: "1".to_string().into(), card_issuer: None, card_network: None, card_type: None, card_issuing_country: None, bank_code: None, nick_name: None, card_holder_name: Some("Test User".to_string().into()), co_badged_card_data: None, }), amount: 1000, order_tax_amount: None, email: Some(email), customer_name: None, currency: Currency::USD, confirm: true, integrity_object: None, statement_descriptor_suffix: None, statement_descriptor: None, capture_method: None, router_return_url: None, webhook_url: 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": 400, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_425_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs card_number: RawCardNumber(CardNumber::from_str("123").unwrap_or_default()), card_exp_month: "99".to_string().into(), card_exp_year: "1999".to_string().into(), card_cvc: "1".to_string().into(), card_issuer: None, card_network: None, card_type: None, card_issuing_country: None, bank_code: None, nick_name: None, card_holder_name: Some("Test User".to_string().into()), co_badged_card_data: None, }), amount: 1000, order_tax_amount: None,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 15, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 425, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_425_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs card_number: RawCardNumber(CardNumber::from_str("123").unwrap_or_default()), card_exp_month: "99".to_string().into(), card_exp_year: "1999".to_string().into(), card_cvc: "1".to_string().into(), card_issuer: None, card_network: None, card_type: None, card_issuing_country: None, bank_code: None, nick_name: None, card_holder_name: Some("Test User".to_string().into()), co_badged_card_data: None, }), amount: 1000, order_tax_amount: None, email: Some(email), customer_name: None, currency: Currency::USD, confirm: true, integrity_object: None, statement_descriptor_suffix: None, statement_descriptor: None, capture_method: None, router_return_url: None, webhook_url: None, complete_authorize_url: None, mandate_id: None, setup_future_usage: None, off_session: None, browser_info: None,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 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_-7309825778239710861_425_50
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs card_number: RawCardNumber(CardNumber::from_str("123").unwrap_or_default()), card_exp_month: "99".to_string().into(), card_exp_year: "1999".to_string().into(), card_cvc: "1".to_string().into(), card_issuer: None, card_network: None, card_type: None, card_issuing_country: None, bank_code: None, nick_name: None, card_holder_name: Some("Test User".to_string().into()), co_badged_card_data: None, }), amount: 1000, order_tax_amount: None, email: Some(email), customer_name: None, currency: Currency::USD, confirm: true, integrity_object: None, statement_descriptor_suffix: None, statement_descriptor: None, capture_method: None, router_return_url: None, webhook_url: None, complete_authorize_url: None, mandate_id: None, setup_future_usage: None, off_session: None, browser_info: None, order_category: None, session_token: None, enrolled_for_3ds: false, related_transaction_id: None, payment_experience: None, payment_method_type: Some(PaymentMethodType::Credit), customer_id: None, request_incremental_authorization: false, metadata: None, minor_amount: MinorUnit::new(1000), merchant_order_reference_id: None, shipping_cost: None, merchant_account_id: None, merchant_config_currency: None, all_keys_required: None, access_token: None, customer_acceptance: None, split_payments: None, request_extended_authorization: None, setup_mandate_details: None,
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 50, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 425, "struct_name": null, "total_crates": null, "trait_name": null }
connector-service_snippet_-7309825778239710861_450_15
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs complete_authorize_url: None, mandate_id: None, setup_future_usage: None, off_session: None, browser_info: None, order_category: None, session_token: None, enrolled_for_3ds: false, related_transaction_id: None, payment_experience: None, payment_method_type: Some(PaymentMethodType::Credit), customer_id: None, request_incremental_authorization: false, metadata: None, minor_amount: MinorUnit::new(1000),
{ "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_-7309825778239710861_450_30
clm
snippet
// connector-service/backend/connector-integration/src/connectors/razorpay/test.rs complete_authorize_url: None, mandate_id: None, setup_future_usage: None, off_session: None, browser_info: None, order_category: None, session_token: None, enrolled_for_3ds: false, related_transaction_id: None, payment_experience: None, payment_method_type: Some(PaymentMethodType::Credit), customer_id: None, request_incremental_authorization: false, metadata: None, minor_amount: MinorUnit::new(1000), merchant_order_reference_id: None, shipping_cost: None, merchant_account_id: None, merchant_config_currency: None, all_keys_required: None, access_token: None, customer_acceptance: None, split_payments: None, request_extended_authorization: None, setup_mandate_details: None, enable_overcapture: None, merchant_account_metadata: None, }, response: Err(ErrorResponse { code: "HE_02".to_string(),
{ "chunk": null, "crate": "connector-integration", "enum_name": null, "file_size": null, "for_type": null, "function_name": null, "is_async": null, "is_pub": null, "lines": 30, "method_name": null, "num_enums": null, "num_items": null, "num_structs": null, "repo": "connector-service", "start_line": 450, "struct_name": null, "total_crates": null, "trait_name": null }