mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-11-01 02:57:02 +08:00 
			
		
		
		
	feat(connector): [BANKOFAMERICA] Add Required Fields for GPAY (#3014)
This commit is contained in:
		| @ -503,15 +503,6 @@ impl Default for super::settings::RequiredFields { | |||||||
|                                                     value: None, |                                                     value: None, | ||||||
|                                                 } |                                                 } | ||||||
|                                             ), |                                             ), | ||||||
|                                             ( |  | ||||||
|                                                 "payment_method_data.card.card_holder_name".to_string(), |  | ||||||
|                                                 RequiredFieldInfo { |  | ||||||
|                                                     required_field: "payment_method_data.card.card_holder_name".to_string(), |  | ||||||
|                                                     display_name: "card_holder_name".to_string(), |  | ||||||
|                                                     field_type: enums::FieldType::UserFullName, |  | ||||||
|                                                     value: None, |  | ||||||
|                                                 } |  | ||||||
|                                             ), |  | ||||||
|                                             ( |                                             ( | ||||||
|                                                 "email".to_string(), |                                                 "email".to_string(), | ||||||
|                                                 RequiredFieldInfo { |                                                 RequiredFieldInfo { | ||||||
| @ -2418,6 +2409,129 @@ impl Default for super::settings::RequiredFields { | |||||||
|                                     common: HashMap::new(), |                                     common: HashMap::new(), | ||||||
|                                 } |                                 } | ||||||
|                             ), |                             ), | ||||||
|  |                             ( | ||||||
|  |                                 enums::Connector::Bankofamerica, | ||||||
|  |                                 RequiredFieldFinal { | ||||||
|  |                                     mandate: HashMap::new(), | ||||||
|  |                                     non_mandate: HashMap::from( | ||||||
|  |                                         [ | ||||||
|  |                                             ( | ||||||
|  |                                                 "payment_method_data.card.card_number".to_string(), | ||||||
|  |                                                 RequiredFieldInfo { | ||||||
|  |                                                     required_field: "payment_method_data.card.card_number".to_string(), | ||||||
|  |                                                     display_name: "card_number".to_string(), | ||||||
|  |                                                     field_type: enums::FieldType::UserCardNumber, | ||||||
|  |                                                     value: None, | ||||||
|  |                                                 } | ||||||
|  |                                             ), | ||||||
|  |                                             ( | ||||||
|  |                                                 "payment_method_data.card.card_exp_month".to_string(), | ||||||
|  |                                                 RequiredFieldInfo { | ||||||
|  |                                                     required_field: "payment_method_data.card.card_exp_month".to_string(), | ||||||
|  |                                                     display_name: "card_exp_month".to_string(), | ||||||
|  |                                                     field_type: enums::FieldType::UserCardExpiryMonth, | ||||||
|  |                                                     value: None, | ||||||
|  |                                                 } | ||||||
|  |                                             ), | ||||||
|  |                                             ( | ||||||
|  |                                                 "payment_method_data.card.card_exp_year".to_string(), | ||||||
|  |                                                 RequiredFieldInfo { | ||||||
|  |                                                     required_field: "payment_method_data.card.card_exp_year".to_string(), | ||||||
|  |                                                     display_name: "card_exp_year".to_string(), | ||||||
|  |                                                     field_type: enums::FieldType::UserCardExpiryYear, | ||||||
|  |                                                     value: None, | ||||||
|  |                                                 } | ||||||
|  |                                             ), | ||||||
|  |                                             ( | ||||||
|  |                                                 "payment_method_data.card.card_cvc".to_string(), | ||||||
|  |                                                 RequiredFieldInfo { | ||||||
|  |                                                     required_field: "payment_method_data.card.card_cvc".to_string(), | ||||||
|  |                                                     display_name: "card_cvc".to_string(), | ||||||
|  |                                                     field_type: enums::FieldType::UserCardCvc, | ||||||
|  |                                                     value: None, | ||||||
|  |                                                 } | ||||||
|  |                                             ), | ||||||
|  |                                             ( | ||||||
|  |                                                 "email".to_string(), | ||||||
|  |                                                 RequiredFieldInfo { | ||||||
|  |                                                     required_field: "email".to_string(), | ||||||
|  |                                                     display_name: "email".to_string(), | ||||||
|  |                                                     field_type: enums::FieldType::UserEmailAddress, | ||||||
|  |                                                     value: None, | ||||||
|  |                                                 } | ||||||
|  |                                             ), | ||||||
|  |                                             ( | ||||||
|  |                                                 "billing.address.first_name".to_string(), | ||||||
|  |                                                 RequiredFieldInfo { | ||||||
|  |                                                     required_field: "billing.address.first_name".to_string(), | ||||||
|  |                                                     display_name: "billing_first_name".to_string(), | ||||||
|  |                                                     field_type: enums::FieldType::UserBillingName, | ||||||
|  |                                                     value: None, | ||||||
|  |                                                 } | ||||||
|  |                                             ), | ||||||
|  |                                             ( | ||||||
|  |                                                 "billing.address.last_name".to_string(), | ||||||
|  |                                                 RequiredFieldInfo { | ||||||
|  |                                                     required_field: "billing.address.last_name".to_string(), | ||||||
|  |                                                     display_name: "billing_last_name".to_string(), | ||||||
|  |                                                     field_type: enums::FieldType::UserBillingName, | ||||||
|  |                                                     value: None, | ||||||
|  |                                                 } | ||||||
|  |                                             ), | ||||||
|  |                                             ( | ||||||
|  |                                                 "billing.address.city".to_string(), | ||||||
|  |                                                 RequiredFieldInfo { | ||||||
|  |                                                     required_field: "billing.address.city".to_string(), | ||||||
|  |                                                     display_name: "city".to_string(), | ||||||
|  |                                                     field_type: enums::FieldType::UserAddressCity, | ||||||
|  |                                                     value: None, | ||||||
|  |                                                 } | ||||||
|  |                                             ), | ||||||
|  |                                             ( | ||||||
|  |                                                 "billing.address.state".to_string(), | ||||||
|  |                                                 RequiredFieldInfo { | ||||||
|  |                                                     required_field: "billing.address.state".to_string(), | ||||||
|  |                                                     display_name: "state".to_string(), | ||||||
|  |                                                     field_type: enums::FieldType::UserAddressState, | ||||||
|  |                                                     value: None, | ||||||
|  |                                                 } | ||||||
|  |                                             ), | ||||||
|  |                                             ( | ||||||
|  |                                                 "billing.address.zip".to_string(), | ||||||
|  |                                                 RequiredFieldInfo { | ||||||
|  |                                                     required_field: "billing.address.zip".to_string(), | ||||||
|  |                                                     display_name: "zip".to_string(), | ||||||
|  |                                                     field_type: enums::FieldType::UserAddressPincode, | ||||||
|  |                                                     value: None, | ||||||
|  |                                                 } | ||||||
|  |                                             ), | ||||||
|  |                                             ( | ||||||
|  |                                                 "billing.address.country".to_string(), | ||||||
|  |                                                 RequiredFieldInfo { | ||||||
|  |                                                     required_field: "billing.address.country".to_string(), | ||||||
|  |                                                     display_name: "country".to_string(), | ||||||
|  |                                                     field_type: enums::FieldType::UserAddressCountry{ | ||||||
|  |                                                         options: vec![ | ||||||
|  |                                                             "ALL".to_string(), | ||||||
|  |                                                         ] | ||||||
|  |                                                     }, | ||||||
|  |                                                     value: None, | ||||||
|  |                                                 } | ||||||
|  |                                             ), | ||||||
|  |                                             ( | ||||||
|  |                                                 "billing.address.line1".to_string(), | ||||||
|  |                                                 RequiredFieldInfo { | ||||||
|  |                                                     required_field: "billing.address.line1".to_string(), | ||||||
|  |                                                     display_name: "line1".to_string(), | ||||||
|  |                                                     field_type: enums::FieldType::UserAddressLine1, | ||||||
|  |                                                     value: None, | ||||||
|  |                                                 } | ||||||
|  |                                             ), | ||||||
|  |                                         ] | ||||||
|  |                                     ), | ||||||
|  |                                     common: HashMap::new(), | ||||||
|  |                                 } | ||||||
|  |                             ), | ||||||
|                             ( |                             ( | ||||||
|                                 enums::Connector::Bluesnap, |                                 enums::Connector::Bluesnap, | ||||||
|                                 RequiredFieldFinal { |                                 RequiredFieldFinal { | ||||||
| @ -4250,6 +4364,93 @@ impl Default for super::settings::RequiredFields { | |||||||
|                                         common: HashMap::new(), |                                         common: HashMap::new(), | ||||||
|                                     } |                                     } | ||||||
|                                 ), |                                 ), | ||||||
|  |                                 ( | ||||||
|  |                                     enums::Connector::Bankofamerica, | ||||||
|  |                                     RequiredFieldFinal { | ||||||
|  |                                         mandate: HashMap::new(), | ||||||
|  |                                         non_mandate: HashMap::from( | ||||||
|  |                                             [ | ||||||
|  |                                                 ( | ||||||
|  |                                                     "email".to_string(), | ||||||
|  |                                                     RequiredFieldInfo { | ||||||
|  |                                                         required_field: "email".to_string(), | ||||||
|  |                                                         display_name: "email".to_string(), | ||||||
|  |                                                         field_type: enums::FieldType::UserEmailAddress, | ||||||
|  |                                                         value: None, | ||||||
|  |                                                     } | ||||||
|  |                                                 ), | ||||||
|  |                                                 ( | ||||||
|  |                                                     "billing.address.first_name".to_string(), | ||||||
|  |                                                     RequiredFieldInfo { | ||||||
|  |                                                         required_field: "billing.address.first_name".to_string(), | ||||||
|  |                                                         display_name: "billing_first_name".to_string(), | ||||||
|  |                                                         field_type: enums::FieldType::UserBillingName, | ||||||
|  |                                                         value: None, | ||||||
|  |                                                     } | ||||||
|  |                                                 ), | ||||||
|  |                                                 ( | ||||||
|  |                                                     "billing.address.last_name".to_string(), | ||||||
|  |                                                     RequiredFieldInfo { | ||||||
|  |                                                         required_field: "billing.address.last_name".to_string(), | ||||||
|  |                                                         display_name: "billing_last_name".to_string(), | ||||||
|  |                                                         field_type: enums::FieldType::UserBillingName, | ||||||
|  |                                                         value: None, | ||||||
|  |                                                     } | ||||||
|  |                                                 ), | ||||||
|  |                                                 ( | ||||||
|  |                                                     "billing.address.city".to_string(), | ||||||
|  |                                                     RequiredFieldInfo { | ||||||
|  |                                                         required_field: "billing.address.city".to_string(), | ||||||
|  |                                                         display_name: "city".to_string(), | ||||||
|  |                                                         field_type: enums::FieldType::UserAddressCity, | ||||||
|  |                                                         value: None, | ||||||
|  |                                                     } | ||||||
|  |                                                 ), | ||||||
|  |                                                 ( | ||||||
|  |                                                     "billing.address.state".to_string(), | ||||||
|  |                                                     RequiredFieldInfo { | ||||||
|  |                                                         required_field: "billing.address.state".to_string(), | ||||||
|  |                                                         display_name: "state".to_string(), | ||||||
|  |                                                         field_type: enums::FieldType::UserAddressState, | ||||||
|  |                                                         value: None, | ||||||
|  |                                                     } | ||||||
|  |                                                 ), | ||||||
|  |                                                 ( | ||||||
|  |                                                     "billing.address.zip".to_string(), | ||||||
|  |                                                     RequiredFieldInfo { | ||||||
|  |                                                         required_field: "billing.address.zip".to_string(), | ||||||
|  |                                                         display_name: "zip".to_string(), | ||||||
|  |                                                         field_type: enums::FieldType::UserAddressPincode, | ||||||
|  |                                                         value: None, | ||||||
|  |                                                     } | ||||||
|  |                                                 ), | ||||||
|  |                                                 ( | ||||||
|  |                                                     "billing.address.country".to_string(), | ||||||
|  |                                                     RequiredFieldInfo { | ||||||
|  |                                                         required_field: "billing.address.country".to_string(), | ||||||
|  |                                                         display_name: "country".to_string(), | ||||||
|  |                                                         field_type: enums::FieldType::UserAddressCountry{ | ||||||
|  |                                                             options: vec![ | ||||||
|  |                                                                 "ALL".to_string(), | ||||||
|  |                                                             ] | ||||||
|  |                                                         }, | ||||||
|  |                                                         value: None, | ||||||
|  |                                                     } | ||||||
|  |                                                 ), | ||||||
|  |                                                 ( | ||||||
|  |                                                     "billing.address.line1".to_string(), | ||||||
|  |                                                     RequiredFieldInfo { | ||||||
|  |                                                         required_field: "billing.address.line1".to_string(), | ||||||
|  |                                                         display_name: "line1".to_string(), | ||||||
|  |                                                         field_type: enums::FieldType::UserAddressLine1, | ||||||
|  |                                                         value: None, | ||||||
|  |                                                     } | ||||||
|  |                                                 ), | ||||||
|  |                                             ] | ||||||
|  |                                         ), | ||||||
|  |                                         common: HashMap::new(), | ||||||
|  |                                     } | ||||||
|  |                                 ), | ||||||
|                                ]), |                                ]), | ||||||
|                         }, |                         }, | ||||||
|                     ), |                     ), | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 DEEPANSHU BANSAL
					DEEPANSHU BANSAL