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(connectors): [boa/cybs] add billing address to MIT request (#5068)

AkshayaFoiger66ac1584dfd6
diff --git a/crates/router/src/connector/bankofamerica/transformers.rs b/crates/router/src/connector/bankofamerica/transformers.rs
index d26c01e9a8..a82b2cc480 100644
--- a/crates/router/src/connector/bankofamerica/transformers.rs
+++ b/crates/router/src/connector/bankofamerica/transformers.rs
@@ -1309,7 +1309,11 @@ impl
let payment_instrument = BankOfAmericaPaymentInstrument {
id: connector_mandate_id.into(),
};
- let order_information = OrderInformationWithBill::from((item, None));
+ let bill_to =
+ item.router_data.request.get_email().ok().and_then(|email| {
+ build_bill_to(item.router_data.get_optional_billing(), email).ok()
+ });
+ let order_information = OrderInformationWithBill::from((item, bill_to));
let payment_information =
PaymentInformation::MandatePayment(Box::new(MandatePaymentInformation {
payment_instrument,
diff --git a/crates/router/src/connector/cybersource/transformers.rs b/crates/router/src/connector/cybersource/transformers.rs
index 38514fc45f..83882b161d 100644
--- a/crates/router/src/connector/cybersource/transformers.rs
+++ b/crates/router/src/connector/cybersource/transformers.rs
@@ -1413,7 +1413,11 @@ impl
let payment_instrument = CybersoucrePaymentInstrument {
id: connector_mandate_id.into(),
};
- let order_information = OrderInformationWithBill::from((item, None));
+ let bill_to =
+ item.router_data.request.get_email().ok().and_then(|email| {
+ build_bill_to(item.router_data.get_optional_billing(), email).ok()
+ });
+ let order_information = OrderInformationWithBill::from((item, bill_to));
let payment_information =
PaymentInformation::MandatePayment(Box::new(MandatePaymentInformation {
payment_instrument,