Skip to content

Commit be4aa3b

Browse files
Sarthak1799Chethan-raovspecky
authored
refactor(payment_methods): Added support for pm_auth_connector field in pm list response (#2667)
Co-authored-by: Chethan Rao <[email protected]> Co-authored-by: Shanks <[email protected]>
1 parent 5c4e7c9 commit be4aa3b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

crates/api_models/src/payment_methods.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,9 @@ pub struct ResponsePaymentMethodTypes {
325325
}
326326
"#)]
327327
pub surcharge_details: Option<SurchargeDetailsResponse>,
328+
329+
/// auth service connector label for this payment method type, if exists
330+
pub pm_auth_connector: Option<String>,
328331
}
329332
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
330333
#[serde(rename_all = "snake_case")]

crates/router/src/core/payment_methods/cards.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,6 +1384,7 @@ pub async fn list_payment_methods(
13841384
.and_then(|inner_hm| inner_hm.get(payment_method_types_hm.0))
13851385
.cloned(),
13861386
surcharge_details: None,
1387+
pm_auth_connector: None,
13871388
})
13881389
}
13891390

@@ -1418,6 +1419,7 @@ pub async fn list_payment_methods(
14181419
.and_then(|inner_hm| inner_hm.get(payment_method_types_hm.0))
14191420
.cloned(),
14201421
surcharge_details: None,
1422+
pm_auth_connector: None,
14211423
})
14221424
}
14231425

@@ -1447,6 +1449,7 @@ pub async fn list_payment_methods(
14471449
.and_then(|inner_hm| inner_hm.get(key.0))
14481450
.cloned(),
14491451
surcharge_details: None,
1452+
pm_auth_connector: None,
14501453
}
14511454
})
14521455
}
@@ -1479,6 +1482,7 @@ pub async fn list_payment_methods(
14791482
.and_then(|inner_hm| inner_hm.get(key.0))
14801483
.cloned(),
14811484
surcharge_details: None,
1485+
pm_auth_connector: None,
14821486
}
14831487
})
14841488
}
@@ -1511,6 +1515,7 @@ pub async fn list_payment_methods(
15111515
.and_then(|inner_hm| inner_hm.get(key.0))
15121516
.cloned(),
15131517
surcharge_details: None,
1518+
pm_auth_connector: None,
15141519
}
15151520
})
15161521
}

0 commit comments

Comments
 (0)