Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions api-reference/v2/openapi_spec_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -17619,10 +17619,7 @@
],
"properties": {
"bank_names": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BankCodeResponse"
}
"$ref": "#/components/schemas/BankNames"
}
}
}
Expand Down Expand Up @@ -22329,11 +22326,11 @@
"$ref": "#/components/schemas/PaymentMethodType"
},
"payment_experience": {
"allOf": [
{
"$ref": "#/components/schemas/PaymentExperience"
}
],
"type": "array",
"items": {
"$ref": "#/components/schemas/PaymentExperience"
},
"description": "The payment experience for the payment method",
"nullable": true
},
"required_fields": {
Expand Down
12 changes: 7 additions & 5 deletions crates/api_models/src/payment_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ use masking::PeekInterface;
use serde::de;
use utoipa::{schema, ToSchema};

#[cfg(feature = "v1")]
use crate::payments::BankCodeResponse;
#[cfg(feature = "payouts")]
use crate::payouts;
use crate::{
admin, enums as api_enums, open_router,
payments::{self, BankCodeResponse},
};
use crate::{admin, enums as api_enums, open_router, payments};

#[cfg(feature = "v1")]
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
Expand Down Expand Up @@ -1471,7 +1470,10 @@ pub enum PaymentMethodSubtypeSpecificData {
card_networks: Vec<CardNetworkTypes>,
},
#[schema(title = "bank")]
Bank { bank_names: Vec<BankCodeResponse> },
Bank {
#[schema(value_type = BankNames)]
bank_names: Vec<common_enums::BankNames>,
},
}

#[cfg(feature = "v2")]
Expand Down
4 changes: 2 additions & 2 deletions crates/api_models/src/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7727,8 +7727,8 @@ pub struct ResponsePaymentMethodTypesForPayments {
pub payment_method_subtype: common_enums::PaymentMethodType,

/// The payment experience for the payment method
#[schema(value_type = Option<PaymentExperience>)]
pub payment_experience: Option<common_enums::PaymentExperience>,
#[schema(value_type = Option<Vec<PaymentExperience>>)]
pub payment_experience: Option<Vec<common_enums::PaymentExperience>>,

/// payment method subtype specific information
#[serde(flatten)]
Expand Down
4 changes: 4 additions & 0 deletions crates/common_enums/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1832,7 +1832,9 @@ pub enum SamsungPayCardBrand {
Copy,
Debug,
Eq,
Ord,
Hash,
PartialOrd,
PartialEq,
serde::Deserialize,
serde::Serialize,
Expand Down Expand Up @@ -2081,6 +2083,8 @@ impl masking::SerializableSecret for PaymentMethodType {}
Debug,
Default,
Eq,
PartialOrd,
Ord,
Hash,
PartialEq,
serde::Deserialize,
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/core/payment_methods/vault.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1598,7 +1598,7 @@ pub async fn retrieve_and_delete_cvc_from_payment_token(
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("Failed to get redis connection")?;

let key = format!("pm_token_{payment_token}_{payment_method}_hyperswitch_cvc");
let key = format!("pm_token_{payment_token}_{payment_method}_hyperswitch_cvc",);

let data = redis_conn
.get_key::<bytes::Bytes>(&key.clone().into())
Expand Down
Loading
Loading