Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

feat(connector): [Checkout] txn link id in (#13295)

Nithin N36906fd30801
diff --git a/crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs b/crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs
index e4cbec6c87..8d93d5e6a1 100644
--- a/crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs
@@ -369,6 +369,7 @@ pub struct CheckoutPhoneDetails {
#[derive(Debug, Default, Serialize)]
pub struct CheckoutProcessing {
pub order_id: Option<String>,
+ pub scheme_transaction_link_id: Option<String>,
pub tax_amount: Option<MinorUnit>,
pub discount_amount: Option<MinorUnit>,
pub duty_amount: Option<MinorUnit>,
@@ -990,7 +991,7 @@ impl TryFrom<&CheckoutRouterData<&PaymentsAuthorizeRouterData>> for PaymentsRequ
let auth_type: CheckoutAuthType = connector_auth.try_into()?;
let processing_channel_id = auth_type.processing_channel_id;
let metadata = build_metadata(item);
- let (customer, processing, shipping, items) = if let Some(l2l3_data) =
+ let (customer, mut processing, shipping, items) = if let Some(l2l3_data) =
&item.router_data.l2_l3_data
{
(
@@ -1005,6 +1006,7 @@ impl TryFrom<&CheckoutRouterData<&PaymentsAuthorizeRouterData>> for PaymentsRequ
}),
l2l3_data.order_info.as_ref().map(|_| CheckoutProcessing {
order_id: l2l3_data.get_merchant_order_reference_id(),
+ scheme_transaction_link_id: None,
tax_amount: l2l3_data.get_order_tax_amount(),
discount_amount: l2l3_data.get_discount_amount(),
duty_amount: l2l3_data.get_duty_amount(),
@@ -1044,6 +1046,14 @@ impl TryFrom<&CheckoutRouterData<&PaymentsAuthorizeRouterData>> for PaymentsRequ
(None, None, None, None)
};
+ if let Some(transaction_link_id) =
+ item.router_data.request.get_optional_transaction_link_id()
+ {
+ processing
+ .get_or_insert_default()
+ .scheme_transaction_link_id = Some(transaction_link_id);
+ }
+
let partial_authorization = item.router_data.request.enable_partial_authorization.map(
|enable_partial_authorization| CheckoutPartialAuthorization {
enabled: *enable_partial_authorization,