Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/hyperswitch_connectors/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7157,6 +7157,7 @@ pub(crate) fn convert_payment_authorize_router_response<F1, F2, T1, T2>(
frm_metadata: data.frm_metadata.clone(),
dispute_id: data.dispute_id.clone(),
refund_id: data.refund_id.clone(),
payout_id: data.payout_id.clone(),
connector_response: data.connector_response.clone(),
integrity_check: Ok(()),
additional_merchant_data: data.additional_merchant_data.clone(),
Expand Down
1 change: 1 addition & 0 deletions crates/hyperswitch_domain_models/src/router_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ pub struct RouterData<Flow, Request, Response> {

pub dispute_id: Option<String>,
pub refund_id: Option<String>,
pub payout_id: Option<String>,

/// This field is used to store various data regarding the response from connector
pub connector_response: Option<ConnectorResponseData>,
Expand Down
1 change: 1 addition & 0 deletions crates/hyperswitch_interfaces/src/api_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ where
external_latency,
req.refund_id.clone(),
req.dispute_id.clone(),
req.payout_id.clone(),
status_code,
);

Expand Down
1 change: 1 addition & 0 deletions crates/hyperswitch_interfaces/src/conversion_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ fn get_default_router_data<F, Req, Resp>(
frm_metadata: None,
dispute_id: None,
refund_id: None,
payout_id: None,
connector_response: None,
payment_method_status: None,
minor_amount_captured: None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub struct ConnectorEvent {
latency: u128,
refund_id: Option<String>,
dispute_id: Option<String>,
payout_id: Option<String>,
status_code: u16,
}

Expand All @@ -44,6 +45,7 @@ impl ConnectorEvent {
latency: u128,
refund_id: Option<String>,
dispute_id: Option<String>,
payout_id: Option<String>,
status_code: u16,
) -> Self {
Self {
Expand All @@ -68,6 +70,7 @@ impl ConnectorEvent {
latency,
refund_id,
dispute_id,
payout_id,
status_code,
}
}
Expand Down
1 change: 1 addition & 0 deletions crates/router/src/core/authentication/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ pub fn construct_router_data<F: Clone, Req, Res>(
frm_metadata: None,
dispute_id: None,
refund_id: None,
payout_id: None,
payment_method_status: None,
connector_response: None,
integrity_check: Ok(()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ impl ConstructFlowSpecificData<frm_api::Checkout, FraudCheckCheckoutData, FraudC
frm_metadata: self.frm_metadata.clone(),
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ pub async fn construct_fulfillment_router_data<'a>(
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ impl ConstructFlowSpecificData<RecordReturn, FraudCheckRecordReturnData, FraudCh
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down
1 change: 1 addition & 0 deletions crates/router/src/core/fraud_check/flows/sale_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ impl ConstructFlowSpecificData<frm_api::Sale, FraudCheckSaleData, FraudCheckResp
frm_metadata: self.frm_metadata.clone(),
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ impl
frm_metadata: self.frm_metadata.clone(),
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down
1 change: 1 addition & 0 deletions crates/router/src/core/mandate/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ pub async fn construct_mandate_revoke_router_data(
quote_id: None,
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down
1 change: 1 addition & 0 deletions crates/router/src/core/payment_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3890,6 +3890,7 @@ async fn create_single_use_tokenization_flow(
frm_metadata: None,
dispute_id: None,
refund_id: None,
payout_id: None,
connector_response: None,
payment_method_status: None,
minor_amount_captured: None,
Expand Down
1 change: 1 addition & 0 deletions crates/router/src/core/payments/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4545,6 +4545,7 @@ pub fn router_data_type_conversion<F1, F2, Req1, Req2, Res1, Res2>(
frm_metadata: router_data.frm_metadata,
refund_id: router_data.refund_id,
dispute_id: router_data.dispute_id,
payout_id: router_data.payout_id,
connector_response: router_data.connector_response,
integrity_check: Ok(()),
connector_wallets_details: router_data.connector_wallets_details,
Expand Down
8 changes: 8 additions & 0 deletions crates/router/src/core/payments/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ where
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down Expand Up @@ -541,6 +542,7 @@ pub async fn construct_payment_router_data_for_authorize<'a>(
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down Expand Up @@ -889,6 +891,7 @@ pub async fn construct_payment_router_data_for_capture<'a>(
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down Expand Up @@ -1022,6 +1025,7 @@ pub async fn construct_router_data_for_psync<'a>(
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down Expand Up @@ -1388,6 +1392,7 @@ pub async fn construct_payment_router_data_for_sdk_session<'a>(
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down Expand Up @@ -1619,6 +1624,7 @@ pub async fn construct_payment_router_data_for_setup_mandate<'a>(
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down Expand Up @@ -1920,6 +1926,7 @@ where
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: merchant_recipient_data.map(|data| {
Expand Down Expand Up @@ -2118,6 +2125,7 @@ pub async fn construct_payment_router_data_for_update_metadata<'a>(
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: merchant_recipient_data.map(|data| {
Expand Down
1 change: 1 addition & 0 deletions crates/router/src/core/relay/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ pub async fn construct_relay_refund_router_data<F>(
frm_metadata: None,
refund_id: Some(relay_id_string),
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ pub fn construct_uas_router_data<F: Clone, Req, Res>(
frm_metadata: None,
dispute_id: None,
refund_id: None,
payout_id: None,
payment_method_status: None,
connector_response: None,
integrity_check: Ok(()),
Expand Down
4 changes: 4 additions & 0 deletions crates/router/src/core/unified_connector_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,7 @@ where
let merchant_id = router_data.merchant_id.clone();
let refund_id = router_data.refund_id.clone();
let dispute_id = router_data.dispute_id.clone();
let payout_id = router_data.payout_id.clone();
let grpc_header = grpc_header_builder.build();
// Log the actual gRPC request with masking
let grpc_request_body = masking::masked_serialize(&grpc_request)
Expand Down Expand Up @@ -1642,6 +1643,7 @@ where
external_latency,
refund_id,
dispute_id,
payout_id,
status_code,
);

Expand Down Expand Up @@ -1708,6 +1710,7 @@ where
let merchant_id = router_data.merchant_id.clone();
let refund_id = router_data.refund_id.clone();
let dispute_id = router_data.dispute_id.clone();
let payout_id = router_data.payout_id.clone();
let grpc_header = grpc_header_builder.build();
// Log the actual gRPC request with masking
let grpc_request_body = masking::masked_serialize(&grpc_request)
Expand Down Expand Up @@ -1775,6 +1778,7 @@ where
external_latency,
refund_id,
dispute_id,
payout_id,
status_code,
);

Expand Down
11 changes: 11 additions & 0 deletions crates/router/src/core/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ pub async fn construct_payout_router_data<'a, F>(
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: Some(payouts.payout_id.get_string_repr().to_string()),
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down Expand Up @@ -400,6 +401,7 @@ pub async fn construct_refund_router_data<'a, F>(
frm_metadata: None,
refund_id: Some(refund.id.get_string_repr().to_string().clone()),
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down Expand Up @@ -591,6 +593,7 @@ pub async fn construct_refund_router_data<'a, F>(
frm_metadata: None,
refund_id: Some(refund.refund_id.clone()),
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down Expand Up @@ -1036,6 +1039,7 @@ pub async fn construct_accept_dispute_router_data<'a>(
frm_metadata: None,
dispute_id: Some(dispute.dispute_id.clone()),
refund_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down Expand Up @@ -1142,6 +1146,7 @@ pub async fn construct_submit_evidence_router_data<'a>(
frm_metadata: None,
refund_id: None,
dispute_id: Some(dispute.dispute_id.clone()),
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down Expand Up @@ -1257,6 +1262,7 @@ pub async fn construct_upload_file_router_data<'a>(
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down Expand Up @@ -1331,6 +1337,7 @@ pub async fn construct_dispute_list_router_data<'a>(
frm_metadata: None,
dispute_id: None,
refund_id: None,
payout_id: None,
payment_method_status: None,
connector_response: None,
integrity_check: Ok(()),
Expand Down Expand Up @@ -1440,6 +1447,7 @@ pub async fn construct_dispute_sync_router_data<'a>(
frm_metadata: None,
refund_id: None,
dispute_id: Some(dispute.dispute_id.clone()),
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down Expand Up @@ -1568,6 +1576,7 @@ pub async fn construct_payments_dynamic_tax_calculation_router_data<F: Clone>(
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
payment_method_status: None,
minor_amount_captured: None,
Expand Down Expand Up @@ -1679,6 +1688,7 @@ pub async fn construct_defend_dispute_router_data<'a>(
frm_metadata: None,
refund_id: None,
dispute_id: Some(dispute.dispute_id.clone()),
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down Expand Up @@ -1781,6 +1791,7 @@ pub async fn construct_retrieve_file_router_data<'a>(
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down
1 change: 1 addition & 0 deletions crates/router/src/core/webhooks/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ pub async fn construct_webhook_router_data(
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down
2 changes: 2 additions & 0 deletions crates/router/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,7 @@ impl<F1, F2, T1, T2> ForeignFrom<(&RouterData<F1, T1, PaymentsResponseData>, T2)
frm_metadata: data.frm_metadata.clone(),
dispute_id: data.dispute_id.clone(),
refund_id: data.refund_id.clone(),
payout_id: data.payout_id.clone(),
connector_response: data.connector_response.clone(),
integrity_check: Ok(()),
additional_merchant_data: data.additional_merchant_data.clone(),
Expand Down Expand Up @@ -1458,6 +1459,7 @@ impl<F1, F2>
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: data.payout_id.clone(),
connector_response: data.connector_response.clone(),
integrity_check: Ok(()),
header_payload: data.header_payload.clone(),
Expand Down
1 change: 1 addition & 0 deletions crates/router/src/types/api/verify_connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ impl VerifyConnectorData {
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down
1 change: 1 addition & 0 deletions crates/router/tests/connectors/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,7 @@ pub trait ConnectorActions: Connector {
frm_metadata: None,
refund_id: None,
dispute_id: None,
payout_id: None,
connector_response: None,
integrity_check: Ok(()),
additional_merchant_data: None,
Expand Down
Loading