feat(payment_methods): add support for tokenising bank details and fetching masked details while listing (#2585)

Co-authored-by: shashank_attarde <shashank.attarde@juspay.in>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Chethan Rao
2023-11-22 17:11:02 +05:30
committed by GitHub
parent 4e15d7792e
commit 998948953a
4 changed files with 141 additions and 3 deletions

View File

@ -811,10 +811,20 @@ pub struct CustomerPaymentMethod {
#[schema(value_type = Option<Bank>)]
pub bank_transfer: Option<payouts::Bank>,
/// Masked bank details from PM auth services
#[schema(example = json!({"mask": "0000"}))]
pub bank: Option<MaskedBankDetails>,
/// Whether this payment method requires CVV to be collected
#[schema(example = true)]
pub requires_cvv: bool,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)]
pub struct MaskedBankDetails {
pub mask: String,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct PaymentMethodId {
pub payment_method_id: String,