mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 09:38:33 +08:00
feat(pm_list): add pm required field info for crypto pay (#1891)
This commit is contained in:
@ -461,9 +461,9 @@ pub enum FieldType {
|
||||
UserAddressState,
|
||||
UserAddressCountry,
|
||||
UserBlikCode,
|
||||
FieldsComplete,
|
||||
UserBillingName,
|
||||
UserBank,
|
||||
UserCurrency { options: Vec<String> },
|
||||
Text,
|
||||
DropDown { options: Vec<String> },
|
||||
}
|
||||
|
||||
@ -694,6 +694,55 @@ impl Default for super::settings::RequiredFields {
|
||||
),
|
||||
])),
|
||||
),
|
||||
(
|
||||
enums::PaymentMethod::Crypto,
|
||||
PaymentMethodType(HashMap::from([
|
||||
(
|
||||
enums::PaymentMethodType::CryptoCurrency,
|
||||
ConnectorFields {
|
||||
fields: HashMap::from([
|
||||
(
|
||||
enums::Connector::Cryptopay,
|
||||
RequiredFieldFinal {
|
||||
mandate : HashMap::new(),
|
||||
non_mandate: HashMap::new(),
|
||||
common : HashMap::from([
|
||||
(
|
||||
"payment_method_data.crypto.pay_currency".to_string(),
|
||||
RequiredFieldInfo {
|
||||
required_field: "payment_method_data.crypto.pay_currency".to_string(),
|
||||
display_name: "currency".to_string(),
|
||||
field_type: enums::FieldType::UserCurrency{
|
||||
options: vec![
|
||||
"BTC".to_string(),
|
||||
"LTC".to_string(),
|
||||
"ETH".to_string(),
|
||||
"XRP".to_string(),
|
||||
"XLM".to_string(),
|
||||
"BCH".to_string(),
|
||||
"ADA".to_string(),
|
||||
"SOL".to_string(),
|
||||
"SHIB".to_string(),
|
||||
"TRX".to_string(),
|
||||
"DOGE".to_string(),
|
||||
"BNB".to_string(),
|
||||
"BUSD".to_string(),
|
||||
"USDT".to_string(),
|
||||
"USDC".to_string(),
|
||||
"DAI".to_string(),
|
||||
]
|
||||
},
|
||||
value: None,
|
||||
}
|
||||
),
|
||||
]),
|
||||
}
|
||||
),
|
||||
]),
|
||||
},
|
||||
),
|
||||
])),
|
||||
),
|
||||
(
|
||||
enums::PaymentMethod::BankDebit,
|
||||
PaymentMethodType(HashMap::from([(
|
||||
|
||||
@ -4883,12 +4883,6 @@
|
||||
"user_blik_code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"fields_complete"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@ -4901,6 +4895,28 @@
|
||||
"user_bank"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"user_currency"
|
||||
],
|
||||
"properties": {
|
||||
"user_currency": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"options"
|
||||
],
|
||||
"properties": {
|
||||
"options": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
||||
Reference in New Issue
Block a user