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

refactor(core): propagate merchant_reference_id for PaymentsAuthorizeData (#9013)

Aishwariyaa Anand49cd1225abb8
diff --git a/crates/router/src/core/payments/transformers.rs b/crates/router/src/core/payments/transformers.rs
index 348a364c56..cf91b2bcc3 100644
--- a/crates/router/src/core/payments/transformers.rs
+++ b/crates/router/src/core/payments/transformers.rs
@@ -406,7 +406,10 @@ pub async fn construct_payment_router_data_for_authorize<'a>(
authentication_data: None,
customer_acceptance: None,
split_payments: None,
- merchant_order_reference_id: None,
+ merchant_order_reference_id: payment_data
+ .payment_intent
+ .merchant_reference_id
+ .map(|reference_id| reference_id.get_string_repr().to_owned()),
integrity_object: None,
shipping_cost: payment_data.payment_intent.amount_details.shipping_cost,
additional_payment_method_data: None,