id stringlengths 20 153 | type stringclasses 1
value | granularity stringclasses 14
values | content stringlengths 16 84.3k | metadata dict |
|---|---|---|---|---|
connector-service_body_connector-integration_2289989151232074751 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payu/transformers.rs
// Function: determine_upi_app_name
{
// From Haskell getUpiAppName implementation:
// getUpiAppName txnDetail = case getJuspayBankCodeFromInternalMetadata txnDetail of
// Just "JP_PHONEPE" -> "phonepe"
// Just... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "determine_upi_app_name",
"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_8900165179528914744 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payu/transformers.rs
// Function: determine_upi_flow
{
// Based on Haskell implementation:
// getTxnS2SType :: Bool -> Bool -> Bool -> Bool -> Bool -> Maybe Text
// getTxnS2SType isTxnS2SFlow4Enabled s2sEnabled isDirectOTPTxn isEmandateRegis... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "determine_upi_flow",
"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_3597595834915444626 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payu/transformers.rs
// Function: is_upi_collect_flow
{
// Check if the payment method is UPI Collect
matches!(
request.payment_method_data,
PaymentMethodData::Upi(UpiData::UpiCollect(_))
)
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_upi_collect_flow",
"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_-3675838075248781401 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payu/transformers.rs
// Function: generate_payu_hash
{
use sha2::{Digest, Sha512};
// Build hash fields array exactly as PayU expects based on Haskell implementation
// Pattern from Haskell: key|txnid|amount|productinfo|firstname|email|udf1... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "generate_payu_hash",
"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_-2560433793100919787 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payu/transformers.rs
// Function: map_payu_sync_status
{
match payu_status.to_lowercase().as_str() {
"success" => {
// For success, check if it's captured or just authorized
// Based on Haskell: "success" + "captured"... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "map_payu_sync_status",
"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_2732015306476645324 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/elavon/transformers.rs
// Function: try_from
{
let ResponseRouterData {
response,
router_data,
http_code: _,
} = value;
let final_status = match response.ssl_trans_status {
Transac... | {
"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_-1702963613683631798 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/elavon/transformers.rs
// Function: serialize
{
let value = match self {
TransactionType::CcSale => "ccsale",
TransactionType::CcAuthOnly => "ccauthonly",
TransactionType::CcComplete => "cccomplete",
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "serialize",
"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_-3064796422281063914 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/elavon/transformers.rs
// Function: get_avs_details_from_payment_address
{
payment_address
.and_then(|addr| {
addr.get_payment_billing()
.as_ref()
.and_then(|billing_api_address| {
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_avs_details_from_payment_address",
"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_-2823517166006697268 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/elavon/transformers.rs
// Function: deserialize
{
#[derive(Deserialize, Debug)]
#[serde(rename = "txn")]
struct XmlIshResponse {
#[serde(default)]
error_code: Option<String>,
#[serde(default)]
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "deserialize",
"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_6917755796682060175 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/elavon/transformers.rs
// Function: get_elavon_attempt_status
{
match elavon_result {
ElavonResult::Success(payment_response) => {
let status = match payment_response.ssl_transaction_type.as_deref() {
Some("ccauth... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_elavon_attempt_status",
"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_9130526359630749664 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/elavon/transformers.rs
// Function: get_refund_status_from_elavon_sync_response
{
match elavon_response.ssl_transaction_type {
SyncTransactionType::Return => match elavon_response.ssl_trans_status {
TransactionSyncStatus::STL => ... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_refund_status_from_elavon_sync_response",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": ... |
connector-service_body_connector-integration_2575278218298512298 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/phonepe/transformers.rs
// Function: try_from
{
let response = &item.response;
if response.success {
if let Some(data) = &response.data {
// Check if we have required fields for a successful transaction
... | {
"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_6457933934134066336 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/phonepe/transformers.rs
// Function: generate_phonepe_checksum
{
// PhonePe checksum algorithm: SHA256(base64Payload + apiPath + saltKey) + "###" + keyIndex
let checksum_input = format!("{}{}{}", base64_payload, api_path, salt_key.peek());
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "generate_phonepe_checksum",
"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_2939302677369426907 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/phonepe/transformers.rs
// Function: generate_phonepe_sync_checksum
{
// PhonePe sync checksum algorithm: SHA256(apiPath + saltKey) + "###" + keyIndex
let checksum_input = format!("{}{}", api_path, salt_key.peek());
let sha256 = crypto::Sha... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "generate_phonepe_sync_checksum",
"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_1109601933934871398 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/phonepe/transformers.rs
// Function: get_phonepe_error_status
{
match error_code {
"TRANSACTION_NOT_FOUND" => Some(common_enums::AttemptStatus::Failure),
"401" => Some(common_enums::AttemptStatus::AuthenticationFailed),
"400"... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_phonepe_error_status",
"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_-423506458149436971 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/novalnet/transformers.rs
// Function: get_test_mode
{
match item {
Some(true) => TEST_MODE_ENABLED,
Some(false) | None => TEST_MODE_DISABLED,
}
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_test_mode",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-ser... |
connector-service_body_connector-integration_8971430297847553901 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/novalnet/transformers.rs
// Function: try_from
{
match notif.result.status {
NovalnetAPIStatus::Success => {
let refund_id = notif
.transaction
.refund
.tid
... | {
"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_7149848726103475960 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/novalnet/transformers.rs
// Function: from
{
match item {
NovalnetTransactionStatus::Success | NovalnetTransactionStatus::Confirmed => {
Self::Success
}
NovalnetTransactionStatus::Pending => Se... | {
"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_8414870376191667064 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/novalnet/transformers.rs
// Function: get_error_response
{
let error_code = result.status;
let error_reason = result.status_text.clone();
ErrorResponse {
code: error_code.to_string(),
message: error_reason.clone(),
r... | {
"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_6459422468261500668 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/novalnet/transformers.rs
// Function: get_token
{
if let Some(data) = transaction_data {
match &data.payment_data {
Some(NovalnetResponsePaymentData::Card(card_data)) => {
card_data.token.clone().m... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_token",
"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_-2304903721614685179 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/novalnet/transformers.rs
// Function: get_novalnet_dispute_status
{
match status {
WebhookEventType::Chargeback => WebhookDisputeStatus::DisputeOpened,
WebhookEventType::Credit => WebhookDisputeStatus::DisputeWon,
_ => Webhoo... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_novalnet_dispute_status",
"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_-8263213910061241151 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/novalnet/transformers.rs
// Function: foreign_try_from
{
match value {
WebhookDisputeStatus::DisputeOpened => Ok(Self::DisputeOpened),
WebhookDisputeStatus::DisputeWon => Ok(Self::DisputeWon),
WebhookDisputeSt... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "foreign_try_from",
"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_663277235311379812 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/novalnet/transformers.rs
// Function: get_incoming_webhook_event
{
match status {
WebhookEventType::Payment => match transaction_status {
NovalnetTransactionStatus::Confirmed | NovalnetTransactionStatus::Success => {
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_incoming_webhook_event",
"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_-6952957663247157186 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/test.rs
// Function: test_build_request_valid
{
let api_key = "test_adyen_api_key".to_string(); // Hardcoded dummy value
let key1 = "test_adyen_key1".to_string(); // Hardcoded dummy value
let req: RouterDataV2<
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "test_build_request_valid",
"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_-5681562439064172875 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/test.rs
// Function: test_build_request_missing
{
let api_key = "test_adyen_api_key_missing".to_string(); // Hardcoded dummy value
let key1 = "test_adyen_key1_missing".to_string(); // Hardcoded dummy value
let r... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "test_build_request_missing",
"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_-4241795342393484524 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: from
{
match item.request.off_session {
Some(true) => Self::ContinuedAuthentication,
_ => Self::Ecommerce,
}
}
| {
"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_167136384757826940 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: try_from
{
let ResponseRouterData {
response,
router_data,
http_code,
} = value;
match response {
AdyenDefendDisputeResponse::DefendDisputeSuccess... | {
"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_8179419796355489933 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_amount_data
{
Amount {
currency: item.router_data.request.currency,
value: item.router_data.request.minor_amount.to_owned(),
}
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_amount_data",
"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_7518099285019130191 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_adyen_payment_status
{
match adyen_status {
AdyenStatus::AuthenticationFinished => AttemptStatus::AuthenticationSuccessful,
AdyenStatus::AuthenticationNotRequired | AdyenStatus::Received => Atte... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_adyen_payment_status",
"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_-7674069107723274930 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: foreign_try_from
{
match item {
AdyenVoidStatus::Received => Ok(Self::Voided),
AdyenVoidStatus::Processing => Ok(Self::VoidInitiated),
}
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "foreign_try_from",
"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_5367736282980672519 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_adyen_response
{
let status = get_adyen_payment_status(is_capture_manual, response.result_code, pmt);
let error = if response.refusal_reason.is_some()
|| response.refusal_reason_code.is_some()
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_adyen_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_2801762041728564160 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_redirection_response
{
let status = get_adyen_payment_status(is_manual_capture, response.result_code.clone(), pmt);
let error = if response.refusal_reason.is_some()
|| response.refusal_reason_code.i... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_redirection_response",
"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_6071155414175732482 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_wait_screen_metadata
{
match next_action.action.payment_method_type {
PaymentType::Blik => {
let current_time = OffsetDateTime::now_utc().unix_timestamp_nanos();
Ok(Some(serde_js... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_wait_screen_metadata",
"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_-3798901867030574420 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_adyen_payment_webhook_event
{
match code {
WebhookEventCode::Authorisation => {
if is_success_scenario(&is_success) {
Ok(AttemptStatus::Authorized)
} else {
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_adyen_payment_webhook_event",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"rep... |
connector-service_body_connector-integration_-6403774252104309111 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_adyen_refund_webhook_event
{
match code {
WebhookEventCode::Refund | WebhookEventCode::CancelOrRefund => {
if is_success_scenario(&is_success) {
Ok(RefundStatus::Success)
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_adyen_refund_webhook_event",
"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_7571493179599046255 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_adyen_webhook_event_type
{
match code {
WebhookEventCode::Authorisation => EventType::PaymentIntentAuthorizationSuccess,
WebhookEventCode::Cancellation => EventType::PaymentIntentCancelled,
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_adyen_webhook_event_type",
"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_-1298008982947510298 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_webhook_object_from_body
{
let mut webhook: AdyenIncomingWebhook = body
.parse_struct("AdyenIncomingWebhook")
.change_context(errors::ConnectorError::WebhookBodyDecodingFailed)?;
let item_o... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_webhook_object_from_body",
"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_-7646778122907162140 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: build_shopper_reference
{
customer_id.clone().map(|c_id| {
format!(
"{}_{}",
merchant_id.get_string_repr(),
c_id.get_string_repr()
)
})
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_shopper_reference",
"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_-8386024224868229444 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_recurring_processing_model
{
let customer_id = item
.request
.customer_id
.clone()
.ok_or_else(Box::new(move || {
errors::ConnectorError::MissingRequiredField {
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_recurring_processing_model",
"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_-8798471421830085579 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: is_mandate_payment
{
(item.request.setup_future_usage == Some(common_enums::FutureUsage::OffSession))
|| item
.request
.mandate_id
.as_ref()
.and_then(|mandat... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_mandate_payment",
"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_78658032047515618 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_address_info
{
address.and_then(|add| {
add.address.as_ref().map(
|a| -> Result<Address, error_stack::Report<domain_types::errors::ConnectorError>> {
Ok(Address {
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_address_info",
"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_-2107408566965000745 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_additional_data
{
let (authorisation_type, manual_capture) = match item.request.capture_method {
Some(common_enums::CaptureMethod::Manual)
| Some(common_enums::CaptureMethod::ManualMultiple) => ... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_additional_data",
"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_6960544220320963518 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_risk_data
{
let item_i_d = get_str("riskdata.basket.item1.itemID", &metadata);
let product_title = get_str("riskdata.basket.item1.productTitle", &metadata);
let amount_per_item = get_str("riskdata.baske... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_risk_data",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-ser... |
connector-service_body_connector-integration_5334923471569566333 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_amount_data_for_setup_mandate
{
Amount {
currency: item.router_data.request.currency,
value: MinorUnit::new(item.router_data.request.amount.unwrap_or(0)),
}
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_amount_data_for_setup_mandate",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"r... |
connector-service_body_connector-integration_5705254874498825781 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_recurring_processing_model_for_setup_mandate
{
let customer_id = item
.request
.customer_id
.clone()
.ok_or_else(Box::new(move || {
errors::ConnectorError::MissingReq... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_recurring_processing_model_for_setup_mandate",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_struc... |
connector-service_body_connector-integration_6768865710378008378 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_additional_data_for_setup_mandate
{
let (authorisation_type, manual_capture) = match item.request.capture_method {
Some(common_enums::CaptureMethod::Manual)
| Some(common_enums::CaptureMethod::M... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_additional_data_for_setup_mandate",
"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_7767464531085360465 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: is_mandate_payment_for_setup_mandate
{
(item.request.setup_future_usage == Some(common_enums::FutureUsage::OffSession))
|| item
.request
.mandate_id
.as_ref()
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_mandate_payment_for_setup_mandate",
"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_1903287790605873704 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_defence_documents
{
let mut defense_documents: Vec<DefenseDocuments> = Vec::new();
if let Some(shipping_documentation) = item.shipping_documentation {
defense_documents.push(DefenseDocuments {
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_defence_documents",
"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_4575633659855848483 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/adyen/transformers.rs
// Function: get_dispute_stage_and_status
{
use common_enums::{DisputeStage, DisputeStatus as HSDisputeStatus};
match code {
WebhookEventCode::NotificationOfChargeback => {
(DisputeStage::PreDispute, HS... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_dispute_stage_and_status",
"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_3599345303620624584 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv/transformers.rs
// Function: extract_report_group
{
connector_meta_data.as_ref().and_then(|metadata| {
let metadata_value = metadata.peek();
if let serde_json::Value::String(metadata_str) = metadata_value {
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "extract_report_group",
"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_-2933899005532021293 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv/transformers.rs
// Function: serialize
{
let full_xml =
crate::utils::serialize_to_xml_string_with_root("cnpOnlineRequest", &self.cnp_request)
.map_err(serde::ser::Error::custom)?;
// Serialize... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "serialize",
"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_-2920064525125606314 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv/transformers.rs
// Function: try_from
{
if let Some(void_response) = item.response.void_response {
let status =
get_attempt_status(WorldpayvantivPaymentFlow::VoidPC, void_response.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_3035509291250244028 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv/transformers.rs
// Function: from
{
match payment_method_data {
PaymentMethodData::Wallet(WalletData::ApplePay(_)) => Self::ApplePay,
PaymentMethodData::Wallet(WalletData::GooglePay(_)) => Self::AndroidPay,... | {
"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_-7654649454580742779 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv/transformers.rs
// Function: get_payment_flow_type
{
let merchant_txn_id_lower = merchant_txn_id.to_lowercase();
if merchant_txn_id_lower.contains("auth") {
Ok(WorldpayvantivPaymentFlow::Auth)
} else if merchant_txn_id... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_payment_flow_type",
"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_-9124039887709848639 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv/transformers.rs
// Function: determine_attempt_status_for_psync
{
let flow_type = get_payment_flow_type(merchant_txn_id)?;
match payment_status {
PaymentStatus::ProcessedSuccessfully => match flow_type {
World... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "determine_attempt_status_for_psync",
"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_178137810697241402 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv/transformers.rs
// Function: get_payment_info
{
match payment_method_data {
PaymentMethodData::Card(card_data) => {
let card_type = match card_data.card_network.clone() {
Some(network) => Worldpayva... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_payment_info",
"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_3194244177523120164 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv/transformers.rs
// Function: determine_apple_pay_card_type
{
match network.to_lowercase().as_str() {
"visa" => Ok(WorldpayvativCardType::Visa),
"mastercard" => Ok(WorldpayvativCardType::MasterCard),
"amex" => O... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "determine_apple_pay_card_type",
"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_-8885578609909770066 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv/transformers.rs
// Function: determine_google_pay_card_type
{
match network.to_lowercase().as_str() {
"visa" => Ok(WorldpayvativCardType::Visa),
"mastercard" => Ok(WorldpayvativCardType::MasterCard),
"amex" => ... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "determine_google_pay_card_type",
"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_1255259492471053568 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv/transformers.rs
// Function: get_billing_address
{
billing_address.as_ref().map(|addr| BillToAddress {
name: addr.get_optional_full_name(),
company: addr
.address
.as_ref()
.and_then... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_billing_address",
"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_8626123784555749664 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv/transformers.rs
// Function: get_shipping_address
{
shipping_address.as_ref().map(|addr| ShipToAddress {
name: addr.get_optional_full_name(),
company: addr
.address
.as_ref()
.and_th... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_shipping_address",
"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_335763248767403508 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv/transformers.rs
// Function: get_valid_transaction_id
{
if id.len() <= worldpayvantiv_constants::MAX_PAYMENT_REFERENCE_ID_LENGTH {
Ok(id)
} else {
Err(ConnectorError::InvalidConnectorConfig {
config: "T... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_valid_transaction_id",
"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_7159559712404024324 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv/transformers.rs
// Function: get_attempt_status
{
match response {
WorldpayvantivResponseCode::Approved
| WorldpayvantivResponseCode::PartiallyApproved
| WorldpayvantivResponseCode::OfflineApproval
| Wo... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_attempt_status",
"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_3754702375660269929 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/worldpayvantiv/transformers.rs
// Function: is_payment_failure
{
matches!(
status,
common_enums::AttemptStatus::Failure
| common_enums::AttemptStatus::AuthorizationFailed
| common_enums::AttemptStatus::Capture... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "is_payment_failure",
"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_-5155121359121515293 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: create_raw_card_number_for_default_pci
{
let card_number = cards::CardNumber::from_str(&card_string)
.change_context(ConnectorError::RequestEncodingFailed)?;
Ok(RawCardNumber(card_number))
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "create_raw_card_number_for_default_pci",
"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_-2986431828104026782 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: get_invoice_number_or_random
{
match merchant_order_reference_id {
Some(num) if num.len() <= MAX_ID_LENGTH => num,
None | Some(_) => get_random_string(),
}
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_invoice_number_or_random",
"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_-3854798871631725056 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: metadata_to_user_fields
{
let meta = match metadata {
Some(m) => m,
None => return Ok(None),
};
let value = if needs_serialization {
serde_json::to_value(meta).change_cont... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "metadata_to_user_fields",
"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_-2330294263747065860 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: from_card_number_string
{
let card_number = cards::CardNumber::from_str(&card_number)
.change_context(ConnectorError::RequestEncodingFailed)?;
Ok(AuthorizedotnetRawCardNumber(RawCa... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "from_card_number_string",
"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_1449465646301967676 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: try_from
{
// Get connector metadata which contains payment details
let payment_details = item
.router_data
.request
.refund_connector_metadata
... | {
"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_5951716956232968074 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: foreign_try_from
{
let mut vector = Self::new();
if let serde_json::Value::Object(obj) = metadata {
for (key, value) in obj {
vector.push(UserField {
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "foreign_try_from",
"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_-8393901036551814101 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: create_regular_transaction_request
{
let card_data = match &item.router_data.request.payment_method_data {
PaymentMethodData::Card(card) => Ok(card),
_ => Err(ConnectorError::RequestEncodi... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "create_regular_transaction_request",
"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_-3734865662635749939 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: get_avs_response_description
{
match code {
"A" => Some("The street address matched, but the postal code did not."),
"B" => Some("No address information was provided."),
"E" => Som... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_avs_response_description",
"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_-4656878146433900601 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: nvert_to_additional_payment_method_connector_response(
match transaction_response.avs_result_code.as_deref() {
Some("P") | None => None,
Some(code) => {
let description = get_... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "nvert_to_additional_payment_method_connector_response(\n",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"n... |
connector-service_body_connector-integration_9037382331236320121 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: y_from(
let ResponseRouterData {
response,
router_data,
http_code,
} = value;
let mut new_router_data = router_data;
if let Some(profile_... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "y_from(\n",
"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_-8564265908370233728 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: tract_error_details(
let error_code = trans_res
.and_then(|tr| {
tr.errors
.as_ref()
.and_then(|e| e.first().map(|e| e.error_code.clone()))
})
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "tract_error_details(\n",
"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_5855480377509409594 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: eate_error_response(
ErrorResponse {
status_code: http_status_code,
code: error_code,
message: error_message,
reason: None,
attempt_status: Some(status),
c... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "eate_error_response(\n",
"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_417871852355829100 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: om(i
match item {
AuthorizedotnetRefundStatus::Declined | AuthorizedotnetRefundStatus::Error => {
Self::Failure
}
AuthorizedotnetRefundStatus::Appro... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "om(i",
"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_5412980936206162976 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: t_hs_status(
// Return failure immediately if result code is Error
if response.messages.result_code == ResultCode::Error {
return AttemptStatus::Failure;
}
// Handle case when transa... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "t_hs_status(\n",
"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_-2858375450846860317 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: ild_connector_metadata(
// Check if accountNumber is available
// Note: accountType contains card brand (e.g., "MasterCard"), not expiration date
// Authorize.net does not return the expiration d... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "ild_connector_metadata(\n",
"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_3436968530880363225 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: nvert_to_payments_response_data_or_error(
let status = get_hs_status(response, http_status_code, operation, capture_method);
let is_successful_status = matches!(
status,
AttemptStatu... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "nvert_to_payments_response_data_or_error(\n",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": ... |
connector-service_body_connector-integration_919126133519516816 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: om(t
match transaction_status {
RSyncStatus::RefundSettledSuccessfully => Self::Success,
RSyncStatus::RefundPendingSettlement => Self::Pending,
RSyncStatus::Decline... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "om(t",
"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_1890478765028840185 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: t_the_truncate_id(i
id.map(|s| {
if s.len() > max_length {
s[..max_length].to_string()
} else {
s
}
})
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "t_the_truncate_id(i",
"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_-2179520109239481419 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: om(e
match event_type {
AuthorizedotnetWebhookEvent::AuthorizationCreated => Self::AuthorizedPendingCapture,
AuthorizedotnetWebhookEvent::CaptureCreated
| Authorize... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "om(e",
"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_2758684568890164551 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: t_trans_id(d
match details.event_type {
AuthorizedotnetWebhookEvent::CustomerPaymentProfileCreated => {
// For payment profile creation, use the customer_profile_id as the primary iden... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "t_trans_id(d",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-serv... |
connector-service_body_connector-integration_-5371550544248545374 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: y_from(i
Ok(Self {
transaction: Some(SyncTransactionResponse {
transaction_id: get_trans_id(&item)?,
transaction_status: SyncStatus::from(item.event_type),
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "y_from(i",
"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_-6131087668102972734 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/authorizedotnet/transformers.rs
// Function: tract_customer_id_from_error(e
// Look for pattern "ID <numbers>"
error_text
.split_whitespace()
.skip_while(|&word| word != "ID")
.nth(1) // Get the word after "ID"
.a... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "tract_customer_id_from_error(e",
"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_1803423271331507929 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payload/transformers.rs
// Function: try_from
{
Ok(Self {
response: Ok(RefundsResponseData {
connector_refund_id: item.response.transaction_id.to_string(),
refund_status: enums::RefundStatus::from(item... | {
"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_-9163984201023871770 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payload/transformers.rs
// Function: build_payload_cards_request_data
{
if let PaymentMethodData::Card(req_card) = payment_method_data {
let payload_auth = PayloadAuth::try_from((connector_auth_type, currency))?;
let card = requests... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "build_payload_cards_request_data",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"re... |
connector-service_body_connector-integration_-5848746094280989925 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payload/transformers.rs
// Function: from
{
match item {
responses::RefundStatus::Processed => Self::Success,
responses::RefundStatus::Processing => Self::Pending,
responses::RefundStatus::Declined | responses... | {
"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_-8615135968919749553 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payload/transformers.rs
// Function: handle_payment_response
{
match response {
responses::PayloadPaymentsResponse::PayloadCardsResponse(card_response) => {
let status = common_enums::AttemptStatus::from(card_response.status);
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "handle_payment_response",
"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_4668990175512520684 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payload/transformers.rs
// Function: parse_webhook_event
{
serde_json::from_slice::<PayloadWebhookEvent>(body)
.change_context(errors::ConnectorError::WebhookBodyDecodingFailed)
}
| {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "parse_webhook_event",
"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_3895517059563962266 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/payload/transformers.rs
// Function: get_event_type_from_trigger
{
match trigger {
// Payment Success Events
responses::PayloadWebhooksTrigger::Processed => {
domain_types::connector_types::EventType::PaymentIntentSuccess... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "get_event_type_from_trigger",
"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_-2778568033487643384 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/bluecode/test.rs
// Function: test_build_request_valid
{
let api_key = "test_bluecode_api_key".to_string();
let req: RouterDataV2<
Authorize,
PaymentFlowData,
PaymentsAuthorizeData<... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "test_build_request_valid",
"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_1629462245576856132 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/bluecode/test.rs
// Function: test_build_request_missing_fields
{
let api_key = "test_bluecode_api_key_missing".to_string();
let req: RouterDataV2<
Authorize,
PaymentFlowData,
Payme... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "test_build_request_missing_fields",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"r... |
connector-service_body_connector-integration_712796704108455929 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/bluecode/transformers.rs
// Function: try_from
{
let ResponseRouterData {
response,
router_data,
http_code,
} = item;
let status = AttemptStatus::from(response.status);
let response = i... | {
"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_6464085239513599515 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/bluecode/transformers.rs
// Function: from
{
match item {
BluecodePaymentStatus::ManualProcessing => Self::Pending,
BluecodePaymentStatus::Pending | BluecodePaymentStatus::PaymentInitiated => {
Self::Authe... | {
"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_-2217067328481082276 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/bluecode/transformers.rs
// Function: sort_and_minify_json
{
fn sort_value(val: &Value) -> Value {
match val {
Value::Object(map) => {
let mut entries: Vec<_> = map.iter().collect();
entries.sort_b... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "sort_and_minify_json",
"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_171653661457081326 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/bluecode/transformers.rs
// Function: sort_value
{
match val {
Value::Object(map) => {
let mut entries: Vec<_> = map.iter().collect();
entries.sort_by_key(|(k, _)| k.to_owned());
let s... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "sort_value",
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": null,
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "connector-servic... |
connector-service_body_connector-integration_-544205696326195527 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
// Function: try_from
{
match notif {
FiuuRefundSyncResponse::Webhook(fiuu_webhooks_refund_response) => Ok(Self {
connector_refund_id: Some(fiuu_webhooks_refund_response.refund_id),
... | {
"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_-1178774123721862547 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
// Function: calculate_check_sum
{
let formatted_string = format!(
"{}{}{}{}{}{}{}",
req.record_type,
req.merchant_id.peek(),
req.token.peek(),
req.order_id,
req.currency,
... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "calculate_check_sum",
"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_1148353608393418178 | clm | function_body | // connector-service/backend/connector-integration/src/connectors/fiuu/transformers.rs
// Function: calculate_signature
{
let message = signature_data.as_bytes();
let encoded_data = hex::encode(
crypto::Md5
.generate_digest(message)
.change_context(errors::ConnectorError::Reques... | {
"chunk": null,
"crate": "connector-integration",
"enum_name": null,
"file_size": null,
"for_type": null,
"function_name": "calculate_signature",
"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.