feat(router): Payment Intent and MCA changes for split payments (#9049)

This commit is contained in:
Anurag Thakur
2025-09-01 18:47:00 +05:30
committed by GitHub
parent ec5a955158
commit 81b340d3a9
20 changed files with 130 additions and 2 deletions

View File

@ -3626,6 +3626,7 @@ impl ProfileCreateBridge for api::ProfileCreate {
.map(ForeignInto::foreign_into),
merchant_category_code: self.merchant_category_code,
merchant_country_code: self.merchant_country_code,
split_txns_enabled: self.split_txns_enabled.unwrap_or_default(),
}))
}
}
@ -4114,6 +4115,7 @@ impl ProfileUpdateBridge for api::ProfileUpdate {
merchant_category_code: self.merchant_category_code,
merchant_country_code: self.merchant_country_code,
revenue_recovery_retry_algorithm_type,
split_txns_enabled: self.split_txns_enabled,
},
)))
}

View File

@ -2236,6 +2236,7 @@ where
.clone()
.map(ForeignFrom::foreign_from),
request_incremental_authorization: payment_intent.request_incremental_authorization,
split_txns_enabled: payment_intent.split_txns_enabled,
expires_on: payment_intent.session_expiry,
frm_metadata: payment_intent.frm_metadata.clone(),
request_external_three_ds_authentication: payment_intent

View File

@ -143,6 +143,7 @@ pub struct KafkaPaymentIntent<'a> {
pub updated_by: &'a String,
pub surcharge_applicable: Option<bool>,
pub request_incremental_authorization: RequestIncrementalAuthorization,
pub split_txns_enabled: common_enums::SplitTxnsEnabled,
pub authorization_count: Option<i32>,
#[serde(with = "time::serde::timestamp")]
pub session_expiry: OffsetDateTime,
@ -209,6 +210,7 @@ impl<'a> KafkaPaymentIntent<'a> {
frm_merchant_decision,
updated_by,
request_incremental_authorization,
split_txns_enabled,
authorization_count,
session_expiry,
request_external_three_ds_authentication,
@ -265,6 +267,7 @@ impl<'a> KafkaPaymentIntent<'a> {
updated_by,
surcharge_applicable: None,
request_incremental_authorization: *request_incremental_authorization,
split_txns_enabled: *split_txns_enabled,
authorization_count: *authorization_count,
session_expiry: session_expiry.assume_utc(),
request_external_three_ds_authentication: *request_external_three_ds_authentication,

View File

@ -96,6 +96,7 @@ pub struct KafkaPaymentIntentEvent<'a> {
pub updated_by: &'a String,
pub surcharge_applicable: Option<bool>,
pub request_incremental_authorization: RequestIncrementalAuthorization,
pub split_txns_enabled: common_enums::SplitTxnsEnabled,
pub authorization_count: Option<i32>,
#[serde(with = "time::serde::timestamp::nanoseconds")]
pub session_expiry: OffsetDateTime,
@ -221,6 +222,7 @@ impl<'a> KafkaPaymentIntentEvent<'a> {
frm_merchant_decision,
updated_by,
request_incremental_authorization,
split_txns_enabled,
authorization_count,
session_expiry,
request_external_three_ds_authentication,
@ -277,6 +279,7 @@ impl<'a> KafkaPaymentIntentEvent<'a> {
updated_by,
surcharge_applicable: None,
request_incremental_authorization: *request_incremental_authorization,
split_txns_enabled: *split_txns_enabled,
authorization_count: *authorization_count,
session_expiry: session_expiry.assume_utc(),
request_external_three_ds_authentication: *request_external_three_ds_authentication,

View File

@ -319,6 +319,7 @@ impl ForeignTryFrom<domain::Profile> for ProfileResponse {
.map(ForeignInto::foreign_into),
merchant_category_code: item.merchant_category_code,
merchant_country_code: item.merchant_country_code,
split_txns_enabled: item.split_txns_enabled,
})
}
}