mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
refactor(payment_methods): add support for passing card_cvc in payment_method_data object along with token (#3024)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -204,8 +204,9 @@ pub struct PaymentsRequest {
|
||||
#[schema(example = "187282ab-40ef-47a9-9206-5099ba31e432")]
|
||||
pub payment_token: Option<String>,
|
||||
|
||||
/// This is used when payment is to be confirmed and the card is not saved
|
||||
#[schema(value_type = Option<String>)]
|
||||
/// This is used when payment is to be confirmed and the card is not saved.
|
||||
/// This field will be deprecated soon, use the CardToken object instead
|
||||
#[schema(value_type = Option<String>, deprecated)]
|
||||
pub card_cvc: Option<Secret<String>>,
|
||||
|
||||
/// The shipping address for the payment
|
||||
@ -720,12 +721,16 @@ pub struct Card {
|
||||
pub nick_name: Option<Secret<String>>,
|
||||
}
|
||||
|
||||
#[derive(Eq, PartialEq, Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
|
||||
#[derive(Eq, PartialEq, Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema, Default)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub struct CardToken {
|
||||
/// The card holder's name
|
||||
#[schema(value_type = String, example = "John Test")]
|
||||
pub card_holder_name: Option<Secret<String>>,
|
||||
|
||||
/// The CVC number for the card
|
||||
#[schema(value_type = Option<String>)]
|
||||
pub card_cvc: Option<Secret<String>>,
|
||||
}
|
||||
|
||||
#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
|
||||
Reference in New Issue
Block a user