feat(router): add open router integration for debit routing (#7907)

Co-authored-by: Sayak Bhattacharya <sayak.b@Sayak-Bhattacharya-G092THXJ34.local>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Shankar Singh C
2025-05-19 15:34:29 +05:30
committed by GitHub
parent 868ff50d14
commit 140d15bcbd
61 changed files with 1426 additions and 171 deletions

View File

@ -204,6 +204,11 @@ where
payment_method_billing_address,
)
.await?;
let payment_methods_data =
&save_payment_method_data.request.get_payment_method_data();
let co_badged_card_data = payment_methods_data.get_co_badged_card_data();
let customer_id = customer_id.to_owned().get_required_value("customer_id")?;
let merchant_id = merchant_context.get_merchant_account().get_id();
let is_network_tokenization_enabled =
@ -272,7 +277,7 @@ where
save_payment_method_data.request.get_payment_method_data(),
) {
(Some(card), _) => Some(PaymentMethodsData::Card(
CardDetailsPaymentMethod::from(card.clone()),
CardDetailsPaymentMethod::from((card.clone(), co_badged_card_data)),
)),
(
_,
@ -303,7 +308,10 @@ where
> = match network_token_resp {
Some(token_resp) => {
let pm_token_details = token_resp.card.as_ref().map(|card| {
PaymentMethodsData::Card(CardDetailsPaymentMethod::from(card.clone()))
PaymentMethodsData::Card(CardDetailsPaymentMethod::from((
card.clone(),
None,
)))
});
pm_token_details
@ -645,9 +653,10 @@ where
});
let updated_pmd = updated_card.as_ref().map(|card| {
PaymentMethodsData::Card(CardDetailsPaymentMethod::from(
PaymentMethodsData::Card(CardDetailsPaymentMethod::from((
card.clone(),
))
co_badged_card_data,
)))
});
let pm_data_encrypted: Option<
Encryptable<Secret<serde_json::Value>>,