id stringlengths 20 153 | type stringclasses 1
value | granularity stringclasses 14
values | content stringlengths 16 84.3k | metadata dict |
|---|---|---|---|---|
connector-service_body_connector-integration_-7571287875217013577 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/razorpay.rs
// Function: get_request_body
{
let converted_amount = self
.amount_converter
.convert(req.request.minor_amount_to_capture, req.request.currency)
.change_context(errors::ConnectorError::RequestEnco... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_request_body",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-... |
connector-service_body_connector-integration_7316385582725157319 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/razorpay.rs
// Function: handle_response_v2
{
let response: razorpay::RazorpayCaptureResponse = res
.response
.parse_struct("RazorpayCaptureResponse")
.map_err(|err| {
report!(errors::Connector... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "handle_response_v2",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connecto... |
connector-service_body_connector-integration_-3441543475276427313 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/razorpay.rs
// Function: get_event_type
{
let payload = transformers::get_webhook_object_from_body(request.body).map_err(|err| {
report!(errors::ConnectorError::WebhookBodyDecodingFailed)
.attach_printable(format!("er... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_event_type",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-se... |
connector-service_body_connector-integration_2222899861964199352 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/razorpay.rs
// Function: process_payment_webhook
{
let request_body_copy = request.body.clone();
let payload = transformers::get_webhook_object_from_body(request.body).map_err(|err| {
report!(errors::ConnectorError::WebhookBo... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "process_payment_webhook",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "con... |
connector-service_body_connector-integration_-4776203926114871987 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/razorpay.rs
// Function: process_refund_webhook
{
let request_body_copy = request.body.clone();
let payload = transformers::get_webhook_object_from_body(request.body).map_err(|err| {
report!(errors::ConnectorError::WebhookBod... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "process_refund_webhook",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "conn... |
connector-service_body_connector-integration_-632523813206235948 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/razorpay.rs
// Function: validate_mandate_payment
{
let mandate_supported_pmd = std::collections::HashSet::from([PaymentMethodDataType::Card]);
is_mandate_supported(pm_data, pm_type, mandate_supported_pmd, self.id())
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "validate_mandate_payment",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "co... |
connector-service_body_connector-integration_1041528722336276981 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/razorpay.rs
// Function: validate_psync_reference_id
{
if data.encoded_data.is_some() {
return Ok(());
}
Err(errors::ConnectorError::MissingRequiredField {
field_name: "encoded_data",
}
.in... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "validate_psync_reference_id",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": ... |
connector-service_body_connector-integration_8384678097382920721 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpay.rs
// Function: get_auth_header
{
let auth = worldpay::WorldpayAuthType::try_from(auth_type)
.change_context(errors::ConnectorError::FailedToObtainAuthType)?;
Ok(vec![(
headers::AUTHORIZATION.to_string(),... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_auth_header",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-s... |
connector-service_body_connector-integration_189987158657173823 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpay.rs
// Function: build_error_response
{
let response = if !res.response.is_empty() {
res.response
.parse_struct("WorldpayErrorResponse")
.change_context(errors::ConnectorError::ResponseDeserial... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_5734756975046770815 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/volt.rs
// Function: build_error_response
{
let response: volt::VoltErrorResponse = res
.response
.parse_struct("VoltErrorResponse")
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_-7552583342404676401 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/fiuu.rs
// Function: build_error_response
{
let response: fiuu::FiuuErrorResponse = res
.response
.parse_struct("fiuu::FiuuErrorResponse")
.change_context(errors::ConnectorError::ResponseDeserializationFailed)... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_-8921672900864899698 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/fiuu.rs
// Function: get_url
{
Ok(format!(
"{}RMS/API/gate-query/index.php",
self.connector_base_url_payments(req)
))
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_url",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",... |
connector-service_body_connector-integration_8028544984512183043 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/fiuu.rs
// Function: get_request_body
{
let bridge = self.p_sync;
let input_data = FiuuRouterData {
connector: self.to_owned(),
router_data: req.clone(),
};
let request = bridge.request_body(input_... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_request_body",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-... |
connector-service_body_connector-integration_1585140472056921292 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/fiuu.rs
// Function: handle_response_v2
{
match res.headers {
Some(headers) => {
let content_header = utils::get_http_header("Content-type", &headers)
.attach_printable("Missing content type in hea... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "handle_response_v2",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connecto... |
connector-service_body_connector-integration_-6780363234530636826 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/fiuu.rs
// Function: get_webhook_source_verification_signature
{
let header = request
.headers
.get("content-type")
.ok_or(errors::ConnectorError::WebhookSourceVerificationFailed)?;
let resource: FiuuW... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_webhook_source_verification_signature",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": nu... |
connector-service_body_connector-integration_-8151310081204394688 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/fiuu.rs
// Function: get_webhook_source_verification_message
{
let header = request
.headers
.get("content-type")
.ok_or(errors::ConnectorError::WebhookSourceVerificationFailed)?;
let resource: FiuuWeb... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_webhook_source_verification_message",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null... |
connector-service_body_connector-integration_7999311101286408366 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/fiuu.rs
// Function: verify_webhook_source
{
let algorithm = crypto::Md5;
let connector_webhook_secrets = match connector_webhook_secret {
Some(secrets) => secrets,
None => Err(domain_types::errors::ConnectorErro... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "verify_webhook_source",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "conne... |
connector-service_body_connector-integration_2238187406495655261 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/fiuu.rs
// Function: get_event_type
{
let header = request
.headers
.get("content-type")
.ok_or(errors::ConnectorError::WebhookSourceVerificationFailed)?;
let resource: FiuuWebhooksResponse = if heade... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_event_type",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-se... |
connector-service_body_connector-integration_1467597268859528544 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/fiuu.rs
// Function: get_webhook_resource_object
{
let header = request
.headers
.get("content-type")
.ok_or(errors::ConnectorError::WebhookBodyDecodingFailed)?;
let payload: FiuuWebhooksResponse = if... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_webhook_resource_object",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": ... |
connector-service_body_connector-integration_8350515313512997096 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/fiuu.rs
// Function: process_payment_webhook
{
Ok(WebhookDetailsResponse {
resource_id: None,
status: common_enums::AttemptStatus::Unknown,
connector_response_reference_id: None,
error_code: None,
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "process_payment_webhook",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "con... |
connector-service_body_connector-integration_-7098855071164778483 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/fiuu.rs
// Function: process_refund_webhook
{
let header = request
.headers
.get("content-type")
.ok_or(errors::ConnectorError::WebhookBodyDecodingFailed)?;
let payload: FiuuWebhooksResponse = if head... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "process_refund_webhook",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "conn... |
connector-service_body_connector-integration_-8884561724767210004 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/fiuu.rs
// Function: parse_response
{
let response_str = String::from_utf8(data.to_vec()).map_err(|e| {
error!("Error in Deserializing Response Data: {:?}", e);
errors::ConnectorError::ResponseDeserializationFailed
})?;
let ... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "parse_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-se... |
connector-service_body_connector-integration_-215533353466898770 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/fiuu.rs
// Function: parse_and_log_keys_in_url_encoded_response
{
match std::str::from_utf8(data) {
Ok(query_str) => {
let loggable_keys = [
"status",
"orderid",
"tranID",
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "parse_and_log_keys_in_url_encoded_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": n... |
connector-service_body_connector-integration_2900781375977387707 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/phonepe.rs
// Function: get_auth_header
{
let _auth = phonepe::PhonepeAuthType::try_from(auth_type)
.change_context(errors::ConnectorError::FailedToObtainAuthType)?;
Ok(vec![(
"Content-Type".to_string(),
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_auth_header",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-s... |
connector-service_body_connector-integration_1927953236325825598 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/phonepe.rs
// Function: build_error_response
{
// Parse PhonePe error response (unified for both sync and payments)
let (error_message, error_code, attempt_status) = if let Ok(error_response) =
res.response
.p... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_7547272039749893692 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/helcim.rs
// Function: get_auth_header
{
let auth = helcim::HelcimAuthType::try_from(auth_type)
.change_context(errors::ConnectorError::FailedToObtainAuthType)?;
Ok(vec![(
headers::API_TOKEN.to_string(),
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_auth_header",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-s... |
connector-service_body_connector-integration_-1436091478754495665 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/helcim.rs
// Function: build_error_response
{
let response: helcim::HelcimErrorResponse = res
.response
.parse_struct("HelcimErrorResponse")
.change_context(errors::ConnectorError::ResponseDeserializationFaile... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_5851360822222492636 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/mifinity.rs
// Function: get_auth_header
{
let auth = MifinityAuthType::try_from(auth_type)
.change_context(errors::ConnectorError::FailedToObtainAuthType)?;
Ok(vec![("key".to_string(), auth.key.expose().into_masked())])
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_auth_header",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-s... |
connector-service_body_connector-integration_-502111590944834684 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/mifinity.rs
// Function: build_error_response
{
if res.response.is_empty() {
Ok(ErrorResponse {
status_code: res.status_code,
code: "No error code".to_string(),
message: "No error messa... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_-7904421727497723039 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/bluecode.rs
// Function: verify_webhook_source
{
let connector_webhook_secrets = match connector_webhook_secret {
Some(secrets) => secrets.secret,
None => return Ok(false),
};
let security_header = reques... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "verify_webhook_source",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "conne... |
connector-service_body_connector-integration_-1504575242888662960 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/bluecode.rs
// Function: process_payment_webhook
{
let request_body_copy = request.body.clone();
let webhook_body: transformers::BluecodeWebhookResponse = request
.body
.parse_struct("BluecodeWebhookResponse")
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "process_payment_webhook",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "con... |
connector-service_body_connector-integration_9160131929266963698 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/bluecode.rs
// Function: get_auth_header
{
let auth = BluecodeAuthType::try_from(auth_type)
.change_context(errors::ConnectorError::FailedToObtainAuthType)?;
Ok(vec![(
headers::AUTHORIZATION.to_string(),
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_auth_header",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-s... |
connector-service_body_connector-integration_-3506774410299189820 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/bluecode.rs
// Function: build_error_response
{
let response: BluecodeErrorResponse = res
.response
.parse_struct("BluecodeErrorResponse")
.change_context(errors::ConnectorError::ResponseDeserializationFailed)... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_2690919274058171796 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/bluecode.rs
// Function: validate_mandate_payment
{
match pm_data {
PaymentMethodData::Card(_) => Err(errors::ConnectorError::NotImplemented(
"validate_mandate_payment does not support cards".to_string(),
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "validate_mandate_payment",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "co... |
connector-service_body_connector-integration_-1648689825258421689 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/stripe.rs
// Function: get_auth_header
{
let auth = stripe::StripeAuthType::try_from(auth_type)
.change_context(errors::ConnectorError::FailedToObtainAuthType)?;
Ok(vec![
(
headers::AUTHORIZATION.t... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_auth_header",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-s... |
connector-service_body_connector-integration_-1213445061676583630 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/stripe.rs
// Function: build_error_response
{
let response: stripe::ErrorResponse = res
.response
.parse_struct("ErrorResponse")
.change_context(ConnectorError::ResponseDeserializationFailed)?;
with_e... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_5262077823121277769 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/rapyd.rs
// Function: get_auth_header
{
let auth = RapydAuthType::try_from(auth_type)
.change_context(errors::ConnectorError::FailedToObtainAuthType)?;
// Return basic auth headers - signature will be added in get_headers me... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_auth_header",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-s... |
connector-service_body_connector-integration_-9188194821457685648 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/rapyd.rs
// Function: build_error_response
{
let response: Result<RapydPaymentsResponse, Report<common_utils::errors::ParsingError>> =
res.response.parse_struct("rapyd ErrorResponse");
match response {
Ok(respons... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_5915913507780613867 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/cryptopay.rs
// Function: get_auth_header
{
let auth = cryptopay::CryptopayAuthType::try_from(auth_type)
.change_context(errors::ConnectorError::FailedToObtainAuthType)?;
Ok(vec![(
headers::AUTHORIZATION.to_string... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_auth_header",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-s... |
connector-service_body_connector-integration_-2369417119541641091 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/cryptopay.rs
// Function: build_error_response
{
let response: cryptopay::CryptopayErrorResponse = res
.response
.parse_struct("CryptopayErrorResponse")
.change_context(errors::ConnectorError::ResponseDeserial... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_1289114260966462833 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/cryptopay.rs
// Function: get_webhook_source_verification_signature
{
let base64_signature = request
.headers
.get("x-cryptopay-signature")
.ok_or(errors::ConnectorError::WebhookSourceVerificationFailed)
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_webhook_source_verification_signature",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": nu... |
connector-service_body_connector-integration_-1237073407817626933 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/cryptopay.rs
// Function: get_webhook_source_verification_message
{
let message = std::str::from_utf8(&request.body)
.change_context(errors::ConnectorError::WebhookSourceVerificationFailed)
.attach_printable("Webhook sour... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_webhook_source_verification_message",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null... |
connector-service_body_connector-integration_-7848549749971430659 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/cryptopay.rs
// Function: verify_webhook_source
{
let algorithm = crypto::HmacSha256;
let connector_webhook_secrets = match connector_webhook_secret {
Some(secrets) => secrets,
None => Err(domain_types::errors::C... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "verify_webhook_source",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "conne... |
connector-service_body_connector-integration_-5446855348638743212 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/cryptopay.rs
// Function: get_event_type
{
let notif: cryptopay::CryptopayWebhookDetails = request
.body
.parse_struct("CryptopayWebhookDetails")
.change_context(errors::ConnectorError::WebhookEventTypeNotFoun... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_event_type",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-se... |
connector-service_body_connector-integration_-93599485080688997 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/cryptopay.rs
// Function: process_payment_webhook
{
let notif: cryptopay::CryptopayWebhookDetails = request
.body
.parse_struct("CryptopayWebhookDetails")
.change_context(errors::ConnectorError::WebhookEventTy... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "process_payment_webhook",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "con... |
connector-service_body_connector-integration_5109453963539044520 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/checkout.rs
// Function: get_auth_header
{
let auth = transformers::CheckoutAuthType::try_from(auth_type)
.change_context(errors::ConnectorError::FailedToObtainAuthType)?;
Ok(vec![(
headers::AUTHORIZATION.to_strin... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_auth_header",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-s... |
connector-service_body_connector-integration_3696234339673166478 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/checkout.rs
// Function: build_error_response
{
let response: CheckoutErrorResponse = if res.response.is_empty() {
let (error_codes, error_type) = if res.status_code == 401 {
(
Some(vec!["Invalid a... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_1094722381260037946 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/razorpayv2.rs
// Function: new
{
&Self {
amount_converter: &common_utils::types::MinorUnitForConnector,
_phantom: std::marker::PhantomData,
}
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "new",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"... |
connector-service_body_connector-integration_-299579780432541397 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/razorpayv2.rs
// Function: get_auth_header
{
let auth = razorpayv2::RazorpayV2AuthType::try_from(auth_type)
.change_context(errors::ConnectorError::FailedToObtainAuthType)?;
Ok(vec![(
headers::AUTHORIZATION.to_str... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_auth_header",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-s... |
connector-service_body_connector-integration_-6366760446948384412 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/razorpayv2.rs
// Function: build_error_response
{
let response: razorpayv2::RazorpayV2ErrorResponse = res
.response
.parse_struct("RazorpayV2ErrorResponse")
.change_context(errors::ConnectorError::ResponseDese... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_3996886326951440771 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/razorpayv2.rs
// Function: get_headers
{
let mut headers = vec![(
headers::CONTENT_TYPE.to_string(),
"application/json".to_string().into(),
)];
let mut auth_headers = self.get_auth_header(&req.connector_au... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_headers",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-servi... |
connector-service_body_connector-integration_5716527772711383934 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/razorpayv2.rs
// Function: get_url
{
let base_url = &req.resource_common_data.connectors.razorpayv2.base_url;
let connector_payment_id = &req.request.connector_transaction_id;
Ok(format!(
"{base_url}v1/payments/{conne... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_url",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",... |
connector-service_body_connector-integration_-6119063708497718768 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/razorpayv2.rs
// Function: get_request_body
{
let converted_amount = self
.amount_converter
.convert(req.request.minor_refund_amount, req.request.currency)
.change_context(errors::ConnectorError::RequestEncodi... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_request_body",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-... |
connector-service_body_connector-integration_8008120248975303706 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/razorpayv2.rs
// Function: handle_response_v2
{
let response: razorpayv2::RazorpayV2RefundResponse = res
.response
.parse_struct("RazorpayV2RefundResponse")
.change_context(errors::ConnectorError::ResponseDese... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "handle_response_v2",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connecto... |
connector-service_body_connector-integration_-4304612732005902899 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/macros.rs
// Function: response
{
if bytes.is_empty() {
serde_json::from_str("{}")
.change_context(errors::ConnectorError::ResponseDeserializationFailed)
} else {
bytes
.parse_struc... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service"... |
connector-service_body_connector-integration_-3255286691494576199 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/aci.rs
// Function: get_auth_header
{
let auth = aci::AciAuthType::try_from(auth_type)
.change_context(errors::ConnectorError::FailedToObtainAuthType)?;
Ok(vec![(
headers::AUTHORIZATION.to_string(),
fo... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_auth_header",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-s... |
connector-service_body_connector-integration_641024712665909102 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/aci.rs
// Function: build_error_response
{
let response: aci::AciErrorResponse = res
.response
.parse_struct("AciErrorResponse")
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_-1860421272076504246 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/elavon.rs
// Function: build_error_response
{
match res
.response
.parse_struct::<elavon::ElavonPaymentsResponse>("ElavonPaymentsResponse")
.map_err(|_| errors::ConnectorError::ResponseDeserializationFailed)
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_-1019376945297712761 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet.rs
// Function: verify_webhook_source
{
// If no webhook secret is provided, cannot verify
let webhook_secret = match connector_webhook_secret {
Some(secrets) => secrets.secret,
None => return Ok(f... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "verify_webhook_source",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "conne... |
connector-service_body_connector-integration_-6429782132288584706 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet.rs
// Function: get_event_type
{
let webhook_body: AuthorizedotnetWebhookEventType = request
.body
.parse_struct("AuthorizedotnetWebhookEventType")
.change_context(ConnectorError::WebhookEventT... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_event_type",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-se... |
connector-service_body_connector-integration_-2219996987668904238 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet.rs
// Function: process_payment_webhook
{
let request_body_copy = request.body.clone();
let webhook_body: AuthorizedotnetWebhookObjectId = request
.body
.parse_struct("AuthorizedotnetWebhookObjectI... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "process_payment_webhook",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "con... |
connector-service_body_connector-integration_-2292690856165331702 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet.rs
// Function: process_refund_webhook
{
let request_body_copy = request.body.clone();
let webhook_body: AuthorizedotnetWebhookObjectId = request
.body
.parse_struct("AuthorizedotnetWebhookObjectId... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "process_refund_webhook",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "conn... |
connector-service_body_connector-integration_4332481879722836047 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet.rs
// Function: build_error_response
{
let response: transformers::ResponseMessages = res
.response
.parse_struct("ResponseMessages")
.map_err(|_| ConnectorError::ResponseDeserializationFailed)... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_3297076432563105908 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet.rs
// Function: get_request_body
{
// This is a placeholder implementation
// The actual refund logic should be handled by specific implementations
Err(ConnectorError::NotImplemented("Refund not implemented for ge... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_request_body",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-... |
connector-service_body_connector-integration_1149203201784082838 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payload.rs
// Function: get_auth_header
{
let auth = payload::PayloadAuthType::try_from(auth_type)
.change_context(errors::ConnectorError::FailedToObtainAuthType)?;
// The API key is the same for all currencies, so we can tak... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_auth_header",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-s... |
connector-service_body_connector-integration_4305318005823475314 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payload.rs
// Function: build_error_response
{
let response: PayloadErrorResponse = res
.response
.parse_struct("PayloadErrorResponse")
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_-7458802218834735305 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payload.rs
// Function: get_webhook_source_verification_signature
{
let signature = request
.headers
.get(headers::X_PAYLOAD_SIGNATURE)
.map(|header_value| header_value.as_bytes().to_vec())
.ok_or(... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_webhook_source_verification_signature",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": nu... |
connector-service_body_connector-integration_-3825368285375067169 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payload.rs
// Function: verify_webhook_source
{
let algorithm = common_utils::crypto::Sha256;
let connector_webhook_secrets = match connector_webhook_secret {
Some(secrets) => secrets,
None => {
r... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "verify_webhook_source",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "conne... |
connector-service_body_connector-integration_-6117839938170545747 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payload.rs
// Function: get_event_type
{
let webhook_body: transformers::PayloadWebhookEvent = request
.body
.parse_struct("PayloadWebhookEvent")
.change_context(errors::ConnectorError::WebhookBodyDecodingFail... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_event_type",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-se... |
connector-service_body_connector-integration_3679372211755775360 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payload.rs
// Function: get_webhook_resource_object
{
let webhook_body: transformers::PayloadWebhookEvent = request
.body
.parse_struct("PayloadWebhookEvent")
.change_context(errors::ConnectorError::WebhookBod... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_webhook_resource_object",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": ... |
connector-service_body_connector-integration_-8584907116032210648 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/trustpay.rs
// Function: build_error_response
{
let response: Result<TrustpayErrorResponse, Report<common_utils::errors::ParsingError>> =
res.response.parse_struct("trustpay ErrorResponse");
match response {
Ok(r... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_8439462769836917282 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/placetopay.rs
// Function: build_error_response
{
let response: placetopay::PlacetopayErrorResponse = res
.response
.parse_struct("PlacetopayErrorResponse")
.change_context(errors::ConnectorError::ResponseDese... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_-4538026060445534962 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/helcim/transformers.rs
// Function: check_currency
{
if currency == common_enums::Currency::USD {
Ok(currency)
} else {
Err(errors::ConnectorError::NotSupported {
message: format!("currency {currency} is not supported... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "check_currency",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-se... |
connector-service_body_connector-integration_-6984681284988699009 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/helcim/transformers.rs
// Function: try_from
{
Ok(Self {
response: Ok(RefundsResponseData {
connector_refund_id: item.response.transaction_id.to_string(),
refund_status: common_enums::RefundStatus::fro... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "try_from",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service"... |
connector-service_body_connector-integration_3422008630065729510 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/helcim/transformers.rs
// Function: from
{
match item.transaction_type {
HelcimRefundTransactionType::Refund => match item.status {
HelcimPaymentStatus::Approved => Self::Success,
HelcimPaymentStatus::... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "from",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
... |
connector-service_body_connector-integration_-4321416530944177081 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
// Function: try_from
{
let reference_id = Some(
item.router_data
.resource_common_data
.connector_request_reference_id
.clone(),
);
let order_... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "try_from",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service"... |
connector-service_body_connector-integration_1904185500043067894 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
// Function: build_error_response
{
let error_messages = response
.iter()
.map(|error| error.message.to_string())
.collect::<Vec<String>>();
let reason = match !error_messages.is_empty() {
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connec... |
connector-service_body_connector-integration_-6761038712963536350 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
// Function: get_error_response
{
Err(Box::new(domain_types::router_data::ErrorResponse {
code: error_code.unwrap_or_else(|| NO_ERROR_CODE.to_string()),
message: error_msg.unwrap_or_else(|| NO_ERROR_MESSAGE.... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connecto... |
connector-service_body_connector-integration_-7817174023340429534 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
// Function: create_failure_error_response
{
let status_string = status.to_string();
domain_types::router_data::ErrorResponse {
code: status_string.clone(),
message: status_string.clone(),
reason... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "create_failure_error_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo"... |
connector-service_body_connector-integration_-8268771788428002779 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
// Function: from
{
match item {
BraintreeRefundStatus::Settled
| BraintreeRefundStatus::Settling
| BraintreeRefundStatus::SubmittedForSettlement
| BraintreeRefundStatus::... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "from",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
... |
connector-service_body_connector-integration_483564631913249337 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
// Function: extract_metadata_field
{
metadata
.as_ref()
.and_then(|metadata| {
let exposed = metadata.clone().expose();
exposed
.get(field_name)
.and_... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "extract_metadata_field",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "conn... |
connector-service_body_connector-integration_3195557981787106941 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
// Function: extract_metadata_string_field
{
metadata
.as_ref()
.and_then(|metadata| {
let exposed = metadata.clone().expose();
exposed
.get(field_name)
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "extract_metadata_string_field",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo"... |
connector-service_body_connector-integration_8831325716289253065 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
// Function: get_card_isin_from_payment_method_data
{
match card_details {
PaymentMethodData::Card(card_data) => {
let card_number_str = format!("{:?}", card_data.card_number.0);
let cleaned_... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_card_isin_from_payment_method_data",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,... |
connector-service_body_connector-integration_660694642381827870 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
// Function: get_braintree_redirect_form
{
Ok(RedirectForm::Braintree {
client_token: client_token_data
.data
.create_client_token
.client_token
.expose(),
car... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_braintree_redirect_form",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": ... |
connector-service_body_connector-integration_-4509922505890427308 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/braintree/transformers.rs
// Function: validate_currency
{
let merchant_config_currency =
merchant_config_currency.ok_or(errors::ConnectorError::NoConnectorMetaData)?;
if request_currency != merchant_config_currency {
Err(errors:... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "validate_currency",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector... |
connector-service_body_connector-integration_-3077146323451367751 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
// Function: fmt
{
match self {
Self::Authorized => write!(f, "authorized"),
Self::Refused => write!(f, "refused"),
Self::SentForSettlement => write!(f, "sentForSettlement"),
S... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "fmt",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
"... |
connector-service_body_connector-integration_-3524783540640719383 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
// Function: get_resource_id
{
// First check top-level _links (for capture, authorize, etc.)
let optional_reference_id = response
.links
.as_ref()
.and_then(|link| link.self_link.href.rsplit_once('/'... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_resource_id",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-s... |
connector-service_body_connector-integration_-8949055349067764251 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpay/response.rs
// Function: default
{
match status_code {
code @ 404 => Self {
error_name: format!("{code} Not found"),
message: "Resource not found".to_string(),
validation_error... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "default",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",... |
connector-service_body_connector-integration_-6870044579557088761 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs
// Function: try_from
{
let status = enums::AttemptStatus::from(item.response.outcome.clone());
let (_redirection_data, connector_response_reference_id) =
extract_redirection_data(&item.response)?;
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "try_from",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service"... |
connector-service_body_connector-integration_5057857530063268768 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs
// Function: fetch_payment_instrument
{
match payment_method {
PaymentMethodData::Card(card) => {
// Extract expiry month and year using helper functions
let expiry_month_i8 = card.get_expiry_... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "fetch_payment_instrument",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "co... |
connector-service_body_connector-integration_2092038884879643199 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs
// Function: create_three_ds_request
{
match (
&router_data.resource_common_data.auth_type,
&router_data.request.payment_method_data,
) {
// 3DS for NTI flow
(_, PaymentMethodData::CardDet... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "create_three_ds_request",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "con... |
connector-service_body_connector-integration_-7406223009684672156 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs
// Function: get_settlement_info
{
match router_data.request.capture_method.unwrap_or_default() {
_ if amount == MinorUnit::zero() => None,
enums::CaptureMethod::Automatic | enums::CaptureMethod::SequentialAu... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_settlement_info",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connect... |
connector-service_body_connector-integration_-6268339382331430753 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs
// Function: get_token_and_agreement
{
match (payment_method_data, setup_future_usage, off_session) {
// CIT - Setup for future usage (creates token for future MIT via RepeatPayment)
(PaymentMethodData::Card(... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_token_and_agreement",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "con... |
connector-service_body_connector-integration_4046033018174556701 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs
// Function: from
{
match value {
EventType::Refunded | EventType::SentForRefund => Self::Success,
EventType::RefundFailed => Self::Failure,
EventType::Authorized
| EventTy... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "from",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service",
... |
connector-service_body_connector-integration_4513066018639816036 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs
// Function: extract_redirection_data
{
match &response.other_fields {
Some(WorldpayPaymentResponseFields::ThreeDsChallenged(challenged)) => {
let redirect_form = RedirectForm::Form {
endp... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "extract_redirection_data",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "co... |
connector-service_body_connector-integration_5018237074213886487 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpay/transformers.rs
// Function: extract_three_ds_metadata
{
match &response.other_fields {
Some(WorldpayPaymentResponseFields::RefusedResponse(refused)) => {
// Check for 3DS data in refused response
if let Some... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "extract_three_ds_metadata",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "c... |
connector-service_body_connector-integration_-2123970909380419765 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payu/transformers.rs
// Function: deserialize_payu_status
{
use serde_json::Value;
let value: Option<Value> = Option::deserialize(deserializer)?;
match value {
Some(Value::Number(n)) => {
if let Some(i) = n.as_i64() {
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "deserialize_payu_status",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "con... |
connector-service_body_connector-integration_2420171303857288176 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payu/transformers.rs
// Function: try_from
{
let response = item.response;
let error_message = response
.msg
.unwrap_or_else(|| "PayU PSync error".to_string());
// Check PayU status field - 0 means error, ... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "try_from",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-service"... |
connector-service_body_connector-integration_4643251440628525040 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payu/transformers.rs
// Function: generate_payu_verify_hash
{
use sha2::{Digest, Sha512};
// PayU verify hash format: key|command|var1|salt
let hash_fields = [
request.key.clone(),
request.command.clone(),
request.va... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "generate_payu_verify_hash",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "c... |
connector-service_body_connector-integration_6892969105233692280 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payu/transformers.rs
// Function: generate_udf_fields
{
// Based on Haskell implementation:
// udf1-udf5 come from PayuMetaData (if available) or default values
// udf6-udf9 come from orderReference fields
// udf10 is always empty string... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "generate_udf_fields",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connect... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.