mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 10:06:32 +08:00 
			
		
		
		
	feat(payment_methods): bank details support for payment method data in pmt (#2385)
This commit is contained in:
		| @ -147,6 +147,7 @@ pub struct PaymentMethodResponse { | ||||
| #[derive(Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize)] | ||||
| pub enum PaymentMethodsData { | ||||
|     Card(CardDetailsPaymentMethod), | ||||
|     BankDetails(PaymentMethodDataBankCreds), | ||||
| } | ||||
| #[derive(Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize)] | ||||
| pub struct CardDetailsPaymentMethod { | ||||
| @ -158,6 +159,25 @@ pub struct CardDetailsPaymentMethod { | ||||
|     pub card_holder_name: Option<masking::Secret<String>>, | ||||
| } | ||||
|  | ||||
| #[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, serde::Deserialize)] | ||||
| pub struct PaymentMethodDataBankCreds { | ||||
|     pub mask: String, | ||||
|     pub hash: String, | ||||
|     pub payment_method_type: api_enums::PaymentMethodType, | ||||
|     pub connector_details: Vec<BankAccountConnectorDetails>, | ||||
| } | ||||
|  | ||||
| #[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, serde::Deserialize)] | ||||
| pub struct BankAccountConnectorDetails { | ||||
|     pub connector: String, | ||||
|     pub account_id: String, | ||||
|     pub access_token: BankAccountAccessCreds, | ||||
| } | ||||
|  | ||||
| #[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, serde::Deserialize)] | ||||
| pub enum BankAccountAccessCreds { | ||||
|     AccessToken(String), | ||||
| } | ||||
| #[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)] | ||||
| pub struct CardDetailFromLocker { | ||||
|     pub scheme: Option<String>, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Sarthak Soni
					Sarthak Soni