Skip to content

Commit

Permalink
refactor(payment_methods): Added support for pm_auth_connector field …
Browse files Browse the repository at this point in the history
…in pm list response (#2667)

Co-authored-by: Chethan Rao <[email protected]>
Co-authored-by: Shanks <[email protected]>
  • Loading branch information
3 people authored Nov 21, 2023
1 parent 5c4e7c9 commit be4aa3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/api_models/src/payment_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ pub struct ResponsePaymentMethodTypes {
}
"#)]
pub surcharge_details: Option<SurchargeDetailsResponse>,

/// auth service connector label for this payment method type, if exists
pub pm_auth_connector: Option<String>,
}
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
#[serde(rename_all = "snake_case")]
Expand Down
5 changes: 5 additions & 0 deletions crates/router/src/core/payment_methods/cards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,7 @@ pub async fn list_payment_methods(
.and_then(|inner_hm| inner_hm.get(payment_method_types_hm.0))
.cloned(),
surcharge_details: None,
pm_auth_connector: None,
})
}

Expand Down Expand Up @@ -1418,6 +1419,7 @@ pub async fn list_payment_methods(
.and_then(|inner_hm| inner_hm.get(payment_method_types_hm.0))
.cloned(),
surcharge_details: None,
pm_auth_connector: None,
})
}

Expand Down Expand Up @@ -1447,6 +1449,7 @@ pub async fn list_payment_methods(
.and_then(|inner_hm| inner_hm.get(key.0))
.cloned(),
surcharge_details: None,
pm_auth_connector: None,
}
})
}
Expand Down Expand Up @@ -1479,6 +1482,7 @@ pub async fn list_payment_methods(
.and_then(|inner_hm| inner_hm.get(key.0))
.cloned(),
surcharge_details: None,
pm_auth_connector: None,
}
})
}
Expand Down Expand Up @@ -1511,6 +1515,7 @@ pub async fn list_payment_methods(
.and_then(|inner_hm| inner_hm.get(key.0))
.cloned(),
surcharge_details: None,
pm_auth_connector: None,
}
})
}
Expand Down

0 comments on commit be4aa3b

Please sign in to comment.